Re: [PATCH] Input: gpio-keys - add full support of EV_REL and EV_ABS
From: Dmitry Torokhov
Date: Sat Mar 21 2026 - 03:06:40 EST
Hi Xiong,
On Fri, Mar 20, 2026 at 10:52:14PM +0800, Xiong Nandi wrote:
> gpio_keys_gpio_report_event() handled EV_ABS but silently ignored EV_REL,
> while the polled driver supports both. Extend the interrupt-driven driver
> to fire an EV_REL event on button press.
>
> For EV_ABS, use a shared atomic counter per (type, code) pair so that
> a zero-value reset is sent only when the last active button on an axis
> is released, avoiding premature axis resets when multiple buttons share
> the same axis code.
>
> Add gpio_keys_set_abs_params() to call input_set_abs_params() at setup
> time, deriving the axis min/max from the configured button values.
> Without this the input subsystem reports unbounded axis ranges.
Could you please split this out? It looks like there are 2 or 3
logically separate changes.
Thanks.
--
Dmitry