lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 7 Aug 2023 14:42:29 +0100
From:   Andre Przywara <andre.przywara@....com>
To:     Rob Herring <robh@...nel.org>
Cc:     Lee Jones <lee@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>,
        Chen-Yu Tsai <wens@...e.org>, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, Icenowy Zheng <uwu@...nowy.me>,
        Shengyu Qu <wiagn233@...look.com>,
        Martin Botka <martin.botka@...ainline.org>,
        Martin Botka <martin@...u3d.com>,
        Mark Brown <broonie@...nel.org>
Subject: Re: [PATCH] dt-bindings: mfd: x-powers,axp152: make interrupt
 optional for more chips

On Fri, 4 Aug 2023 09:34:32 -0600
Rob Herring <robh@...nel.org> wrote:

Hi,

> On Wed, Aug 02, 2023 at 03:18:29PM +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 an IRQ pin setup for some
> > chips already, so update the binding to also make the DT property
> > optional for these chips, so that we can actually have DTs describing
> > boards with the PMIC interrupt not wired up.
> > 
> > Signed-off-by: Andre Przywara <andre.przywara@....com>
> > ---
> > Hi,
> > 
> > arguably the IRQ functionality is optional for many more PMICs,
> > especially if a board doesn't use GPIOs or a power key.
> > So I wonder if the interrupts property should become optional for all?
> > After all it's more a board designer's decision to wire up the IRQ pin
> > or not, and nothing that's really related to a particular PMIC.  
> 
> I would say yes. Particularly if it gets rid of a conditional schema.

I see your point, and we might get there, but after some digging extending
this to more/all PMICs needs more work, see below.
Given that I was wondering if we can merge this patch now, as this
blocks multiple DTs from being merged (and Connor already ACKed it).
I sent an MFD driver fix to make this actually work for the AXP313a:
https://lore.kernel.org/lkml/20230807133930.94309-1-andre.przywara@arm.com/

For supporting this on more PMICs:
Currently many Linux (sub-)drivers registered by the MFD driver crash when
there is no valid interrupt registered, and we so far just special cased
the very simple PMICs to skip just the power key driver registration,
which works for those chips. However this affects more drivers (I tested
ac-power-supply), so it's not clear if that's really something useful for
the other PMICs providing more functionality. I guess we can postpone this
until either there is actually a use case for those other PMICs (boards
without the IRQ line connected), or when this list of exceptions grows too
large.

Cheers,
Andre

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ