Thread (15 messages) 15 messages, 9 authors, 2025-09-02

Re: [PATCH 09/21] input: gpio-keys: make legacy gpiolib optional

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2025-08-11 12:52:27
Also in: linux-gpio, lkml

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.

-- 
With Best Regards,
Andy Shevchenko

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help