diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-21 10:34:56 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-21 10:34:56 -0700 |
commit | d15d76448bb58c7832e954b6a8f1e301720b7866 (patch) | |
tree | 7891c9e0779f5df33840be9cdba1f0331459e97c /drivers/regulator/max8998.c | |
parent | 0c2fe82a9b106f1c03719783134360586d718a69 (diff) | |
parent | 4992fa1fd425f1934f503ffa96b68e235b89db9a (diff) | |
download | linux-d15d76448bb58c7832e954b6a8f1e301720b7866.tar.bz2 |
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/max8998.c')
-rw-r--r-- | drivers/regulator/max8998.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/regulator/max8998.c b/drivers/regulator/max8998.c index 2d38c2493a07..5890265eeacc 100644 --- a/drivers/regulator/max8998.c +++ b/drivers/regulator/max8998.c @@ -112,16 +112,11 @@ static const struct voltage_map_desc *ldo_voltage_map[] = { &buck4_voltage_map_desc, /* BUCK4 */ }; -static inline int max8998_get_ldo(struct regulator_dev *rdev) -{ - return rdev_get_id(rdev); -} - static int max8998_list_voltage(struct regulator_dev *rdev, unsigned int selector) { const struct voltage_map_desc *desc; - int ldo = max8998_get_ldo(rdev); + int ldo = rdev_get_id(rdev); int val; if (ldo >= ARRAY_SIZE(ldo_voltage_map)) @@ -141,7 +136,7 @@ static int max8998_list_voltage(struct regulator_dev *rdev, static int max8998_get_enable_register(struct regulator_dev *rdev, int *reg, int *shift) { - int ldo = max8998_get_ldo(rdev); + int ldo = rdev_get_id(rdev); switch (ldo) { case MAX8998_LDO2 ... MAX8998_LDO5: @@ -222,7 +217,7 @@ static int max8998_ldo_disable(struct regulator_dev *rdev) static int max8998_get_voltage_register(struct regulator_dev *rdev, int *_reg, int *_shift, int *_mask) { - int ldo = max8998_get_ldo(rdev); + int ldo = rdev_get_id(rdev); struct max8998_data *max8998 = rdev_get_drvdata(rdev); int reg, shift = 0, mask = 0xff; @@ -310,7 +305,7 @@ static int max8998_set_voltage_ldo(struct regulator_dev *rdev, struct i2c_client *i2c = max8998->iodev->i2c; int min_vol = min_uV / 1000, max_vol = max_uV / 1000; const struct voltage_map_desc *desc; - int ldo = max8998_get_ldo(rdev); + int ldo = rdev_get_id(rdev); int reg, shift = 0, mask, ret; int i = 0; @@ -362,7 +357,7 @@ static int max8998_set_voltage_buck(struct regulator_dev *rdev, struct i2c_client *i2c = max8998->iodev->i2c; int min_vol = min_uV / 1000, max_vol = max_uV / 1000; const struct voltage_map_desc *desc; - int buck = max8998_get_ldo(rdev); + int buck = rdev_get_id(rdev); int reg, shift = 0, mask, ret; int difference = 0, i = 0, j = 0, previous_vol = 0; u8 val = 0; @@ -829,7 +824,6 @@ static __devinit int max8998_pmic_probe(struct platform_device *pdev) buck12_voltage_map_desc.step*i < (pdata->buck2_voltage2 / 1000)) i++; - printk(KERN_ERR "i2:%d, buck2_idx:%d\n", i, max8998->buck2_idx); max8998->buck2_vol[1] = i; ret = max8998_write_reg(i2c, MAX8998_REG_BUCK2_VOLTAGE2, i); if (ret) |