Skip to content

Commit

Permalink
regulator: 88pm8607: Fix writting value to vol_reg in pm8607_set_volt…
Browse files Browse the repository at this point in the history
…age_sel

commit 4ca1e1d "regulator: Convert 88pm8607 to set_voltage_sel" accidentally
changed the value writing to vol_reg.
What we want is to write val instead of selector to vol_reg.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Axel Lin authored and Mark Brown committed Apr 19, 2012
1 parent a81edbd commit a67f7e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/88pm8607.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ static int pm8607_set_voltage_sel(struct regulator_dev *rdev, unsigned selector)
val = (uint8_t)(selector << info->vol_shift);
mask = (rdev->desc->n_voltages - 1) << info->vol_shift;

ret = pm860x_set_bits(info->i2c, info->vol_reg, mask, selector);
ret = pm860x_set_bits(info->i2c, info->vol_reg, mask, val);
if (ret)
return ret;
switch (info->desc.id) {
Expand Down

0 comments on commit a67f7e6

Please sign in to comment.