diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-04-20 12:36:14 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-04-20 15:05:13 +0200 |
commit | b9b49af5efa405f3c394a6395e79092c785999a3 (patch) | |
tree | c6dec65f57d4e9311272646a202b432dcca98d29 /drivers/regulator/max8952.c | |
parent | regulator: tps6507x: Convert to get_voltage_sel (diff) | |
download | linux-b9b49af5efa405f3c394a6395e79092c785999a3.tar.xz linux-b9b49af5efa405f3c394a6395e79092c785999a3.zip |
regulator: max8952: Convert to get_voltage_sel
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/max8952.c')
-rw-r--r-- | drivers/regulator/max8952.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/regulator/max8952.c b/drivers/regulator/max8952.c index c0ab4ddc1023..62ae140d8d9f 100644 --- a/drivers/regulator/max8952.c +++ b/drivers/regulator/max8952.c @@ -69,11 +69,6 @@ static int max8952_write_reg(struct max8952_data *max8952, return i2c_smbus_write_byte_data(max8952->client, reg, value); } -static int max8952_voltage(struct max8952_data *max8952, u8 mode) -{ - return (max8952->pdata->dvs_mode[mode] * 10 + 770) * 1000; -} - static int max8952_list_voltage(struct regulator_dev *rdev, unsigned int selector) { @@ -82,7 +77,7 @@ static int max8952_list_voltage(struct regulator_dev *rdev, if (rdev_get_id(rdev) != 0) return -EINVAL; - return max8952_voltage(max8952, selector); + return (max8952->pdata->dvs_mode[selector] * 10 + 770) * 1000; } static int max8952_is_enabled(struct regulator_dev *rdev) @@ -117,7 +112,7 @@ static int max8952_disable(struct regulator_dev *rdev) return 0; } -static int max8952_get_voltage(struct regulator_dev *rdev) +static int max8952_get_voltage_sel(struct regulator_dev *rdev) { struct max8952_data *max8952 = rdev_get_drvdata(rdev); u8 vid = 0; @@ -127,7 +122,7 @@ static int max8952_get_voltage(struct regulator_dev *rdev) if (max8952->vid1) vid += 2; - return max8952_voltage(max8952, vid); + return vid; } static int max8952_set_voltage_sel(struct regulator_dev *rdev, @@ -154,7 +149,7 @@ static struct regulator_ops max8952_ops = { .is_enabled = max8952_is_enabled, .enable = max8952_enable, .disable = max8952_disable, - .get_voltage = max8952_get_voltage, + .get_voltage_sel = max8952_get_voltage_sel, .set_voltage_sel = max8952_set_voltage_sel, .set_suspend_disable = max8952_disable, }; |