[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <mrqxggv7vhclnranoc3uacfyzccod6dmc54kip4f7wjdpngjzz@falnsjwnfcjc>
Date: Mon, 11 Aug 2025 12:21:51 -0700
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Matti Vaittinen <mazziesaccount@...il.com>,
Arnd Bergmann <arnd@...nel.org>, Bartosz Golaszewski <brgl@...ev.pl>,
Linus Walleij <linus.walleij@...aro.org>, linux-gpio@...r.kernel.org, Lee Jones <lee@...nel.org>,
Arnd Bergmann <arnd@...db.de>, Gatien Chevallier <gatien.chevallier@...s.st.com>,
Fabrice Gasnier <fabrice.gasnier@...s.st.com>, Bartosz Golaszewski <bartosz.golaszewski@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>, Charles Keepax <ckeepax@...nsource.cirrus.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>, Christophe JAILLET <christophe.jaillet@...adoo.fr>,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 09/21] input: gpio-keys: make legacy gpiolib optional
On Mon, Aug 11, 2025 at 03:52:19PM +0300, Andy Shevchenko wrote:
> On Mon, Aug 11, 2025 at 01:34:43PM +0300, Matti Vaittinen wrote:
> > On 08/08/2025 18:17, Arnd Bergmann wrote:
>
> ...
>
> > As such, this patch seems Ok to me, you can treat this as an ack :) This,
> > however made me ponder following - is this the tight way to handle the
> > power-button IRQ? I don't see any other MFD devices doing this in same way,
> > although I am pretty sure there are other PMICs with similar power-button
> > IRQ...
> >
> > I see for example the "drivers/mfd/rt5120.c" to invoke
> > "drivers/input/misc/rt5120-pwrkey.c" instead of using the gpio-keys. This,
> > however, feels like code duplication to me. I'd rather kept using the
> > gpio-keys, but seeing:
> >
> > git grep KEY_POWER drivers/mfd/
> > drivers/mfd/rohm-bd71828.c: .code = KEY_POWER,
> > drivers/mfd/rohm-bd718x7.c: .code = KEY_POWER,
> >
> > makes me wonder if there is more widely used (better) way?
>
> FWIW, on Intel platforms that use power button by PMIC we add a special driver
> for each of such cases.
If we can make gpio-keys work for various power buttons that would be
great IMO. The MFD drivers in question already are using device tree,
but they do not define/expect nodes for the power buttons. If the nodes
were there then I think gpio-keys would work out of the box?
Thanks.
--
Dmitry
Powered by blists - more mailing lists