diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-03-28 03:01:48 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-04-01 06:59:40 -0400 |
commit | 509cbf848c9b1cb18a424beed732829bc04e7b06 (patch) | |
tree | 481cb995f0d3289fed6223f2cf4692ef1ce182dc /drivers/regulator/88pm8607.c | |
parent | 4ca1e1d9e15b99529e55860677fe39b791b88920 (diff) |
regulator: Convert 88pm8607 to get_voltage_sel
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Tested-by: Jett Zhou <jtzhou@marvell.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/88pm8607.c')
-rw-r--r-- | drivers/regulator/88pm8607.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c index 7fafff23ec43..11e5ddd7e796 100644 --- a/drivers/regulator/88pm8607.c +++ b/drivers/regulator/88pm8607.c | |||
@@ -246,7 +246,7 @@ static int pm8607_set_voltage_sel(struct regulator_dev *rdev, unsigned selector) | |||
246 | return ret; | 246 | return ret; |
247 | } | 247 | } |
248 | 248 | ||
249 | static int pm8607_get_voltage(struct regulator_dev *rdev) | 249 | static int pm8607_get_voltage_sel(struct regulator_dev *rdev) |
250 | { | 250 | { |
251 | struct pm8607_regulator_info *info = rdev_get_drvdata(rdev); | 251 | struct pm8607_regulator_info *info = rdev_get_drvdata(rdev); |
252 | uint8_t val, mask; | 252 | uint8_t val, mask; |
@@ -259,7 +259,7 @@ static int pm8607_get_voltage(struct regulator_dev *rdev) | |||
259 | mask = (rdev->desc->n_voltages - 1) << info->vol_shift; | 259 | mask = (rdev->desc->n_voltages - 1) << info->vol_shift; |
260 | val = ((unsigned char)ret & mask) >> info->vol_shift; | 260 | val = ((unsigned char)ret & mask) >> info->vol_shift; |
261 | 261 | ||
262 | return pm8607_list_voltage(rdev, val); | 262 | return val; |
263 | } | 263 | } |
264 | 264 | ||
265 | static int pm8607_enable(struct regulator_dev *rdev) | 265 | static int pm8607_enable(struct regulator_dev *rdev) |
@@ -294,7 +294,7 @@ static int pm8607_is_enabled(struct regulator_dev *rdev) | |||
294 | static struct regulator_ops pm8607_regulator_ops = { | 294 | static struct regulator_ops pm8607_regulator_ops = { |
295 | .list_voltage = pm8607_list_voltage, | 295 | .list_voltage = pm8607_list_voltage, |
296 | .set_voltage_sel = pm8607_set_voltage_sel, | 296 | .set_voltage_sel = pm8607_set_voltage_sel, |
297 | .get_voltage = pm8607_get_voltage, | 297 | .get_voltage_sel = pm8607_get_voltage_sel, |
298 | .enable = pm8607_enable, | 298 | .enable = pm8607_enable, |
299 | .disable = pm8607_disable, | 299 | .disable = pm8607_disable, |
300 | .is_enabled = pm8607_is_enabled, | 300 | .is_enabled = pm8607_is_enabled, |