Skip to content

Commit

Permalink
regulator: tps51632: Fix writing to wrong register when enable_pwm_dv…
Browse files Browse the repository at this point in the history
…fs 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>
  • Loading branch information
Axel Lin authored and Mark Brown committed Nov 27, 2012
1 parent 7bde767 commit 9997f3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/tps51632-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ static int tps51632_dcdc_set_voltage_sel(struct regulator_dev *rdev,
if (vsel > TPS51632_MAX_VSEL)
return -EINVAL;

ret = regmap_write(tps->regmap, TPS51632_VOLTAGE_SELECT_REG, vsel);
ret = regmap_write(tps->regmap, reg, vsel);
if (ret < 0)
dev_err(tps->dev, "reg write failed, err %d\n", ret);
return ret;
Expand Down

0 comments on commit 9997f3f

Please sign in to comment.