mbox series

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

Message ID 20230204192051.1287369-1-josh@redstrate.com (mailing list archive)
Headers show
Series HID: uclogic: Add support for XP-PEN Artist 22R Pro | expand

Message

Joshua Goins Feb. 4, 2023, 7:20 p.m. UTC
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@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Reported-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Joshua Goins <josh@redstrate.com>
---
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