Skip to content

Commit

Permalink
regulator: wm8400: Adjust the equation for selector >= 15 in wm8400_l…
Browse files Browse the repository at this point in the history
…do_list_voltage

Adjust the equation for selector >= 15 for better readability.
The equation "1700000 + ((selector - 15) * 100000)" can be interpreted by:
Starting from selector 15: Steps of 100mV from 1700mV

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 Jun 13, 2012
1 parent df2643c commit 74e20e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/wm8400-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ static int wm8400_ldo_list_voltage(struct regulator_dev *dev,
if (selector < 15)
return 900000 + (selector * 50000);
else
return 1600000 + ((selector - 14) * 100000);
return 1700000 + ((selector - 15) * 100000);
}

static int wm8400_ldo_map_voltage(struct regulator_dev *dev,
Expand Down

0 comments on commit 74e20e5

Please sign in to comment.