To have legacy xf86-input-wacom accepting the pad of the Huion tablets,
we need to set some bits on the Pad interface even if they are not used.
The following bits are activated:
- ABS_MISC -> Digitizers | 0xff
- ABS_X -> Generic Desktop | X
- ABS_Y -> Generic Desktop | Y
- BTN_STYLUS -> Digitizers | Barrel Switch
(because the Pad used to be a attached to the stylus interface, libwacom
and others expect the Pad to look like a tablet)
Not having the xf86-input-wacom driver handling the pad is not a
regression, so there is no absolute need for it upstream.
Plus, a device should not export axes it does not have.
It however makes sense to include this in the digimend-kernel-tree drivers
given that the purpose is to have users try the drivers with their current
setup.
Note that if we add the BTN_RUBBER capability to the Pen interface,
gnome-control-center happily takes the device. However, this will break
users who have updated libwacom to current master, so better not export
such false capability.
---
changes in v2:
- tweak the exported PAD report descriptor, not the .input_configured() callback
hid-uclogic.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/hid-uclogic.c b/hid-uclogic.c
index cca77d8..c362ebd 100644
--- a/hid-uclogic.c
+++ b/hid-uclogic.c
@@ -630,6 +630,23 @@ static const __u8 uclogic_buttonpad_rdesc[] = {
0x29, 0x08, /* Usage Maximum (08h), */
0x95, 0x08, /* Report Count (8), */
0x81, 0x02, /* Input (Variable), */
+ 0x05, 0x0D, /* Usage Page (Digitizers), */
+ 0x09, 0x20, /* Usage (Stylus), */
+ 0x14, /* Logical Minimum (0), */
+ 0x25, 0x01, /* Logical Maximum (1), */
+ 0x09, 0x44, /* Usage (Barrel Switch), */
+ 0x95, 0x01, /* Report Count (1), */
+ 0x81, 0x02, /* Input (Data,Var,Abs), */
+ 0x05, 0x01, /* Usage Page (Generic Desktop), */
+ 0x09, 0x30, /* Usage (X), */
+ 0x09, 0x31, /* Usage (Y), */
+ 0x95, 0x02, /* Report Count (2), */
+ 0x81, 0x02, /* Input (Data,Var,Abs), */
+ 0x05, 0x0D, /* Usage Page (Digitizers), */
+ 0x09, 0xFF, /* Usage (Vendor Usage 0xff), */
+ 0x75, 0x05, /* Report Size (5), */
+ 0x95, 0x01, /* Report Count (1), */
+ 0x81, 0x02, /* Input (Data,Var,Abs), */
0xC0, /* End Collection */
0xC0 /* End Collection */
};
--
2.3.1
|