mbox series

[v3,0/2] mfd: axp20x: improve support without interrupts

Message ID 20230919103913.463156-1-andre.przywara@arm.com
Headers show
Series mfd: axp20x: improve support without interrupts | expand

Message

Andre Przywara Sept. 19, 2023, 10:39 a.m. UTC
This is a more of a re-send, rebased on top of v6.6-rc2, with the tags
added, and adding back the binding patch, since this seems to have fallen
through the cracks somehow.
Changelog below.
------------------------------

Every AXP PMIC we support sports an IRQ pin, that signals certain events
to the SoC. For some of the chip's functionality an interrupt is crucial
for operation (for instance a power key event), but for the basic
regulator features for instance the interrupt does not add much.

Recently we started seeing boards with smaller PMICs, that don't bother
to connect the IRQ line to anything. So far we handled this as a special
case for the AXP305, but there are more examples now that justify a more
general solution.

Patch 1/2 adds more PMICs to the list of chips for which the interrupts
DT property is optional: this is needed to correctly describe some newer
boards without the IRQ pin connected.
Ideally we would make this optional for every PMIC, but it is unclear
whether this is a good idea: many older the "bigger" PMICs have multiple
MFD devices that require an interrupt, so not having interrupt
functionality might not be feasible for their operation. Also so far all
boards with those PMICs connect the IRQ pin, so there is no immediate
need for such a relaxation.

Patch 2/2 then generalises the "no interrupt specified" case in the MFD
driver, as this was special cased for two PMIC models so far. This
allows boards with an AXP313a to not specify an IRQ line: there are
actually multiple boards relying on this out there.

Cheers,
Andre

Changelog v3 ... v2:
- rebased on top of v6.6-rc2
- add back binding patch
- tags added

Changelog v2 ... v1:
- drop reordering approach, use separate cell lists instead

Andre Przywara (2):
  dt-bindings: mfd: x-powers,axp152: make interrupt optional for more
    chips
  mfd: axp20x: Generalise handling without interrupt

 .../bindings/mfd/x-powers,axp152.yaml         |  5 ++-
 drivers/mfd/axp20x.c                          | 44 ++++++++++---------
 2 files changed, 28 insertions(+), 21 deletions(-)

Comments

Lee Jones Sept. 28, 2023, 1:46 p.m. UTC | #1
On Tue, 19 Sep 2023 11:39:12 +0100, Andre Przywara wrote:
> All X-Powers PMICs described by this binding have an IRQ pin, and so
> far (almost) all boards connected this to some NMI pin or GPIO on the SoC
> they are connected to.
> However we start to see boards that omit this connection, and technically
> the IRQ pin is not essential to the basic PMIC operation.
> 
> The existing Linux driver allows skipping the IRQ pin setup for two chips
> already, so update the binding to also make the DT property optional for
> the missing chip. And while we are at it, add the AXP313a to that list,
> as they are actually boards out there not connecting the IRQ pin.
> 
> [...]

Applied, thanks!

[1/2] dt-bindings: mfd: x-powers,axp152: make interrupt optional for more chips
      commit: cf71329eb3a37f90c8ddec0651dc7b3fa76036c1

--
Lee Jones [李琼斯]