regulator: axp20x: Use linear voltage ranges for AXP20X LDO4
authorChen-Yu Tsai <wens@csie.org>
Tue, 2 Feb 2016 10:27:38 +0000 (18:27 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 3 Feb 2016 17:15:08 +0000 (17:15 +0000)
commit13d57e64352a5d3457d7782bc2f8b576e12b05f3
treedce9306bb52b66a8dc70e1310bd5b9595e77b0c4
parent94c39041ae0c0e83d10bc1a56974a2eefd9386c8
regulator: axp20x: Use linear voltage ranges for AXP20X LDO4

AXP20X datasheet lists the possible voltage settings for LDO4, so
it was implemented using a voltage table. Upon closer examination,
the valid voltages can be mapped into 3 linear ranges.

Move AXP20X LDO4 to use linear ranges. The supporting code can be
reused with later AXP8xx PMICs, which have a number of regulators
that have 2 linear ranges.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/axp20x-regulator.c