mfd: axp20x: AXP717: Fix missing IRQ status registers range
authorAndre Przywara <andre.przywara@arm.com>
Thu, 13 Jun 2024 23:31:04 +0000 (00:31 +0100)
committerLee Jones <lee@kernel.org>
Fri, 14 Jun 2024 07:43:39 +0000 (08:43 +0100)
commit68f860426d500cfb697b505799244c7dfff604b1
tree0ebaf4d7811b0465ac1691dad6d7c4fb1b513768
parent1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
mfd: axp20x: AXP717: Fix missing IRQ status registers range

While we list the "IRQ status *and acknowledge*" registers as volatile
in the MFD description, they are missing from the writable range array,
so acknowledging any interrupts was met with an -EIO error.
This error propagates up, leading to the whole AXP717 driver failing to
probe, which is fatal to most systems using this PMIC, since most
peripherals refer one of the PMIC voltage rails.
This wasn't noticed on the initial submission, since the interrupt was
completely missing at this point, but the DTs now merged describe the
interrupt, creating the problem.

Add the five registers that hold those bits to the writable array.

This fixes the boot on the Anbernic systems using the AXP717 PMIC.

Fixes: b5bfc8ab2484 ("mfd: axp20x: Add support for AXP717 PMIC")
Reported-by: Chris Morgan <macromorgan@hotmail.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: John Watts <contact@jookia.org>
Link: https://lore.kernel.org/r/20240613233104.17529-1-andre.przywara@arm.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/axp20x.c