diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-03-05 06:12:43 +0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-03-05 06:12:43 +0400 |
commit | 8870d4029acda2666700bb5fd94d46b143f92ec4 (patch) | |
tree | e61977854bbb595d84c5a63022b9c7f1d8c38bed /drivers | |
parent | b2d60949242d63a9571213761b043871c1b0e49e (diff) | |
parent | 6949fbe5b2d7b73dfeddeb470a56385ca36b4827 (diff) | |
download | linux-8870d4029acda2666700bb5fd94d46b143f92ec4.tar.xz |
Merge remote-tracking branch 'regulator/fix/twl' into tmp
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/regulator/twl-regulator.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index 74508cc62d67..f705d25b437c 100644 --- a/drivers/regulator/twl-regulator.c +++ b/drivers/regulator/twl-regulator.c @@ -471,24 +471,23 @@ twl4030ldo_set_voltage_sel(struct regulator_dev *rdev, unsigned selector) selector); } -static int twl4030ldo_get_voltage(struct regulator_dev *rdev) +static int twl4030ldo_get_voltage_sel(struct regulator_dev *rdev) { struct twlreg_info *info = rdev_get_drvdata(rdev); - int vsel = twlreg_read(info, TWL_MODULE_PM_RECEIVER, - VREG_VOLTAGE); + int vsel = twlreg_read(info, TWL_MODULE_PM_RECEIVER, VREG_VOLTAGE); if (vsel < 0) return vsel; vsel &= info->table_len - 1; - return LDO_MV(info->table[vsel]) * 1000; + return vsel; } static struct regulator_ops twl4030ldo_ops = { .list_voltage = twl4030ldo_list_voltage, .set_voltage_sel = twl4030ldo_set_voltage_sel, - .get_voltage = twl4030ldo_get_voltage, + .get_voltage_sel = twl4030ldo_get_voltage_sel, .enable = twl4030reg_enable, .disable = twl4030reg_disable, |