All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Marian Flor <marian.flor@posteo.net>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] gpio_keys.c: Send also event when EV_ABS axis button is released
Date: Mon, 3 Feb 2025 06:00:18 -0800	[thread overview]
Message-ID: <Z6DL8v9hzkzfH3is@google.com> (raw)
In-Reply-To: <717e71d6-5114-45ff-aa6b-0bb4a68b6261@posteo.net>

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

      reply	other threads:[~2025-02-03 14:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-01 16:20 [PATCH v2] gpio_keys.c: Send also event when EV_ABS axis button is released Marian Flor
2025-02-03 14:00 ` Dmitry Torokhov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z6DL8v9hzkzfH3is@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marian.flor@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.