aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/ab8500.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-21 13:34:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-21 13:34:56 -0400
commitd15d76448bb58c7832e954b6a8f1e301720b7866 (patch)
tree7891c9e0779f5df33840be9cdba1f0331459e97c /drivers/regulator/ab8500.c
parent0c2fe82a9b106f1c03719783134360586d718a69 (diff)
parent4992fa1fd425f1934f503ffa96b68e235b89db9a (diff)
Merge tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator updates for 3.4 from Mark Brown: "This has been a fairly quiet release from a regulator point of view, the only real framework features added were devm support and a convenience helper for setting up fixed voltage regulators. We also added a couple of drivers (but will drop the BQ240022 driver via the arm-soc tree as it's been replaced by the more generic gpio-regulator driver) and Axel Lin continued his relentless and generally awesome stream of fixes and cleanups." * tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (93 commits) regulator: Fix up a confusing dev_warn when DT lookup fails regulator: Convert tps6507x to set_voltage_sel regulator: Refactor tps6507x to use one tps6507x_pmic_ops for all LDOs and DCDCs regulator: Make s5m8767_get_voltage_register always return correct register regulator: s5m8767: Check pdata->buck[2|3|4]_gpiodvs earlier regulator: tps65910: Provide settling time for DCDC voltage change regulator: Add Anatop regulator driver regulator: Simplify implementation of tps65912_get_voltage_dcdc regulator: Use tps65912_set_voltage_sel for both DCDCx and LDOx regulator: tps65910: Provide settling time for enabling rails regulator: max8925: Use DIV_ROUND_UP macro regulator: tps65912: Use simple equations to get register address regulator: Fix the logic of tps65910_get_mode regulator: Merge tps65217_pmic_ldo234_ops and tps65217_pmic_dcdc_ops to tps65217_pmic_ops regulator: Use DIV_ROUND_CLOSEST in wm8350_isink_get_current regulator: Use array to store dcdc_range settings for tps65912 regulator: Rename s5m8767_convert_voltage to s5m8767_convert_voltage_to_sel regulator: tps6524x: Remove unneeded comment for N_REGULATORS regulator: Rename set_voltage_sel callback function name to *_sel regulator: Fix s5m8767_set_voltage_time_sel calculation value ...
Diffstat (limited to 'drivers/regulator/ab8500.c')
-rw-r--r--drivers/regulator/ab8500.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index c9b92531ae60..c7ee4c15d6f5 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -201,7 +201,7 @@ static int ab8500_list_voltage(struct regulator_dev *rdev, unsigned selector)
201 return info->voltages[selector]; 201 return info->voltages[selector];
202} 202}
203 203
204static int ab8500_regulator_get_voltage(struct regulator_dev *rdev) 204static int ab8500_regulator_get_voltage_sel(struct regulator_dev *rdev)
205{ 205{
206 int ret, val; 206 int ret, val;
207 struct ab8500_regulator_info *info = rdev_get_drvdata(rdev); 207 struct ab8500_regulator_info *info = rdev_get_drvdata(rdev);
@@ -229,11 +229,9 @@ static int ab8500_regulator_get_voltage(struct regulator_dev *rdev)
229 /* vintcore has a different layout */ 229 /* vintcore has a different layout */
230 val = regval & info->voltage_mask; 230 val = regval & info->voltage_mask;
231 if (info->desc.id == AB8500_LDO_INTCORE) 231 if (info->desc.id == AB8500_LDO_INTCORE)
232 ret = info->voltages[val >> 0x3]; 232 return val >> 0x3;
233 else 233 else
234 ret = info->voltages[val]; 234 return val;
235
236 return ret;
237} 235}
238 236
239static int ab8500_get_best_voltage_index(struct regulator_dev *rdev, 237static int ab8500_get_best_voltage_index(struct regulator_dev *rdev,
@@ -320,7 +318,7 @@ static struct regulator_ops ab8500_regulator_ops = {
320 .enable = ab8500_regulator_enable, 318 .enable = ab8500_regulator_enable,
321 .disable = ab8500_regulator_disable, 319 .disable = ab8500_regulator_disable,
322 .is_enabled = ab8500_regulator_is_enabled, 320 .is_enabled = ab8500_regulator_is_enabled,
323 .get_voltage = ab8500_regulator_get_voltage, 321 .get_voltage_sel = ab8500_regulator_get_voltage_sel,
324 .set_voltage = ab8500_regulator_set_voltage, 322 .set_voltage = ab8500_regulator_set_voltage,
325 .list_voltage = ab8500_list_voltage, 323 .list_voltage = ab8500_list_voltage,
326 .enable_time = ab8500_regulator_enable_time, 324 .enable_time = ab8500_regulator_enable_time,