aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2012-11-26 10:42:14 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-11-27 15:17:01 -0500
commit9997f3ffbbcde01bcd5966eeb26bc41243715021 (patch)
treeef5150327fd009710f913fbd4d8184b4eaf4c2bb /drivers
parent7bde76726fa296defc0eafc602284a7676817348 (diff)
regulator: tps51632: Fix writing to wrong register when enable_pwm_dvfs is set
When tps->enable_pwm_dvfs is true, write to TPS51632_VOLTAGE_BASE_REG rather than TPS51632_VOLTAGE_SELECT_REG. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/regulator/tps51632-regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/tps51632-regulator.c b/drivers/regulator/tps51632-regulator.c
index 34603640d6d9..e88bfe48303a 100644
--- a/drivers/regulator/tps51632-regulator.c
+++ b/drivers/regulator/tps51632-regulator.c
@@ -128,7 +128,7 @@ static int tps51632_dcdc_set_voltage_sel(struct regulator_dev *rdev,
128 if (vsel > TPS51632_MAX_VSEL) 128 if (vsel > TPS51632_MAX_VSEL)
129 return -EINVAL; 129 return -EINVAL;
130 130
131 ret = regmap_write(tps->regmap, TPS51632_VOLTAGE_SELECT_REG, vsel); 131 ret = regmap_write(tps->regmap, reg, vsel);
132 if (ret < 0) 132 if (ret < 0)
133 dev_err(tps->dev, "reg write failed, err %d\n", ret); 133 dev_err(tps->dev, "reg write failed, err %d\n", ret);
134 return ret; 134 return ret;