Re: [PATCH 1/2] regulator: axp20x: fix DCDCA and DCDCD for AXP806
From: Jernej Åkrabec
Date: Sat Jul 06 2019 - 08:53:43 EST
Dne sobota, 06. julij 2019 ob 13:21:44 CEST je Mark Brown napisal(a):
> On Sat, Jul 06, 2019 at 12:05:44PM +0200, Jernej Skrabec wrote:
> > Refactoring of the driver introduced few bugs in AXP806's DCDCA and
> > DCDCD regulator definitions.
> This is not a great changelog - what are the bugs and how does
> this patch fix them?
In case of DCDCA, number of steps for second range should be 20 (0x14), but it
was set to 14. So I guess patch author missed "0x". Currently, math doesn't
work, because sum of both number of steps plus 2 must be equal to number of
Same error is present in AXP803 DCDC6 regulator.
In case of DCDCD, array of ranges (axp806_dcdcd_ranges) contains two ranges,
which use same start and end macros. By checking datasheet or just checking
macros at the top of the source file, it's obvious that "1" is missing in
second range macro names (1600 instead of 600).
And I think I found another bug, AXP803_DCDC5_NUM_VOLTAGES should be 69 and
not 68. However, this bug was present before refactoring, refactoring just
carried it over.