HID: uclogic: Add support for XP-PEN Artist 22R Pro
v4 cover HID: uclogic: Add support for XP-PEN Artist 22R Pro
Adds support for the XP-PEN Artist 22R Pro, including stylus, tablet frame and pen pressure.
The tablet has 20 buttons, but need to be remapped in order since the device reports invalid keycodes. Existing tablet functionality should not be inhibited, as BTN0-8 is still used.
New initialization functions are added since the device differs slightly from other UGEE v2 devices.
---
v4 changes:
- Waited 2 years, but I've been using this driver since then without issue. I also removed the old Reported-By, felt weird keeping those considering the wait between patch versions
- Changed some of the cleanup code as suggested
- Rebased onto v6.9-rc7
v3 changes:
- Removed duplicate frame initialization code, overriding the num of frame
buttons instead.
- Removed unnessecary key > 0 check.
- Renamed init function to something more specific to the device.
- Cherry-picked probe magic data patch.
- Rebased onto 6.2-rc6
v2 changes:
- rewrote initialization code to be more concise, and less error-prone, thanks
Dan Carpenter & José Expósito for pointers!
- less struct duplication, it now uses compatiable UGEE v2 ones.
- uclogic_extra_input_mapping is now static, thanks José again!
- straightened out dial transformation, now there's just the two cases and
they're decimal.
- fixed the patch formatting, it should be easier to apply now.
- rebased onto 6.2-rc2
Joshua Goins (1):
HID: uclogic: Add support for XP-PEN Artist 22R Pro
drivers/hid/hid-ids.h | 1 + drivers/hid/hid-uclogic-core.c | 66 +++++++++++++++- drivers/hid/hid-uclogic-params.c | 132 +++++++++++++++++++++++++++++++ drivers/hid/hid-uclogic-params.h | 5 ++ drivers/hid/hid-uclogic-rdesc.c | 44 +++++++++++ drivers/hid/hid-uclogic-rdesc.h | 4 + 6 files changed, 248 insertions(+), 4 deletions(-)
Signature · 1 line
2.49.0
PATCH v4 1/1 HID: uclogic: Add support for XP-PEN Artist 22R Pro
Adds support for the XP-PEN Artist 22R Pro, including stylus, tablet frame and pen pressure.
The tablet has 20 buttons, but need to be remapped in order since the device reports invalid keycodes. Existing tablet functionality should not be inhibited, as BTN0-8 is still used.
New initialization functions are added since the device differs slightly from other UGEE v2 devices.
--- drivers/hid/hid-ids.h | 1 + drivers/hid/hid-uclogic-core.c | 66 +++++++++++++++- drivers/hid/hid-uclogic-params.c | 132 +++++++++++++++++++++++++++++++ drivers/hid/hid-uclogic-params.h | 5 ++ drivers/hid/hid-uclogic-rdesc.c | 44 +++++++++++ drivers/hid/hid-uclogic-rdesc.h | 4 + 6 files changed, 248 insertions(+), 4 deletions(-)
drivers/hid/hid-ids.h +1 -0
@@ -1402,6 +1402,7 @@#define USB_DEVICE_ID_UGEE_XPPEN_TABLET_DECO_PRO_S 0x0909#define USB_DEVICE_ID_UGEE_XPPEN_TABLET_DECO_PRO_SW 0x0933#define USB_DEVICE_ID_UGEE_XPPEN_TABLET_STAR06 0x0078 +#define USB_DEVICE_ID_UGEE_XPPEN_TABLET_22R_PRO 0x091b#define USB_DEVICE_ID_UGEE_TABLET_G5 0x0074#define USB_DEVICE_ID_UGEE_TABLET_EX07S 0x0071#define USB_DEVICE_ID_UGEE_TABLET_RAINBOW_CV720 0x0055
drivers/hid/hid-uclogic-core.c +62 -4
91 lines not on this page · raw message
drivers/hid/hid-uclogic-params.c +132 -0
150 lines not on this page · raw message
drivers/hid/hid-uclogic-params.h +5 -0
@@ -175,6 +175,11 @@ struct uclogic_params_frame {* counterclockwise, as opposed to the normal 1 and -1. */ unsigned int bitmap_dial_byte; +/* +* Destination offset for the second bitmap dial byte, if the tablet +* supports a second dial at all. +*/ +unsigned int bitmap_second_dial_destination_byte; };/*
drivers/hid/hid-uclogic-rdesc.c +44 -0
50 lines not on this page · raw message
drivers/hid/hid-uclogic-rdesc.h +4 -0
@@ -210,4 +210,8 @@ extern const size_t uclogic_rdesc_ugee_g5_frame_size;/* Least-significant bit of Ugee G5 frame rotary encoder state */ #define UCLOGIC_RDESC_UGEE_G5_FRAME_RE_LSB 38 +/* Fixed report descriptor for XP-Pen Arist 22R Pro frame */ +extern const __u8 uclogic_rdesc_xppen_artist_22r_pro_frame_arr[]; +extern const size_t uclogic_rdesc_xppen_artist_22r_pro_frame_size; +#endif /* _HID_UCLOGIC_RDESC_H */
Signature · 1 line
2.49.0
Quoted 11 lines · Joshua Goins
Adds support for the XP-PEN Artist 22R Pro, including stylus, tablet frame and pen pressure.
The tablet has 20 buttons, but need to be remapped in order since the device reports invalid keycodes. Existing tablet functionality should not be inhibited, as BTN0-8 is still used.
New initialization functions are added since the device differs slightly from other UGEE v2 devices.
Signed-off-by Joshua Goins <[email protected]>
Queued in hid.git#for-6.17/uclogic, thanks.
Signature · 2 lines
Jiri Kosina SUSE Labs