]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
HID: bpf: add first in-tree HID-BPF fix for the XPPen Artist 24
authorBenjamin Tissoires <bentiss@kernel.org>
Wed, 10 Apr 2024 17:19:22 +0000 (19:19 +0200)
committerBenjamin Tissoires <bentiss@kernel.org>
Tue, 7 May 2024 13:38:53 +0000 (15:38 +0200)
commit04b3e5ab055553e074ea54ef316982b55cdde96b
tree48c4349295d9509c46a65491fd522189746c4d18
parent65ad580a14e875c2d8c027cf1a2ca03b849ff843
HID: bpf: add first in-tree HID-BPF fix for the XPPen Artist 24

This commit adds a fix for XPPen Artist 24 where the second button on
the pen is used as an eraser.

It's a "feature" from Microsoft, but it turns out that it's actually
painful for artists. So we ship here a HID-BPF program that turns this
second button into an actual button.

Note that the HID-BPF program is not directly loaded by the kernel itself
but by udev-hid-bpf[0]. But having the sources here allows us to also
integrate tests into tools/testing/selftests/hid to ensure the HID-BPF
program are actually tested.

[0] https://gitlab.freedesktop.org/libevdev/udev-hid-bpf

Link: https://lore.kernel.org/r/20240410-bpf_sources-v1-2-a8bf16033ef8@kernel.org
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
drivers/hid/bpf/progs/Makefile [new file with mode: 0644]
drivers/hid/bpf/progs/README [new file with mode: 0644]
drivers/hid/bpf/progs/XPPen__Artist24.bpf.c [new file with mode: 0644]
drivers/hid/bpf/progs/hid_bpf.h [new file with mode: 0644]
drivers/hid/bpf/progs/hid_bpf_helpers.h [new file with mode: 0644]