Re: [PATCH v4 3/5] Input: hynitron-cst816x: release gesture keys
From: Oleh Kuzhylnyi
Date: Mon Oct 12 2026 - 14:59:09 EST
On Mon Oct 5, 2026 at 11:11 PM CEST, Daniel Golle wrote:
> The gesture key is reported with the value of the touch flag, so it
> stays pressed once the controller stops reporting the gesture code
> while the finger is still down. Report the press on its own and
> release the keys the input core still holds down on the first report
> that carries no gesture code. Report a key only for the gesture codes
> the binding names: the controller also sends codes such as single
> click, and the index fallback aliased those onto the long-press
> keycode. Keycodes above KEY_MAX are rejected, as that release looks
> the key state up in the input core's key bitmap.
>
> Fixes: c87a819bec86 ("Input: add driver for Hynitron CST816x series")
> Signed-off-by: Daniel Golle <daniel@xxxxxxxxxxxxxx>
> ---
> v4:
> - map only the documented gesture codes to keys, as single click
> aliased onto the long-press keycode (Oleh Kuzhylnyi)
> - read each keycode once in the release loop, so the key it tests is
> the key it releases (Sashiko AI review)
> v2:
> - reject keycodes above KEY_MAX and publish keycodemax only once the
> whole array validates (Sashiko AI review)
>
> drivers/input/touchscreen/hynitron-cst816x.c | 87 +++++++++++++-------
> 1 file changed, 55 insertions(+), 32 deletions(-)
>
Tested on Raspberry Pi 4B with CST816S panel.
Reported coordinates and gestures are valid.
Thank you!
Tested-by: Oleh Kuzhylnyi <kuzhylol@xxxxxxxxx>
Best regards,
Oleh Kuzhylnyi