[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251023205653.468e49d2@kemnade.info>
Date: Thu, 23 Oct 2025 20:56:53 +0200
From: Andreas Kemnade <andreas@...nade.info>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: Lee Jones <lee@...nel.org>, Rob Herring <robh@...nel.org>, Krzysztof
Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, Tony
Lindgren <tony@...mide.com>, Kevin Hilman <khilman@...nel.org>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-input@...r.kernel.org, linux-omap@...r.kernel.org
Subject: Re: [PATCH 2/3] Input: add TWL603x power button
On Wed, 22 Oct 2025 11:48:59 -0700
Dmitry Torokhov <dmitry.torokhov@...il.com> wrote:
> On Wed, Oct 22, 2025 at 02:44:22PM +0200, Andreas Kemnade wrote:
> > On Tue, 21 Oct 2025 10:58:35 -0700
> > Dmitry Torokhov <dmitry.torokhov@...il.com> wrote:
> >
> > > On Mon, Oct 20, 2025 at 02:31:59PM +0200, akemnade@...nel.org wrote:
> > > > From: Andreas Kemnade <andreas@...nade.info>
> > > >
> > > > Like the TWL4030, these PMICs also have a power button feature, so add
> > > > a driver for it.
> > >
> > > Could it be integrated into twl4030-pwrbutton.c? I think the differences
> > > can be accounted for via a "chip" structure attached to a compatible...
> > >
> > So what is different:
> > - different register (but same bit)
> > - some custom irq stuff for 603x (so if (is_603x) needed)
>
> Right, why do we need to unmask the interrupt by hand for 6030? I'd
> expect this handled in the core, when we request the interrupt, not in
> the button driver..in the core, when we request the interrupt, not in
> the button driver...
>
Short answer: irqchip ops do not provide mask/unmask for 6030.
Why... Interrupts are merged. There are 3 irq registers for the whole chip
and some of these 24bits are merged to provide one interrupt per submodule.
Apparently these custom calls are there to enable the merged interrupts
individually or multiple together. That is at least my theory I derived
from my archeology session.
The thing is implemented differently for the twl4030, there you have multiple
irqs per module.
But why two calls here? With one of them the interrupt pad of the pmic reacts
to the interrupt, with the other call, the irq status register does.
So can it all be implemented differently? Probably yes, but things
need to be done carefully or with one cross-subsystem patch changing
everything in lockstep. This somehow itches me for several reasons.
Regards,
Andreas
Powered by blists - more mailing lists