More HID BPF Functionality & New Drivers For Linux 6.11
Upstreamed to the mainline Linux kernel last year was HID BPF as a means of more easily shipping new drivers and in particular quirks/workarounds for different HID devices. This allows for some nice continued innovations around (e)BPF within the Linux kernel. With Linux 6.11 there is yet more HID BPF capabilities to be upstreamed as well as new drivers.
Within 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 a Huion Inspiroy 2S (H641P) driver:
There's also a new BPF program for supporting the XP-PEN Deco Mini 4.
A BPF program for the Huion Dial 2.
Lastly of the HID BPF code at the moment is a BPF program for the Thrustmaster TCA Yoke Boeing joystick.
Great seeing all the work on HID BPF beginning to pan out for the Linux kernel.
Within 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 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 supporting the XP-PEN Deco Mini 4.
A BPF program for the Huion Dial 2.
Lastly of the HID BPF code at the moment is a BPF program for the Thrustmaster TCA Yoke Boeing joystick.
Great seeing all the work on HID BPF beginning to pan out for the Linux kernel.
3 Comments