diff options
| author | Mark Brown <broonie@linaro.org> | 2013-09-01 08:50:17 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@linaro.org> | 2013-09-01 08:50:17 -0400 |
| commit | 39fe3b45d3951c3633ddb7aafb29ceef3f012761 (patch) | |
| tree | 5f5c10873cef3dde53d3bbd172151c020b4b8469 | |
| parent | f27a5fb424d4897edd3c7735ecf054ee57a5dbd0 (diff) | |
| parent | 0416ea1359b3f0a8755947f46f336608793a9649 (diff) | |
Merge remote-tracking branch 'regulator/topic/palmas' into regulator-next
| -rw-r--r-- | Documentation/devicetree/bindings/regulator/palmas-pmic.txt | 4 | ||||
| -rw-r--r-- | drivers/regulator/palmas-regulator.c | 30 | ||||
| -rw-r--r-- | include/linux/mfd/palmas.h | 9 |
3 files changed, 31 insertions, 12 deletions
diff --git a/Documentation/devicetree/bindings/regulator/palmas-pmic.txt b/Documentation/devicetree/bindings/regulator/palmas-pmic.txt index 30b0581bb1ce..a22e4c70db5c 100644 --- a/Documentation/devicetree/bindings/regulator/palmas-pmic.txt +++ b/Documentation/devicetree/bindings/regulator/palmas-pmic.txt | |||
| @@ -25,8 +25,8 @@ Optional nodes: | |||
| 25 | Additional custom properties are listed below. | 25 | Additional custom properties are listed below. |
| 26 | 26 | ||
| 27 | For ti,palmas-pmic - smps12, smps123, smps3 depending on OTP, | 27 | For ti,palmas-pmic - smps12, smps123, smps3 depending on OTP, |
| 28 | smps45, smps457, smps7 depending on variant, smps6, smps[8-10], | 28 | smps45, smps457, smps7 depending on variant, smps6, smps[8-9], |
| 29 | ldo[1-9], ldoln, ldousb. | 29 | smps10_out2, smps10_out1, do[1-9], ldoln, ldousb. |
| 30 | 30 | ||
| 31 | Optional sub-node properties: | 31 | Optional sub-node properties: |
| 32 | ti,warm-reset - maintain voltage during warm reset(boolean) | 32 | ti,warm-reset - maintain voltage during warm reset(boolean) |
diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index e8877e4e5a5a..488dfe7ce9a6 100644 --- a/drivers/regulator/palmas-regulator.c +++ b/drivers/regulator/palmas-regulator.c | |||
| @@ -97,11 +97,16 @@ static const struct regs_info palmas_regs_info[] = { | |||
| 97 | .ctrl_addr = PALMAS_SMPS9_CTRL, | 97 | .ctrl_addr = PALMAS_SMPS9_CTRL, |
| 98 | }, | 98 | }, |
| 99 | { | 99 | { |
| 100 | .name = "SMPS10", | 100 | .name = "SMPS10_OUT2", |
| 101 | .sname = "smps10-in", | 101 | .sname = "smps10-in", |
| 102 | .ctrl_addr = PALMAS_SMPS10_CTRL, | 102 | .ctrl_addr = PALMAS_SMPS10_CTRL, |
| 103 | }, | 103 | }, |
| 104 | { | 104 | { |
| 105 | .name = "SMPS10_OUT1", | ||
| 106 | .sname = "smps10-out2", | ||
| 107 | .ctrl_addr = PALMAS_SMPS10_CTRL, | ||
| 108 | }, | ||
| 109 | { | ||
| 105 | .name = "LDO1", | 110 | .name = "LDO1", |
| 106 | .sname = "ldo1-in", | 111 | .sname = "ldo1-in", |
| 107 | .vsel_addr = PALMAS_LDO1_VOLTAGE, | 112 | .vsel_addr = PALMAS_LDO1_VOLTAGE, |
| @@ -487,6 +492,8 @@ static struct regulator_ops palmas_ops_smps10 = { | |||
| 487 | .set_voltage_sel = regulator_set_voltage_sel_regmap, | 492 | .set_voltage_sel = regulator_set_voltage_sel_regmap, |
| 488 | .list_voltage = regulator_list_voltage_linear, | 493 | .list_voltage = regulator_list_voltage_linear, |
| 489 | .map_voltage = regulator_map_voltage_linear, | 494 | .map_voltage = regulator_map_voltage_linear, |
| 495 | .set_bypass = regulator_set_bypass_regmap, | ||
| 496 | .get_bypass = regulator_get_bypass_regmap, | ||
| 490 | }; | 497 | }; |
| 491 | 498 | ||
| 492 | static int palmas_is_enabled_ldo(struct regulator_dev *dev) | 499 | static int palmas_is_enabled_ldo(struct regulator_dev *dev) |
| @@ -538,7 +545,8 @@ static int palmas_smps_init(struct palmas *palmas, int id, | |||
| 538 | return ret; | 545 | return ret; |
| 539 | 546 | ||
| 540 | switch (id) { | 547 | switch (id) { |
| 541 | case PALMAS_REG_SMPS10: | 548 | case PALMAS_REG_SMPS10_OUT1: |
| 549 | case PALMAS_REG_SMPS10_OUT2: | ||
| 542 | reg &= ~PALMAS_SMPS10_CTRL_MODE_SLEEP_MASK; | 550 | reg &= ~PALMAS_SMPS10_CTRL_MODE_SLEEP_MASK; |
| 543 | if (reg_init->mode_sleep) | 551 | if (reg_init->mode_sleep) |
| 544 | reg |= reg_init->mode_sleep << | 552 | reg |= reg_init->mode_sleep << |
| @@ -681,7 +689,8 @@ static struct of_regulator_match palmas_matches[] = { | |||
| 681 | { .name = "smps7", }, | 689 | { .name = "smps7", }, |
| 682 | { .name = "smps8", }, | 690 | { .name = "smps8", }, |
| 683 | { .name = "smps9", }, | 691 | { .name = "smps9", }, |
| 684 | { .name = "smps10", }, | 692 | { .name = "smps10_out2", }, |
| 693 | { .name = "smps10_out1", }, | ||
| 685 | { .name = "ldo1", }, | 694 | { .name = "ldo1", }, |
| 686 | { .name = "ldo2", }, | 695 | { .name = "ldo2", }, |
| 687 | { .name = "ldo3", }, | 696 | { .name = "ldo3", }, |
| @@ -838,7 +847,8 @@ static int palmas_regulators_probe(struct platform_device *pdev) | |||
| 838 | continue; | 847 | continue; |
| 839 | ramp_delay_support = true; | 848 | ramp_delay_support = true; |
| 840 | break; | 849 | break; |
| 841 | case PALMAS_REG_SMPS10: | 850 | case PALMAS_REG_SMPS10_OUT1: |
| 851 | case PALMAS_REG_SMPS10_OUT2: | ||
| 842 | if (!PALMAS_PMIC_HAS(palmas, SMPS10_BOOST)) | 852 | if (!PALMAS_PMIC_HAS(palmas, SMPS10_BOOST)) |
| 843 | continue; | 853 | continue; |
| 844 | } | 854 | } |
| @@ -872,7 +882,8 @@ static int palmas_regulators_probe(struct platform_device *pdev) | |||
| 872 | pmic->desc[id].id = id; | 882 | pmic->desc[id].id = id; |
| 873 | 883 | ||
| 874 | switch (id) { | 884 | switch (id) { |
| 875 | case PALMAS_REG_SMPS10: | 885 | case PALMAS_REG_SMPS10_OUT1: |
| 886 | case PALMAS_REG_SMPS10_OUT2: | ||
| 876 | pmic->desc[id].n_voltages = PALMAS_SMPS10_NUM_VOLTAGES; | 887 | pmic->desc[id].n_voltages = PALMAS_SMPS10_NUM_VOLTAGES; |
| 877 | pmic->desc[id].ops = &palmas_ops_smps10; | 888 | pmic->desc[id].ops = &palmas_ops_smps10; |
| 878 | pmic->desc[id].vsel_reg = | 889 | pmic->desc[id].vsel_reg = |
| @@ -882,7 +893,14 @@ static int palmas_regulators_probe(struct platform_device *pdev) | |||
| 882 | pmic->desc[id].enable_reg = | 893 | pmic->desc[id].enable_reg = |
| 883 | PALMAS_BASE_TO_REG(PALMAS_SMPS_BASE, | 894 | PALMAS_BASE_TO_REG(PALMAS_SMPS_BASE, |
| 884 | PALMAS_SMPS10_CTRL); | 895 | PALMAS_SMPS10_CTRL); |
| 885 | pmic->desc[id].enable_mask = SMPS10_BOOST_EN; | 896 | if (id == PALMAS_REG_SMPS10_OUT1) |
| 897 | pmic->desc[id].enable_mask = SMPS10_SWITCH_EN; | ||
| 898 | else | ||
| 899 | pmic->desc[id].enable_mask = SMPS10_BOOST_EN; | ||
| 900 | pmic->desc[id].bypass_reg = | ||
| 901 | PALMAS_BASE_TO_REG(PALMAS_SMPS_BASE, | ||
| 902 | PALMAS_SMPS10_CTRL); | ||
| 903 | pmic->desc[id].bypass_mask = SMPS10_BYPASS_EN; | ||
| 886 | pmic->desc[id].min_uV = 3750000; | 904 | pmic->desc[id].min_uV = 3750000; |
| 887 | pmic->desc[id].uV_step = 1250000; | 905 | pmic->desc[id].uV_step = 1250000; |
| 888 | break; | 906 | break; |
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h index 1a8dd7afe084..c06d78af3342 100644 --- a/include/linux/mfd/palmas.h +++ b/include/linux/mfd/palmas.h | |||
| @@ -160,7 +160,8 @@ enum palmas_regulators { | |||
| 160 | PALMAS_REG_SMPS7, | 160 | PALMAS_REG_SMPS7, |
| 161 | PALMAS_REG_SMPS8, | 161 | PALMAS_REG_SMPS8, |
| 162 | PALMAS_REG_SMPS9, | 162 | PALMAS_REG_SMPS9, |
| 163 | PALMAS_REG_SMPS10, | 163 | PALMAS_REG_SMPS10_OUT2, |
| 164 | PALMAS_REG_SMPS10_OUT1, | ||
| 164 | /* LDO regulators */ | 165 | /* LDO regulators */ |
| 165 | PALMAS_REG_LDO1, | 166 | PALMAS_REG_LDO1, |
| 166 | PALMAS_REG_LDO2, | 167 | PALMAS_REG_LDO2, |
| @@ -355,9 +356,9 @@ struct palmas_pmic { | |||
| 355 | int smps123; | 356 | int smps123; |
| 356 | int smps457; | 357 | int smps457; |
| 357 | 358 | ||
| 358 | int range[PALMAS_REG_SMPS10]; | 359 | int range[PALMAS_REG_SMPS10_OUT1]; |
| 359 | unsigned int ramp_delay[PALMAS_REG_SMPS10]; | 360 | unsigned int ramp_delay[PALMAS_REG_SMPS10_OUT1]; |
| 360 | unsigned int current_reg_mode[PALMAS_REG_SMPS10]; | 361 | unsigned int current_reg_mode[PALMAS_REG_SMPS10_OUT1]; |
| 361 | }; | 362 | }; |
| 362 | 363 | ||
| 363 | struct palmas_resource { | 364 | struct palmas_resource { |
