Re: [PATCH v4 4/5] Input: hynitron-cst816x: time out gesture key release
From: Oleh Kuzhylnyi
Date: Mon Oct 12 2026 - 15:09:21 EST
On Mon Oct 5, 2026 at 11:12 PM CEST, Daniel Golle wrote:
> The controller reports a gesture code once and can then stay quiet
> until the next touch, which leaves the gesture key pressed for as long
> as the panel is left alone. Release the gesture keys 40 ms after the
> last report that carried a gesture code, so that the release comes
> from whichever happens first, the timeout or a report without a
> gesture code. The 40 ms matches TSC200X_PENUP_TIME_MS, chosen there
> for the same want of a lift event from the controller, and has to stay
> above the interval between consecutive reports of a held gesture.
>
> Signed-off-by: Daniel Golle <daniel@xxxxxxxxxxxxxx>
> ---
> v4: follow the keycode lookup and the single read of patch 3
> v3: use timer_shutdown_sync() in the devres teardown action
> (Sashiko AI review)
> v2: skip the release when the interrupt handler re-armed the timer
> while the timer callback waited for the lock (Sashiko AI review)
>
> drivers/input/touchscreen/hynitron-cst816x.c | 52 ++++++++++++++++++--
> 1 file changed, 49 insertions(+), 3 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