regulator: axp20x: fix DCDC5 and DCDC6 for AXP803
Refactoring of axp20x driver introduced a bug in AXP803's DCDC6 regulator definition. AXP803_DCDC6_1120mV_STEPS was obtained by subtracting 0x47 and 0x33. This should be 0x14 (hex) and not 14 (dec). Refactoring also carried over a bug in DCDC5 regulator definition. Number of possible voltages must be for 1 bigger than maximum valid voltage index, because 0 is also valid and it means lowest voltage. Fixes:1dbe0ccb06
("regulator: axp20x-regulator: add support for AXP803") Fixes:db4a555f7c
("regulator: axp20x: use defines for masks") Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Link: https://lore.kernel.org/r/20190713090717.347-3-jernej.skrabec@siol.net Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
1ef55fed92
commit
8f46e22b5a
|
@ -174,14 +174,14 @@
|
|||
#define AXP803_DCDC5_1140mV_STEPS 35
|
||||
#define AXP803_DCDC5_1140mV_END \
|
||||
(AXP803_DCDC5_1140mV_START + AXP803_DCDC5_1140mV_STEPS)
|
||||
#define AXP803_DCDC5_NUM_VOLTAGES 68
|
||||
#define AXP803_DCDC5_NUM_VOLTAGES 69
|
||||
|
||||
#define AXP803_DCDC6_600mV_START 0x00
|
||||
#define AXP803_DCDC6_600mV_STEPS 50
|
||||
#define AXP803_DCDC6_600mV_END \
|
||||
(AXP803_DCDC6_600mV_START + AXP803_DCDC6_600mV_STEPS)
|
||||
#define AXP803_DCDC6_1120mV_START 0x33
|
||||
#define AXP803_DCDC6_1120mV_STEPS 14
|
||||
#define AXP803_DCDC6_1120mV_STEPS 20
|
||||
#define AXP803_DCDC6_1120mV_END \
|
||||
(AXP803_DCDC6_1120mV_START + AXP803_DCDC6_1120mV_STEPS)
|
||||
#define AXP803_DCDC6_NUM_VOLTAGES 72
|
||||
|
|
Loading…
Reference in New Issue