From: Axel Lin Date: Mon, 26 Nov 2012 15:42:14 +0000 (+0800) Subject: regulator: tps51632: Fix writing to wrong register when enable_pwm_dvfs is set X-Git-Tag: v3.8-rc1~129^2~8^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9997f3ffbbcde01bcd5966eeb26bc41243715021;p=profile%2Fivi%2Fkernel-x86-ivi.git 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 Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/tps51632-regulator.c b/drivers/regulator/tps51632-regulator.c index 3460364..e88bfe4 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, 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;