[PATCH v3 0/2] HID: uclogic: Add support for XP-PEN Artist 22R Pro

From: Joshua Goins
Date: Sat Feb 04 2023 - 14:21:19 EST


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.

Reported-by: kernel test robot <lkp@xxxxxxxxx>
Reported-by: Dan Carpenter <error27@xxxxxxxxx>
Reported-by: José Expósito <jose.exposito89@xxxxxxxxx>
Signed-off-by: Joshua Goins <josh@xxxxxxxxxxxxx>
---
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

José Expósito (1):
HID: uclogic: Refactor UGEEv2 probe magic data

drivers/hid/hid-ids.h | 1 +
drivers/hid/hid-uclogic-core.c | 66 +++++++++++++-
drivers/hid/hid-uclogic-params.c | 143 +++++++++++++++++++++++++++++--
drivers/hid/hid-uclogic-params.h | 5 ++
drivers/hid/hid-uclogic-rdesc.c | 50 +++++++++++
drivers/hid/hid-uclogic-rdesc.h | 9 ++
6 files changed, 264 insertions(+), 10 deletions(-)


base-commit: 0136d86b78522bbd5755f8194c97a987f0586ba5
--
2.39.1