Merge remote-tracking branches 'regulator/topic/rk808', 'regulator/topic/rpm', 'regulator/topic/rt5033' and 'regulator/topic/tps65023' into regulator-next
This commit is contained in:
commit
dd7c2e720a
|
@ -227,9 +227,11 @@ static int rpm_reg_set_mV_sel(struct regulator_dev *rdev,
|
|||
return uV;
|
||||
|
||||
mutex_lock(&vreg->lock);
|
||||
vreg->uV = uV;
|
||||
if (vreg->is_enabled)
|
||||
ret = rpm_reg_write(vreg, req, vreg->uV / 1000);
|
||||
ret = rpm_reg_write(vreg, req, uV / 1000);
|
||||
|
||||
if (!ret)
|
||||
vreg->uV = uV;
|
||||
mutex_unlock(&vreg->lock);
|
||||
|
||||
return ret;
|
||||
|
@ -252,9 +254,11 @@ static int rpm_reg_set_uV_sel(struct regulator_dev *rdev,
|
|||
return uV;
|
||||
|
||||
mutex_lock(&vreg->lock);
|
||||
vreg->uV = uV;
|
||||
if (vreg->is_enabled)
|
||||
ret = rpm_reg_write(vreg, req, vreg->uV);
|
||||
ret = rpm_reg_write(vreg, req, uV);
|
||||
|
||||
if (!ret)
|
||||
vreg->uV = uV;
|
||||
mutex_unlock(&vreg->lock);
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -97,7 +97,7 @@ static int rk808_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
|
|||
RK808_RAMP_RATE_MASK, ramp_value);
|
||||
}
|
||||
|
||||
int rk808_set_suspend_voltage(struct regulator_dev *rdev, int uv)
|
||||
static int rk808_set_suspend_voltage(struct regulator_dev *rdev, int uv)
|
||||
{
|
||||
unsigned int reg;
|
||||
int sel = regulator_map_voltage_linear_range(rdev, uv, uv);
|
||||
|
@ -112,7 +112,7 @@ int rk808_set_suspend_voltage(struct regulator_dev *rdev, int uv)
|
|||
sel);
|
||||
}
|
||||
|
||||
int rk808_set_suspend_enable(struct regulator_dev *rdev)
|
||||
static int rk808_set_suspend_enable(struct regulator_dev *rdev)
|
||||
{
|
||||
unsigned int reg;
|
||||
|
||||
|
@ -123,7 +123,7 @@ int rk808_set_suspend_enable(struct regulator_dev *rdev)
|
|||
0);
|
||||
}
|
||||
|
||||
int rk808_set_suspend_disable(struct regulator_dev *rdev)
|
||||
static int rk808_set_suspend_disable(struct regulator_dev *rdev)
|
||||
{
|
||||
unsigned int reg;
|
||||
|
||||
|
|
|
@ -36,6 +36,8 @@ static struct regulator_ops rt5033_buck_ops = {
|
|||
static const struct regulator_desc rt5033_supported_regulators[] = {
|
||||
[RT5033_BUCK] = {
|
||||
.name = "BUCK",
|
||||
.of_match = of_match_ptr("BUCK"),
|
||||
.regulators_node = of_match_ptr("regulators"),
|
||||
.id = RT5033_BUCK,
|
||||
.ops = &rt5033_buck_ops,
|
||||
.type = REGULATOR_VOLTAGE,
|
||||
|
@ -50,6 +52,8 @@ static const struct regulator_desc rt5033_supported_regulators[] = {
|
|||
},
|
||||
[RT5033_LDO] = {
|
||||
.name = "LDO",
|
||||
.of_match = of_match_ptr("LDO"),
|
||||
.regulators_node = of_match_ptr("regulators"),
|
||||
.id = RT5033_LDO,
|
||||
.ops = &rt5033_buck_ops,
|
||||
.type = REGULATOR_VOLTAGE,
|
||||
|
@ -64,6 +68,8 @@ static const struct regulator_desc rt5033_supported_regulators[] = {
|
|||
},
|
||||
[RT5033_SAFE_LDO] = {
|
||||
.name = "SAFE_LDO",
|
||||
.of_match = of_match_ptr("SAFE_LDO"),
|
||||
.regulators_node = of_match_ptr("regulators"),
|
||||
.id = RT5033_SAFE_LDO,
|
||||
.ops = &rt5033_safe_ldo_ops,
|
||||
.type = REGULATOR_VOLTAGE,
|
||||
|
@ -81,7 +87,7 @@ static int rt5033_regulator_probe(struct platform_device *pdev)
|
|||
int ret, i;
|
||||
struct regulator_config config = {};
|
||||
|
||||
config.dev = &pdev->dev;
|
||||
config.dev = rt5033->dev;
|
||||
config.driver_data = rt5033;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(rt5033_supported_regulators); i++) {
|
||||
|
|
|
@ -173,7 +173,7 @@ static int tps65023_dcdc_set_voltage_sel(struct regulator_dev *dev,
|
|||
}
|
||||
|
||||
/* Operations permitted on VDCDCx */
|
||||
static struct regulator_ops tps65023_dcdc_ops = {
|
||||
static const struct regulator_ops tps65023_dcdc_ops = {
|
||||
.is_enabled = regulator_is_enabled_regmap,
|
||||
.enable = regulator_enable_regmap,
|
||||
.disable = regulator_disable_regmap,
|
||||
|
@ -184,7 +184,7 @@ static struct regulator_ops tps65023_dcdc_ops = {
|
|||
};
|
||||
|
||||
/* Operations permitted on LDOx */
|
||||
static struct regulator_ops tps65023_ldo_ops = {
|
||||
static const struct regulator_ops tps65023_ldo_ops = {
|
||||
.is_enabled = regulator_is_enabled_regmap,
|
||||
.enable = regulator_enable_regmap,
|
||||
.disable = regulator_disable_regmap,
|
||||
|
@ -194,7 +194,7 @@ static struct regulator_ops tps65023_ldo_ops = {
|
|||
.map_voltage = regulator_map_voltage_ascend,
|
||||
};
|
||||
|
||||
static struct regmap_config tps65023_regmap_config = {
|
||||
static const struct regmap_config tps65023_regmap_config = {
|
||||
.reg_bits = 8,
|
||||
.val_bits = 8,
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue