diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-05-08 17:19:09 -0400 |
---|---|---|
committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2011-05-27 05:34:37 -0400 |
commit | 7ce8a2a05f249054e6bce109a15ee188b4124256 (patch) | |
tree | 14d57ef66ae6d2f75ca310acf400f83891bc0f9e /drivers/regulator/wm8400-regulator.c | |
parent | 22c51b47aa7cded7e4768540ebbbfddc91e31d90 (diff) |
regulator: Convert WM8400 to get_voltage_sel()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'drivers/regulator/wm8400-regulator.c')
-rw-r--r-- | drivers/regulator/wm8400-regulator.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/regulator/wm8400-regulator.c b/drivers/regulator/wm8400-regulator.c index b42d01cef35a..0f12c70bebc9 100644 --- a/drivers/regulator/wm8400-regulator.c +++ b/drivers/regulator/wm8400-regulator.c | |||
@@ -55,7 +55,7 @@ static int wm8400_ldo_list_voltage(struct regulator_dev *dev, | |||
55 | return 1600000 + ((selector - 14) * 100000); | 55 | return 1600000 + ((selector - 14) * 100000); |
56 | } | 56 | } |
57 | 57 | ||
58 | static int wm8400_ldo_get_voltage(struct regulator_dev *dev) | 58 | static int wm8400_ldo_get_voltage_sel(struct regulator_dev *dev) |
59 | { | 59 | { |
60 | struct wm8400 *wm8400 = rdev_get_drvdata(dev); | 60 | struct wm8400 *wm8400 = rdev_get_drvdata(dev); |
61 | u16 val; | 61 | u16 val; |
@@ -63,7 +63,7 @@ static int wm8400_ldo_get_voltage(struct regulator_dev *dev) | |||
63 | val = wm8400_reg_read(wm8400, WM8400_LDO1_CONTROL + rdev_get_id(dev)); | 63 | val = wm8400_reg_read(wm8400, WM8400_LDO1_CONTROL + rdev_get_id(dev)); |
64 | val &= WM8400_LDO1_VSEL_MASK; | 64 | val &= WM8400_LDO1_VSEL_MASK; |
65 | 65 | ||
66 | return wm8400_ldo_list_voltage(dev, val); | 66 | return val; |
67 | } | 67 | } |
68 | 68 | ||
69 | static int wm8400_ldo_set_voltage(struct regulator_dev *dev, | 69 | static int wm8400_ldo_set_voltage(struct regulator_dev *dev, |
@@ -104,7 +104,7 @@ static struct regulator_ops wm8400_ldo_ops = { | |||
104 | .enable = wm8400_ldo_enable, | 104 | .enable = wm8400_ldo_enable, |
105 | .disable = wm8400_ldo_disable, | 105 | .disable = wm8400_ldo_disable, |
106 | .list_voltage = wm8400_ldo_list_voltage, | 106 | .list_voltage = wm8400_ldo_list_voltage, |
107 | .get_voltage = wm8400_ldo_get_voltage, | 107 | .get_voltage_sel = wm8400_ldo_get_voltage_sel, |
108 | .set_voltage = wm8400_ldo_set_voltage, | 108 | .set_voltage = wm8400_ldo_set_voltage, |
109 | }; | 109 | }; |
110 | 110 | ||
@@ -145,7 +145,7 @@ static int wm8400_dcdc_list_voltage(struct regulator_dev *dev, | |||
145 | return 850000 + (selector * 25000); | 145 | return 850000 + (selector * 25000); |
146 | } | 146 | } |
147 | 147 | ||
148 | static int wm8400_dcdc_get_voltage(struct regulator_dev *dev) | 148 | static int wm8400_dcdc_get_voltage_sel(struct regulator_dev *dev) |
149 | { | 149 | { |
150 | struct wm8400 *wm8400 = rdev_get_drvdata(dev); | 150 | struct wm8400 *wm8400 = rdev_get_drvdata(dev); |
151 | u16 val; | 151 | u16 val; |
@@ -154,7 +154,7 @@ static int wm8400_dcdc_get_voltage(struct regulator_dev *dev) | |||
154 | val = wm8400_reg_read(wm8400, WM8400_DCDC1_CONTROL_1 + offset); | 154 | val = wm8400_reg_read(wm8400, WM8400_DCDC1_CONTROL_1 + offset); |
155 | val &= WM8400_DC1_VSEL_MASK; | 155 | val &= WM8400_DC1_VSEL_MASK; |
156 | 156 | ||
157 | return 850000 + (25000 * val); | 157 | return val; |
158 | } | 158 | } |
159 | 159 | ||
160 | static int wm8400_dcdc_set_voltage(struct regulator_dev *dev, | 160 | static int wm8400_dcdc_set_voltage(struct regulator_dev *dev, |
@@ -261,7 +261,7 @@ static struct regulator_ops wm8400_dcdc_ops = { | |||
261 | .enable = wm8400_dcdc_enable, | 261 | .enable = wm8400_dcdc_enable, |
262 | .disable = wm8400_dcdc_disable, | 262 | .disable = wm8400_dcdc_disable, |
263 | .list_voltage = wm8400_dcdc_list_voltage, | 263 | .list_voltage = wm8400_dcdc_list_voltage, |
264 | .get_voltage = wm8400_dcdc_get_voltage, | 264 | .get_voltage_sel = wm8400_dcdc_get_voltage_sel, |
265 | .set_voltage = wm8400_dcdc_set_voltage, | 265 | .set_voltage = wm8400_dcdc_set_voltage, |
266 | .get_mode = wm8400_dcdc_get_mode, | 266 | .get_mode = wm8400_dcdc_get_mode, |
267 | .set_mode = wm8400_dcdc_set_mode, | 267 | .set_mode = wm8400_dcdc_set_mode, |