aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>2013-12-10 04:09:43 -0500
committerMark Brown <broonie@linaro.org>2013-12-11 17:48:54 -0500
commit463616ea3f4c4ff27019ffcf8f09a25712c1f4c1 (patch)
tree306e095644ba25d622a4b7d1b88c605d431b8298 /drivers/regulator
parent79b53d199b83a44811cd57091751ef122351ae85 (diff)
regulator: s5m8767: Implement voltage setting for BUCK7/8 regulators
Voltage setting for BUCK7 and BUCK8 was not supported by s5m8767 driver. If they were configured in DTS then the driver probing would fail with EINVAL: [ 0.288474] VCC_SUB_1.35V: failed to apply 1350000uV constraint [ 0.288671] s5m8767-pmic s5m8767-pmic: regulator init failed for 35 [ 0.294931] s5m8767-pmic: probe of s5m8767-pmic failed with error -22 This patch adds support for BUCK7 and BUCK8 regulators using standard regmap get/set voltage sel functions. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/s5m8767.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/regulator/s5m8767.c b/drivers/regulator/s5m8767.c
index ef4da4442fa7..9b14faa3bf91 100644
--- a/drivers/regulator/s5m8767.c
+++ b/drivers/regulator/s5m8767.c
@@ -120,8 +120,8 @@ static const struct sec_voltage_desc *reg_voltage_map[] = {
120 [S5M8767_BUCK4] = &buck_voltage_val2, 120 [S5M8767_BUCK4] = &buck_voltage_val2,
121 [S5M8767_BUCK5] = &buck_voltage_val1, 121 [S5M8767_BUCK5] = &buck_voltage_val1,
122 [S5M8767_BUCK6] = &buck_voltage_val1, 122 [S5M8767_BUCK6] = &buck_voltage_val1,
123 [S5M8767_BUCK7] = NULL, 123 [S5M8767_BUCK7] = &buck_voltage_val3,
124 [S5M8767_BUCK8] = NULL, 124 [S5M8767_BUCK8] = &buck_voltage_val3,
125 [S5M8767_BUCK9] = &buck_voltage_val3, 125 [S5M8767_BUCK9] = &buck_voltage_val3,
126}; 126};
127 127
@@ -418,9 +418,12 @@ static struct regulator_ops s5m8767_ops = {
418}; 418};
419 419
420static struct regulator_ops s5m8767_buck78_ops = { 420static struct regulator_ops s5m8767_buck78_ops = {
421 .list_voltage = regulator_list_voltage_linear,
421 .is_enabled = s5m8767_reg_is_enabled, 422 .is_enabled = s5m8767_reg_is_enabled,
422 .enable = s5m8767_reg_enable, 423 .enable = s5m8767_reg_enable,
423 .disable = s5m8767_reg_disable, 424 .disable = s5m8767_reg_disable,
425 .get_voltage_sel = regulator_get_voltage_sel_regmap,
426 .set_voltage_sel = regulator_set_voltage_sel_regmap,
424}; 427};
425 428
426#define s5m8767_regulator_desc(_name) { \ 429#define s5m8767_regulator_desc(_name) { \