[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z6DL8v9hzkzfH3is@google.com>
Date: Mon, 3 Feb 2025 06:00:18 -0800
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Marian Flor <marian.flor@...teo.net>
Cc: linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] gpio_keys.c: Send also event when EV_ABS axis button
is released
Hi Marian,
On Sat, Feb 01, 2025 at 04:20:15PM +0000, Marian Flor wrote:
> The input EV_ABS does not emit an event when the axis button is
> released. It appears to libevdev as held, even when the axis
> button is physically released. This behavior is also opposing
> to the devicetree documentation for gpio-keys. Change the code
> to additionally emit a zero valued event on axis button release.
This unfortunately will not work: if you have several GPIOs with
progression of values, such as:
GPIO1: EV_ABS/ABS_X/0
GPIO2: EV_ABS/ABS_X/1
GPIO3: EV_ABS/ABS_X/2
GPIO4: EV_ABS/ABS_X/3
You do not want the values to bounce to 0 as they transition from let's
say 1->2.
The "return to 0 as resting point" behavior was originally only supposed
to be valid for the polled variant of gpio keys, but commit fbfb9a60d5d0
("dt-bindings: input: Convert gpio-keys bindings to schema") changed it
without updating the driver. It was an oversight.
To properly implement this behavior you need to scan all other GPIOs
with the same type and code and see if any of them are still active.
Thanks.
--
Dmitry
Powered by blists - more mailing lists