]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
HID: bpf: Add support for the Waltop Batteryless Tablet
authorBenjamin Tissoires <bentiss@kernel.org>
Tue, 18 Nov 2025 17:16:26 +0000 (18:16 +0100)
committerJiri Kosina <jkosina@suse.com>
Thu, 20 Nov 2025 15:45:58 +0000 (16:45 +0100)
commit040adbe80135af3de7d924ea39db4bfabf57b66f
treea9a8a3b946bae2af00827c881814443b8efbca75
parent029dff1c31c488e85c666d5e7e992700cd57462b
HID: bpf: Add support for the Waltop Batteryless Tablet

Several bugs as outlined in udev-hid-bpf#66 and udev-hid-bpf!198:
- pressure curve is far from linear
- tilt range is ±60, not ±127
- pressing the second button sets both tip down and
  barrel switch

Fix the second button by adding a Secondary Barrel Switch in the
existing padding and check for the tip down/barrel switch down combo.
When  both values become true at the same time, set the Secondary Barrel
Switch instead.

Implement a custom pressure curve that maps the hardware range 0-102
linearly to the logical range 0-1224, and maps the hardware range
103-2047 logarithmically to the logical range 1232-2047. This mapping
isn’t perfect, but it’s way more natural than the stock configuration.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Jan Felix Langenbach <JanFelix.Langenbach@protonmail.com>
Link: https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/-/merge_requests/200
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/bpf/progs/WALTOP__Batteryless-Tablet.bpf.c [new file with mode: 0644]