diff options
| -rw-r--r-- | drivers/regulator/bcm590xx-regulator.c | 5 | ||||
| -rw-r--r-- | drivers/regulator/palmas-regulator.c | 12 | ||||
| -rw-r--r-- | drivers/regulator/tps65218-regulator.c | 3 |
3 files changed, 19 insertions, 1 deletions
diff --git a/drivers/regulator/bcm590xx-regulator.c b/drivers/regulator/bcm590xx-regulator.c index 57544e254a78..58ece59367ae 100644 --- a/drivers/regulator/bcm590xx-regulator.c +++ b/drivers/regulator/bcm590xx-regulator.c | |||
| @@ -119,6 +119,10 @@ static const unsigned int ldo_c_table[] = { | |||
| 119 | 2900000, 3000000, 3300000, | 119 | 2900000, 3000000, 3300000, |
| 120 | }; | 120 | }; |
| 121 | 121 | ||
| 122 | static const unsigned int ldo_vbus[] = { | ||
| 123 | 5000000, | ||
| 124 | }; | ||
| 125 | |||
| 122 | /* DCDC group CSR: supported voltages in microvolts */ | 126 | /* DCDC group CSR: supported voltages in microvolts */ |
| 123 | static const struct regulator_linear_range dcdc_csr_ranges[] = { | 127 | static const struct regulator_linear_range dcdc_csr_ranges[] = { |
| 124 | REGULATOR_LINEAR_RANGE(860000, 2, 50, 10000), | 128 | REGULATOR_LINEAR_RANGE(860000, 2, 50, 10000), |
| @@ -192,6 +196,7 @@ static struct bcm590xx_info bcm590xx_regs[] = { | |||
| 192 | BCM590XX_REG_TABLE(gpldo4, ldo_a_table), | 196 | BCM590XX_REG_TABLE(gpldo4, ldo_a_table), |
| 193 | BCM590XX_REG_TABLE(gpldo5, ldo_a_table), | 197 | BCM590XX_REG_TABLE(gpldo5, ldo_a_table), |
| 194 | BCM590XX_REG_TABLE(gpldo6, ldo_a_table), | 198 | BCM590XX_REG_TABLE(gpldo6, ldo_a_table), |
| 199 | BCM590XX_REG_TABLE(vbus, ldo_vbus), | ||
| 195 | }; | 200 | }; |
| 196 | 201 | ||
| 197 | struct bcm590xx_reg { | 202 | struct bcm590xx_reg { |
diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index b982f0ff4e01..93b4ad842901 100644 --- a/drivers/regulator/palmas-regulator.c +++ b/drivers/regulator/palmas-regulator.c | |||
| @@ -325,6 +325,10 @@ static int palmas_set_mode_smps(struct regulator_dev *dev, unsigned int mode) | |||
| 325 | if (rail_enable) | 325 | if (rail_enable) |
| 326 | palmas_smps_write(pmic->palmas, | 326 | palmas_smps_write(pmic->palmas, |
| 327 | palmas_regs_info[id].ctrl_addr, reg); | 327 | palmas_regs_info[id].ctrl_addr, reg); |
| 328 | |||
| 329 | /* Switch the enable value to ensure this is used for enable */ | ||
| 330 | pmic->desc[id].enable_val = pmic->current_reg_mode[id]; | ||
| 331 | |||
| 328 | return 0; | 332 | return 0; |
| 329 | } | 333 | } |
| 330 | 334 | ||
| @@ -964,6 +968,14 @@ static int palmas_regulators_probe(struct platform_device *pdev) | |||
| 964 | return ret; | 968 | return ret; |
| 965 | pmic->current_reg_mode[id] = reg & | 969 | pmic->current_reg_mode[id] = reg & |
| 966 | PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK; | 970 | PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK; |
| 971 | |||
| 972 | pmic->desc[id].enable_reg = | ||
| 973 | PALMAS_BASE_TO_REG(PALMAS_SMPS_BASE, | ||
| 974 | palmas_regs_info[id].ctrl_addr); | ||
| 975 | pmic->desc[id].enable_mask = | ||
| 976 | PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK; | ||
| 977 | /* set_mode overrides this value */ | ||
| 978 | pmic->desc[id].enable_val = SMPS_CTRL_MODE_ON; | ||
| 967 | } | 979 | } |
| 968 | 980 | ||
| 969 | pmic->desc[id].type = REGULATOR_VOLTAGE; | 981 | pmic->desc[id].type = REGULATOR_VOLTAGE; |
diff --git a/drivers/regulator/tps65218-regulator.c b/drivers/regulator/tps65218-regulator.c index 69b4b7750410..9effe48c605e 100644 --- a/drivers/regulator/tps65218-regulator.c +++ b/drivers/regulator/tps65218-regulator.c | |||
| @@ -209,7 +209,7 @@ static const struct regulator_desc regulators[] = { | |||
| 209 | 1, -1, -1, TPS65218_REG_ENABLE1, | 209 | 1, -1, -1, TPS65218_REG_ENABLE1, |
| 210 | TPS65218_ENABLE1_DC6_EN, NULL, NULL, 0, 0), | 210 | TPS65218_ENABLE1_DC6_EN, NULL, NULL, 0, 0), |
| 211 | TPS65218_REGULATOR("LDO1", TPS65218_LDO_1, tps65218_ldo1_dcdc34_ops, 64, | 211 | TPS65218_REGULATOR("LDO1", TPS65218_LDO_1, tps65218_ldo1_dcdc34_ops, 64, |
| 212 | TPS65218_REG_CONTROL_DCDC4, | 212 | TPS65218_REG_CONTROL_LDO1, |
| 213 | TPS65218_CONTROL_LDO1_MASK, TPS65218_REG_ENABLE2, | 213 | TPS65218_CONTROL_LDO1_MASK, TPS65218_REG_ENABLE2, |
| 214 | TPS65218_ENABLE2_LDO1_EN, NULL, ldo1_dcdc3_ranges, | 214 | TPS65218_ENABLE2_LDO1_EN, NULL, ldo1_dcdc3_ranges, |
| 215 | 2, 0), | 215 | 2, 0), |
| @@ -240,6 +240,7 @@ static int tps65218_regulator_probe(struct platform_device *pdev) | |||
| 240 | config.init_data = init_data; | 240 | config.init_data = init_data; |
| 241 | config.driver_data = tps; | 241 | config.driver_data = tps; |
| 242 | config.regmap = tps->regmap; | 242 | config.regmap = tps->regmap; |
| 243 | config.of_node = pdev->dev.of_node; | ||
| 243 | 244 | ||
| 244 | rdev = devm_regulator_register(&pdev->dev, ®ulators[id], &config); | 245 | rdev = devm_regulator_register(&pdev->dev, ®ulators[id], &config); |
| 245 | if (IS_ERR(rdev)) { | 246 | if (IS_ERR(rdev)) { |
