]> www.infradead.org Git - users/dwmw2/linux.git/commit
regulator: axp20x: fix DCDCA and DCDCD for AXP806
authorJernej Skrabec <jernej.skrabec@siol.net>
Sat, 13 Jul 2019 09:07:16 +0000 (11:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Aug 2019 06:29:46 +0000 (08:29 +0200)
commit7a2ec3fbdcb1f9bef5e55ba311584e083d77273e
treec39467a25e90e3d2e089b21f29d657d169a56e2f
parent3861684475d5e7726024de0014aba62d6e37fe4d
regulator: axp20x: fix DCDCA and DCDCD for AXP806

[ Upstream commit 1ef55fed9219963359a7b3bc7edca8517c6e45ac ]

Refactoring of the driver introduced bugs in AXP806's DCDCA and DCDCD
regulator definitions.

In DCDCA case, AXP806_DCDCA_1120mV_STEPS was obtained by subtracting
0x47 and 0x33. This should be 0x14 (hex) and not 14 (dec).

In DCDCD case, axp806_dcdcd_ranges[] contains two ranges with same
start and end macros, which is clearly wrong. Second range starts at
1.6V so it should use AXP806_DCDCD_1600mV_[START|END] macros. They are
already defined but unused.

Fixes: db4a555f7c4c ("regulator: axp20x: use defines for masks")
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Link: https://lore.kernel.org/r/20190713090717.347-2-jernej.skrabec@siol.net
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/regulator/axp20x-regulator.c