diff options
-rw-r--r-- | drivers/regulator/axp20x-regulator.c | 12 | ||||
-rw-r--r-- | drivers/regulator/da9063-regulator.c | 2 | ||||
-rw-r--r-- | drivers/regulator/gpio-regulator.c | 2 | ||||
-rw-r--r-- | drivers/regulator/s2mps11.c | 28 | ||||
-rw-r--r-- | include/linux/mfd/samsung/s2mps11.h | 2 |
5 files changed, 36 insertions, 10 deletions
diff --git a/drivers/regulator/axp20x-regulator.c b/drivers/regulator/axp20x-regulator.c index 40cd894e4df5..514a5e8fdbab 100644 --- a/drivers/regulator/axp20x-regulator.c +++ b/drivers/regulator/axp20x-regulator.c | |||
@@ -157,7 +157,9 @@ static struct regulator_ops axp20x_ops_sw = { | |||
157 | static const struct regulator_linear_range axp20x_ldo4_ranges[] = { | 157 | static const struct regulator_linear_range axp20x_ldo4_ranges[] = { |
158 | REGULATOR_LINEAR_RANGE(1250000, 0x0, 0x0, 0), | 158 | REGULATOR_LINEAR_RANGE(1250000, 0x0, 0x0, 0), |
159 | REGULATOR_LINEAR_RANGE(1300000, 0x1, 0x8, 100000), | 159 | REGULATOR_LINEAR_RANGE(1300000, 0x1, 0x8, 100000), |
160 | REGULATOR_LINEAR_RANGE(2500000, 0x9, 0xf, 100000), | 160 | REGULATOR_LINEAR_RANGE(2500000, 0x9, 0x9, 0), |
161 | REGULATOR_LINEAR_RANGE(2700000, 0xa, 0xb, 100000), | ||
162 | REGULATOR_LINEAR_RANGE(3000000, 0xc, 0xf, 100000), | ||
161 | }; | 163 | }; |
162 | 164 | ||
163 | static const struct regulator_desc axp20x_regulators[] = { | 165 | static const struct regulator_desc axp20x_regulators[] = { |
@@ -215,10 +217,14 @@ static const struct regulator_desc axp22x_regulators[] = { | |||
215 | AXP22X_ELDO2_V_OUT, 0x1f, AXP22X_PWR_OUT_CTRL2, BIT(1)), | 217 | AXP22X_ELDO2_V_OUT, 0x1f, AXP22X_PWR_OUT_CTRL2, BIT(1)), |
216 | AXP_DESC(AXP22X, ELDO3, "eldo3", "eldoin", 700, 3300, 100, | 218 | AXP_DESC(AXP22X, ELDO3, "eldo3", "eldoin", 700, 3300, 100, |
217 | AXP22X_ELDO3_V_OUT, 0x1f, AXP22X_PWR_OUT_CTRL2, BIT(2)), | 219 | AXP22X_ELDO3_V_OUT, 0x1f, AXP22X_PWR_OUT_CTRL2, BIT(2)), |
218 | AXP_DESC_IO(AXP22X, LDO_IO0, "ldo_io0", "ips", 1800, 3300, 100, | 220 | /* Note the datasheet only guarantees reliable operation up to |
221 | * 3.3V, this needs to be enforced via dts provided constraints */ | ||
222 | AXP_DESC_IO(AXP22X, LDO_IO0, "ldo_io0", "ips", 700, 3800, 100, | ||
219 | AXP22X_LDO_IO0_V_OUT, 0x1f, AXP20X_GPIO0_CTRL, 0x07, | 223 | AXP22X_LDO_IO0_V_OUT, 0x1f, AXP20X_GPIO0_CTRL, 0x07, |
220 | AXP22X_IO_ENABLED, AXP22X_IO_DISABLED), | 224 | AXP22X_IO_ENABLED, AXP22X_IO_DISABLED), |
221 | AXP_DESC_IO(AXP22X, LDO_IO1, "ldo_io1", "ips", 1800, 3300, 100, | 225 | /* Note the datasheet only guarantees reliable operation up to |
226 | * 3.3V, this needs to be enforced via dts provided constraints */ | ||
227 | AXP_DESC_IO(AXP22X, LDO_IO1, "ldo_io1", "ips", 700, 3800, 100, | ||
222 | AXP22X_LDO_IO1_V_OUT, 0x1f, AXP20X_GPIO1_CTRL, 0x07, | 228 | AXP22X_LDO_IO1_V_OUT, 0x1f, AXP20X_GPIO1_CTRL, 0x07, |
223 | AXP22X_IO_ENABLED, AXP22X_IO_DISABLED), | 229 | AXP22X_IO_ENABLED, AXP22X_IO_DISABLED), |
224 | AXP_DESC_FIXED(AXP22X, RTC_LDO, "rtc_ldo", "ips", 3000), | 230 | AXP_DESC_FIXED(AXP22X, RTC_LDO, "rtc_ldo", "ips", 3000), |
diff --git a/drivers/regulator/da9063-regulator.c b/drivers/regulator/da9063-regulator.c index ed9e7e96f877..c6af343f54ea 100644 --- a/drivers/regulator/da9063-regulator.c +++ b/drivers/regulator/da9063-regulator.c | |||
@@ -900,4 +900,4 @@ module_exit(da9063_regulator_cleanup); | |||
900 | MODULE_AUTHOR("Krystian Garbaciak <krystian.garbaciak@diasemi.com>"); | 900 | MODULE_AUTHOR("Krystian Garbaciak <krystian.garbaciak@diasemi.com>"); |
901 | MODULE_DESCRIPTION("DA9063 regulators driver"); | 901 | MODULE_DESCRIPTION("DA9063 regulators driver"); |
902 | MODULE_LICENSE("GPL"); | 902 | MODULE_LICENSE("GPL"); |
903 | MODULE_ALIAS("paltform:" DA9063_DRVNAME_REGULATORS); | 903 | MODULE_ALIAS("platform:" DA9063_DRVNAME_REGULATORS); |
diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c index a8718e98674a..83e89e5d4752 100644 --- a/drivers/regulator/gpio-regulator.c +++ b/drivers/regulator/gpio-regulator.c | |||
@@ -162,6 +162,8 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np, | |||
162 | of_property_read_u32(np, "startup-delay-us", &config->startup_delay); | 162 | of_property_read_u32(np, "startup-delay-us", &config->startup_delay); |
163 | 163 | ||
164 | config->enable_gpio = of_get_named_gpio(np, "enable-gpio", 0); | 164 | config->enable_gpio = of_get_named_gpio(np, "enable-gpio", 0); |
165 | if (config->enable_gpio == -EPROBE_DEFER) | ||
166 | return ERR_PTR(-EPROBE_DEFER); | ||
165 | 167 | ||
166 | /* Fetch GPIOs. - optional property*/ | 168 | /* Fetch GPIOs. - optional property*/ |
167 | ret = of_gpio_count(np); | 169 | ret = of_gpio_count(np); |
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c index d24e2c783dc5..6dfa3502e1f1 100644 --- a/drivers/regulator/s2mps11.c +++ b/drivers/regulator/s2mps11.c | |||
@@ -308,7 +308,7 @@ static struct regulator_ops s2mps11_buck_ops = { | |||
308 | .enable_mask = S2MPS11_ENABLE_MASK \ | 308 | .enable_mask = S2MPS11_ENABLE_MASK \ |
309 | } | 309 | } |
310 | 310 | ||
311 | #define regulator_desc_s2mps11_buck6_10(num, min, step) { \ | 311 | #define regulator_desc_s2mps11_buck67810(num, min, step) { \ |
312 | .name = "BUCK"#num, \ | 312 | .name = "BUCK"#num, \ |
313 | .id = S2MPS11_BUCK##num, \ | 313 | .id = S2MPS11_BUCK##num, \ |
314 | .ops = &s2mps11_buck_ops, \ | 314 | .ops = &s2mps11_buck_ops, \ |
@@ -324,6 +324,22 @@ static struct regulator_ops s2mps11_buck_ops = { | |||
324 | .enable_mask = S2MPS11_ENABLE_MASK \ | 324 | .enable_mask = S2MPS11_ENABLE_MASK \ |
325 | } | 325 | } |
326 | 326 | ||
327 | #define regulator_desc_s2mps11_buck9 { \ | ||
328 | .name = "BUCK9", \ | ||
329 | .id = S2MPS11_BUCK9, \ | ||
330 | .ops = &s2mps11_buck_ops, \ | ||
331 | .type = REGULATOR_VOLTAGE, \ | ||
332 | .owner = THIS_MODULE, \ | ||
333 | .min_uV = MIN_3000_MV, \ | ||
334 | .uV_step = STEP_25_MV, \ | ||
335 | .n_voltages = S2MPS11_BUCK9_N_VOLTAGES, \ | ||
336 | .ramp_delay = S2MPS11_RAMP_DELAY, \ | ||
337 | .vsel_reg = S2MPS11_REG_B9CTRL2, \ | ||
338 | .vsel_mask = S2MPS11_BUCK9_VSEL_MASK, \ | ||
339 | .enable_reg = S2MPS11_REG_B9CTRL1, \ | ||
340 | .enable_mask = S2MPS11_ENABLE_MASK \ | ||
341 | } | ||
342 | |||
327 | static const struct regulator_desc s2mps11_regulators[] = { | 343 | static const struct regulator_desc s2mps11_regulators[] = { |
328 | regulator_desc_s2mps11_ldo(1, STEP_25_MV), | 344 | regulator_desc_s2mps11_ldo(1, STEP_25_MV), |
329 | regulator_desc_s2mps11_ldo(2, STEP_50_MV), | 345 | regulator_desc_s2mps11_ldo(2, STEP_50_MV), |
@@ -368,11 +384,11 @@ static const struct regulator_desc s2mps11_regulators[] = { | |||
368 | regulator_desc_s2mps11_buck1_4(3), | 384 | regulator_desc_s2mps11_buck1_4(3), |
369 | regulator_desc_s2mps11_buck1_4(4), | 385 | regulator_desc_s2mps11_buck1_4(4), |
370 | regulator_desc_s2mps11_buck5, | 386 | regulator_desc_s2mps11_buck5, |
371 | regulator_desc_s2mps11_buck6_10(6, MIN_600_MV, STEP_6_25_MV), | 387 | regulator_desc_s2mps11_buck67810(6, MIN_600_MV, STEP_6_25_MV), |
372 | regulator_desc_s2mps11_buck6_10(7, MIN_600_MV, STEP_6_25_MV), | 388 | regulator_desc_s2mps11_buck67810(7, MIN_600_MV, STEP_6_25_MV), |
373 | regulator_desc_s2mps11_buck6_10(8, MIN_600_MV, STEP_6_25_MV), | 389 | regulator_desc_s2mps11_buck67810(8, MIN_600_MV, STEP_6_25_MV), |
374 | regulator_desc_s2mps11_buck6_10(9, MIN_3000_MV, STEP_25_MV), | 390 | regulator_desc_s2mps11_buck9, |
375 | regulator_desc_s2mps11_buck6_10(10, MIN_750_MV, STEP_12_5_MV), | 391 | regulator_desc_s2mps11_buck67810(10, MIN_750_MV, STEP_12_5_MV), |
376 | }; | 392 | }; |
377 | 393 | ||
378 | static struct regulator_ops s2mps14_reg_ops; | 394 | static struct regulator_ops s2mps14_reg_ops; |
diff --git a/include/linux/mfd/samsung/s2mps11.h b/include/linux/mfd/samsung/s2mps11.h index b288965e8101..2c14eeca46f0 100644 --- a/include/linux/mfd/samsung/s2mps11.h +++ b/include/linux/mfd/samsung/s2mps11.h | |||
@@ -173,10 +173,12 @@ enum s2mps11_regulators { | |||
173 | 173 | ||
174 | #define S2MPS11_LDO_VSEL_MASK 0x3F | 174 | #define S2MPS11_LDO_VSEL_MASK 0x3F |
175 | #define S2MPS11_BUCK_VSEL_MASK 0xFF | 175 | #define S2MPS11_BUCK_VSEL_MASK 0xFF |
176 | #define S2MPS11_BUCK9_VSEL_MASK 0x1F | ||
176 | #define S2MPS11_ENABLE_MASK (0x03 << S2MPS11_ENABLE_SHIFT) | 177 | #define S2MPS11_ENABLE_MASK (0x03 << S2MPS11_ENABLE_SHIFT) |
177 | #define S2MPS11_ENABLE_SHIFT 0x06 | 178 | #define S2MPS11_ENABLE_SHIFT 0x06 |
178 | #define S2MPS11_LDO_N_VOLTAGES (S2MPS11_LDO_VSEL_MASK + 1) | 179 | #define S2MPS11_LDO_N_VOLTAGES (S2MPS11_LDO_VSEL_MASK + 1) |
179 | #define S2MPS11_BUCK_N_VOLTAGES (S2MPS11_BUCK_VSEL_MASK + 1) | 180 | #define S2MPS11_BUCK_N_VOLTAGES (S2MPS11_BUCK_VSEL_MASK + 1) |
181 | #define S2MPS11_BUCK9_N_VOLTAGES (S2MPS11_BUCK9_VSEL_MASK + 1) | ||
180 | #define S2MPS11_RAMP_DELAY 25000 /* uV/us */ | 182 | #define S2MPS11_RAMP_DELAY 25000 /* uV/us */ |
181 | 183 | ||
182 | #define S2MPS11_CTRL1_PWRHOLD_MASK BIT(4) | 184 | #define S2MPS11_CTRL1_PWRHOLD_MASK BIT(4) |