Re: [PATCH v7 8/9] Input: axp20x-pek: Add AXP192 support
From: Dmitry Torokhov
Date: Sat Dec 05 2026 - 23:44:52 EST
On Sun, Dec 06, 2026 at 04:09:00AM +0100, Molnár Máté via B4 Relay wrote:
> From: Molnár Máté <matemolnar88@xxxxxxxxx>
>
> The AXP192 has no rising/falling edge interrupts for the power key.
> It only raises short-press and long-press events, after the key has
> been released. Add an axp192-pek variant that reports each of those as
> a complete press, so userspace sees a normal KEY_POWER press/release.
>
> Set the variant info before the input device is registered, as the
> interrupt handler now uses it.
>
> Signed-off-by: Molnár Máté <matemolnar88@xxxxxxxxx>
> ---
> drivers/input/misc/axp20x-pek.c | 29 +++++++++++++++++++++++++++--
> 1 file changed, 27 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/misc/axp20x-pek.c b/drivers/input/misc/axp20x-pek.c
> index a02cdabcf..739da57ca 100644
> --- a/drivers/input/misc/axp20x-pek.c
> +++ b/drivers/input/misc/axp20x-pek.c
> @@ -35,6 +35,11 @@ struct axp20x_info {
> unsigned int startup_mask;
> const struct axp20x_time *shutdown_time;
> unsigned int shutdown_mask;
> + /*
> + * The PMIC only reports short and long presses after the button is
> + * released, not the edges, so each event is a complete press.
> + */
> + bool press_events_only;
Does it still register 2 interrupts?
Thanks.
--
Dmitry