Skip to content

bpf: add a driver for the Huion Inspiroy 2S (H641P)

Peter Hutterer requested to merge whot/udev-hid-bpf:wip/huion-hp641p into main

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.

Edited by Peter Hutterer

Merge request reports