Commit 9997f3ff authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

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: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 7bde7672
...@@ -128,7 +128,7 @@ static int tps51632_dcdc_set_voltage_sel(struct regulator_dev *rdev, ...@@ -128,7 +128,7 @@ static int tps51632_dcdc_set_voltage_sel(struct regulator_dev *rdev,
if (vsel > TPS51632_MAX_VSEL) if (vsel > TPS51632_MAX_VSEL)
return -EINVAL; return -EINVAL;
ret = regmap_write(tps->regmap, TPS51632_VOLTAGE_SELECT_REG, vsel); ret = regmap_write(tps->regmap, reg, vsel);
if (ret < 0) if (ret < 0)
dev_err(tps->dev, "reg write failed, err %d\n", ret); dev_err(tps->dev, "reg write failed, err %d\n", ret);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment