Re: [PATCH 09/21] input: gpio-keys: make legacy gpiolib optional
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2025-08-11 19:21:56
Also in:
linux-gpio, lkml
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2025-08-11 19:21:56
Also in:
linux-gpio, lkml
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:quoted
On 08/08/2025 18:17, Arnd Bergmann wrote:...quoted
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