HID: bpf: add a v6.11+ compatible BPF fixup for the XPPen ACK05 remote
authorBenjamin Tissoires <bentiss@kernel.org>
Fri, 7 Feb 2025 13:56:03 +0000 (14:56 +0100)
committerBenjamin Tissoires <bentiss@kernel.org>
Mon, 24 Feb 2025 08:25:34 +0000 (09:25 +0100)
commit834da3756f49825d58769a75c279dd2ca3d183ae
treeca386bec4837297e2e7bdc88bda97c123e9886a6
parent4a94deb94994a121d7a7ae21d9860445a14018fc
HID: bpf: add a v6.11+ compatible BPF fixup for the XPPen ACK05 remote

With v6.11+, we can actually call hid_hw_output_report() and put the device
into raw mode, thus getting accurate events without being messed up.

Technically we could do the same on v6.10, but given that wayland, gnome
and KDE are still not capable of handling the dial, and that v6.10 is EOL,
we can safely save a little bit of compilation by only allowing v6.11+.

We can easily export the battery information to userspace by adding a
dedicated report. However, we need to cheat on the kernel to force it
not to query the battery by making the physical collection a stylus. The
kernel will then only rely on the events it gets from the device.

Link: https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/-/merge_requests/133
Acked-by: Jiri Kosina <jkosina@suse.com>
Link: https://patch.msgid.link/20250207-bpf-import-2025-02-07-v1-7-6048fdd5a206@kernel.org
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
drivers/hid/bpf/progs/XPPen__ACK05.bpf.c [new file with mode: 0644]