mfd: axp20x: Generalise handling without interrupt
authorAndre Przywara <andre.przywara@arm.com>
Mon, 28 Aug 2023 21:32:29 +0000 (22:32 +0100)
committerLee Jones <lee@kernel.org>
Wed, 1 Nov 2023 10:02:10 +0000 (10:02 +0000)
commitb2cb2ae22278f1918f7526b89760ee00b4a81393
tree99ec3ac7e02cc82caa0b5e46446af11450bf4460
parent9a41c31e40d867bb4ad93b527b0ba7cfaae4c9c4
mfd: axp20x: Generalise handling without interrupt

At the moment we allow the AXP15060 and the AXP806 PMICs to omit the
interrupt line to the SoC, and we skip registering the PEK (power key)
driver in this case, since that crashes when no IRQ is described in the
DT node.
The IRQ pin potentially not being connected to anything does affect more
PMICs, though, and the PEK driver is not the only one requiring an
interrupt: at least the AC power supply driver crashes in a similar
fashion.

Generalise the handling of AXP MFD devices when the platform tables
describe no interrupt, by allowing each device to specify an alternative
MFD list for this case. If no specific alternative is specified, we go
with the safe default of "just the regulators", which matches the current
situation.

This enables new devices using the AXP313a PMIC, but not connecting the
IRQ pin.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20230828213229.20332-1-andre.przywara@arm.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/axp20x.c