diff options
Diffstat (limited to 'drivers/regulator/twl-regulator.c')
-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) | |||
471 | selector); | 471 | selector); |
472 | } | 472 | } |
473 | 473 | ||
474 | static int twl4030ldo_get_voltage(struct regulator_dev *rdev) | 474 | static int twl4030ldo_get_voltage_sel(struct regulator_dev *rdev) |
475 | { | 475 | { |
476 | struct twlreg_info *info = rdev_get_drvdata(rdev); | 476 | struct twlreg_info *info = rdev_get_drvdata(rdev); |
477 | int vsel = twlreg_read(info, TWL_MODULE_PM_RECEIVER, | 477 | int vsel = twlreg_read(info, TWL_MODULE_PM_RECEIVER, VREG_VOLTAGE); |
478 | VREG_VOLTAGE); | ||
479 | 478 | ||
480 | if (vsel < 0) | 479 | if (vsel < 0) |
481 | return vsel; | 480 | return vsel; |
482 | 481 | ||
483 | vsel &= info->table_len - 1; | 482 | vsel &= info->table_len - 1; |
484 | return LDO_MV(info->table[vsel]) * 1000; | 483 | return vsel; |
485 | } | 484 | } |
486 | 485 | ||
487 | static struct regulator_ops twl4030ldo_ops = { | 486 | static struct regulator_ops twl4030ldo_ops = { |
488 | .list_voltage = twl4030ldo_list_voltage, | 487 | .list_voltage = twl4030ldo_list_voltage, |
489 | 488 | ||
490 | .set_voltage_sel = twl4030ldo_set_voltage_sel, | 489 | .set_voltage_sel = twl4030ldo_set_voltage_sel, |
491 | .get_voltage = twl4030ldo_get_voltage, | 490 | .get_voltage_sel = twl4030ldo_get_voltage_sel, |
492 | 491 | ||
493 | .enable = twl4030reg_enable, | 492 | .enable = twl4030reg_enable, |
494 | .disable = twl4030reg_disable, | 493 | .disable = twl4030reg_disable, |