]> Gentwo Git Trees - linux/.git/commit
HID: bpf: add heuristics to the Huion Inspiroy 2S eraser button
authorBenjamin Tissoires <bentiss@kernel.org>
Tue, 18 Nov 2025 17:16:29 +0000 (18:16 +0100)
committerJiri Kosina <jkosina@suse.com>
Thu, 20 Nov 2025 15:45:59 +0000 (16:45 +0100)
commit5e3e8f1b44e420800f62c993878bf6ad43adb038
tree8a642ffea8888e487218f4166f30e338286231ec
parent88b5468f2cc564d532999c2fa068e158f5123691
HID: bpf: add heuristics to the Huion Inspiroy 2S eraser button

When pressing the phsyical eraser button (remapped by us to the
Secondary Barrel Switch) while the tip is down, the device
gives us several false reports with a Tip Switch 0:

         press|           |release
SBS: [0 0 ... 1 1 1 ... 1 0 0 0 0 0 0 ...]
 TS: [1 1 ... 1 0 1 ... 1 1 0 0 0 1 1 ...]

In both press/release the number of Tip Switch 0 reports can be up to 4
and *sometimes* the Tip Switch is released in the same report
as the button press/release event.

Paper over this by forcing the tip down for a few reports if it was down
before the button toggled.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Link: https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/-/merge_requests/195
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/bpf/progs/Huion__Inspiroy-2-S.bpf.c