summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/max8998.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-20 09:22:19 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-20 09:22:19 -0800
commit8909ff652ddfc83ecdf450f96629c25489d88f77 (patch)
tree01023e82481e027b7454e97ac2500d214b6cff08 /drivers/regulator/max8998.c
parent88cff241596f29122e9125a41b20d21dfed873cd (diff)
parent2730fd82cbb922e6be8df08ba32c21be41757d3d (diff)
Merge tag 'regulator-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown: "A fairly quiet release for the regulator API, the bulk of the changes being lots of small cleanups and API updates contributed by Axel Lin with just a small set of larger changes: - New driver for LP8755 - DT support for S5M8767, TPS51632, TPS6507x and TPS65090 - Support for writing a "commit changes" bit in the regmap helper functions." * tag 'regulator-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (60 commits) regulator: Fix memory garbage dev_err printout. regulator: max77686: Reuse rdev_get_id() function. regulator: tps51632: Use regulator_[get|set]_voltage_sel_regmap regulator: as3711: Fix checking if no platform initialization data regulator: s5m8767: Prevent possible NULL pointer dereference regulator: s5m8767: Fix dev argument for devm_kzalloc and of_get_regulator_init_data regulator: core: Optimize _regulator_do_set_voltage if voltage does not change regulator: max8998: Let regulator core handle the case selector == old_selector regulator: s5m8767: Use of_get_child_count() regulator: anatop: improve precision of delay time regulator: show state for GPIO-controlled regulators regulator: s5m8767: Fix build in non-DT case regulator: add device tree support for s5m8767 regulator: palmas: Remove a redundant setting for warm_reset regulator: mc13xxx: Use of_get_child_count() regulator: max8997: Use of_get_child_count() regulator: tps65090: Fix using wrong dev argument for calling of_regulator_match regulators: anatop: add set_voltage_time_sel interface regulator: Add missing of_node_put() regulator: tps6507x: Fix using wrong dev argument for calling of_regulator_match ...
Diffstat (limited to 'drivers/regulator/max8998.c')
-rw-r--r--drivers/regulator/max8998.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/regulator/max8998.c b/drivers/regulator/max8998.c
index 0a8dd1cbee6..b588f07c7ca 100644
--- a/drivers/regulator/max8998.c
+++ b/drivers/regulator/max8998.c
@@ -311,25 +311,13 @@ static int max8998_set_voltage_buck_sel(struct regulator_dev *rdev,
dev_get_platdata(max8998->iodev->dev);
struct i2c_client *i2c = max8998->iodev->i2c;
int buck = rdev_get_id(rdev);
- int reg, shift = 0, mask, ret;
- int j, previous_sel;
+ int reg, shift = 0, mask, ret, j;
static u8 buck1_last_val;
ret = max8998_get_voltage_register(rdev, &reg, &shift, &mask);
if (ret)
return ret;
- previous_sel = max8998_get_voltage_sel(rdev);
-
- /* Check if voltage needs to be changed */
- /* if previous_voltage equal new voltage, return */
- if (previous_sel == selector) {
- dev_dbg(max8998->dev, "No voltage change, old:%d, new:%d\n",
- regulator_list_voltage_linear(rdev, previous_sel),
- regulator_list_voltage_linear(rdev, selector));
- return ret;
- }
-
switch (buck) {
case MAX8998_BUCK1:
dev_dbg(max8998->dev,