More HID BPF Functionality & New Drivers For Linux 6.11
- Reference: 0001476302
- News link: https://www.phoronix.com/news/Linux-6.11-More-HID-BPF
- Source link:
Within [4]hid.git's for-next branch is a lot of new HID BPF code queued ahead of Linux 6.11. There are new HID BPF helpers and hooks, documentation improvements, and other changes to that core HID BPF code in making the (e)BPF route more capable for HID driver use-cases.
What it means for new HID BPF driver usage in Linux 6.11 is [5]a Huion Inspiroy 2S (H641P) driver :
"This is a a driver for the Huion Inspiroy 2S in both modes (firmware mode and tablet mode). This device has 6 buttons and a wheel, all of which send key combinations (see the comments for the defaults). Luckily the device is quite limited in that it only supports one button down at a time, so with this BPF we can simply remap the 8 possible report IDs to our own custom-built report descriptor.
If the device is in tablet mode (e.g. using huion-switcher it sends everything through the vendor report instead). This BPF program converts both, depending which devices you attach to you get both. Or if you attach to all hid devices you get a duplicate device but it'll work either way.
This BPF should be mostly compatible for the M and L as well though they have more buttons so the rdescs will need some minor rework."
There's also a new BPF program for [6]supporting the XP-PEN Deco Mini 4 .
A BPF program for the [7]Huion Dial 2 .
Lastly of the HID BPF code at the moment is a BPF program for the [8]Thrustmaster TCA Yoke Boeing joystick .
Great seeing all the work on HID BPF beginning to pan out for the Linux kernel.
[1] https://www.phoronix.com/news/Linux-6.3-HID
[2] https://www.phoronix.com/news/HID-eBPF-New-Attempt
[3] https://www.phoronix.com/news/Linux-eBPF-For-HID
[4] https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/log/?h=for-next
[5] https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/commit/?h=for-next&id=09c555faedb855b07d62503e0a4cd8cdf726da20
[6] https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/commit/?h=for-next&id=f03741540dbab48f8a65da44aaadbe04216d9a42
[7] https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/commit/?h=for-next&id=9b52d81115db681efc1f83ded1d572e5b0b4fd49
[8] https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/commit/?h=for-next&id=f58e7f404da44c94e46bfe657b8707195aebd25a
phoronix