* [PATCH 0/2] HID: uclogic: Add XP-Pen Artist 12 (2nd Gen) support
@ 2026-10-06 0:38 Bartosz Barc
2026-10-06 0:38 ` [PATCH 1/2] HID: uclogic: Add support for XP-Pen Artist 12 (2nd Gen) Bartosz Barc
2026-10-06 0:39 ` [PATCH 2/2] HID: uclogic: Report stylus invert state for UGEE v2 devices Bartosz Barc
0 siblings, 2 replies; 3+ messages in thread
From: Bartosz Barc @ 2026-10-06 0:38 UTC (permalink / raw)
To: Benjamin Tissoires, Jiri Kosina
Cc: linux-input, linux-kernel, Bartosz Paweł Barc
From: Bartosz Paweł Barc <bpbarc@proton.me>
This series adds support for the XP-Pen Artist 12 (2nd Gen) (28bd:094a)
graphics tablet, which is currently not recognized by hid-uclogic and
handled by the generic driver.
It utilises the existing UGEE v2 initialization that is also used
by other similar tablets. The second patch also adds support for the
previously missing stylus invert detection. This affects the shared UGEE v2
pen report template array; while it only reclaims a previously ignored
padding bit and should not affect devices without this feature,
I don't have access to other UGEE v2 hardware and additional testing
would be appreciated.
The tablet & pen have been verified to be fully working with libinput
and libwacom, and the relevant .tablet file will be submitted to the
libwacom project.
Bartosz Paweł Barc (2):
HID: uclogic: Add support for XP-Pen Artist 12 (2nd Gen)
HID: uclogic: Report stylus invert state for UGEE v2 devices
drivers/hid/hid-ids.h | 1 +
drivers/hid/hid-uclogic-core.c | 2 ++
drivers/hid/hid-uclogic-params.c | 2 ++
drivers/hid/hid-uclogic-rdesc.c | 7 ++++---
4 files changed, 9 insertions(+), 3 deletions(-)
--
2.56.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] HID: uclogic: Add support for XP-Pen Artist 12 (2nd Gen)
2026-10-06 0:38 [PATCH 0/2] HID: uclogic: Add XP-Pen Artist 12 (2nd Gen) support Bartosz Barc
@ 2026-10-06 0:38 ` Bartosz Barc
2026-10-06 0:39 ` [PATCH 2/2] HID: uclogic: Report stylus invert state for UGEE v2 devices Bartosz Barc
1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Barc @ 2026-10-06 0:38 UTC (permalink / raw)
To: Benjamin Tissoires, Jiri Kosina
Cc: linux-input, linux-kernel, Bartosz Paweł Barc
From: Bartosz Paweł Barc <bpbarc@proton.me>
The XP-Pen Artist 12 (2nd Gen) (28bd:094a) uses the same probe
protocol used by other supported UGEE tablets, but is currently
handled by the generic driver. Add the device's USB ID and
make it use the existing uclogic_params_ugee_v2_init() instead
to enable the correct recognition of the device and its capabilities.
Tested on the actual hardware; pen X/Y, pressure, tilt and pad buttons all
report correctly.
Signed-off-by: Bartosz Paweł Barc <bpbarc@proton.me>
---
drivers/hid/hid-ids.h | 1 +
drivers/hid/hid-uclogic-core.c | 2 ++
drivers/hid/hid-uclogic-params.c | 2 ++
3 files changed, 5 insertions(+)
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index a9537b7bb03d..2166d4ed6e14 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -1555,6 +1555,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_ARTIST12_GEN2 0x094a
#define USB_DEVICE_ID_UGEE_XPPEN_TABLET_22R_PRO 0x091b
#define USB_DEVICE_ID_UGEE_XPPEN_TABLET_24_PRO 0x092d
#define USB_DEVICE_ID_UGEE_TABLET_G5 0x0074
diff --git a/drivers/hid/hid-uclogic-core.c b/drivers/hid/hid-uclogic-core.c
index 0b8a83fa6c5b..5c43647a299d 100644
--- a/drivers/hid/hid-uclogic-core.c
+++ b/drivers/hid/hid-uclogic-core.c
@@ -629,6 +629,8 @@ static const struct hid_device_id uclogic_devices[] = {
.driver_data = UCLOGIC_MOUSE_FRAME_QUIRK | UCLOGIC_BATTERY_QUIRK },
{ HID_USB_DEVICE(USB_VENDOR_ID_UGEE,
USB_DEVICE_ID_UGEE_XPPEN_TABLET_STAR06) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_UGEE,
+ USB_DEVICE_ID_UGEE_XPPEN_TABLET_ARTIST12_GEN2) },
{ HID_USB_DEVICE(USB_VENDOR_ID_UGEE,
USB_DEVICE_ID_UGEE_XPPEN_TABLET_22R_PRO) },
{ HID_USB_DEVICE(USB_VENDOR_ID_UGEE,
diff --git a/drivers/hid/hid-uclogic-params.c b/drivers/hid/hid-uclogic-params.c
index ed16f50f21ed..7176b2950512 100644
--- a/drivers/hid/hid-uclogic-params.c
+++ b/drivers/hid/hid-uclogic-params.c
@@ -1903,6 +1903,8 @@ int uclogic_params_init(struct uclogic_params *params,
USB_DEVICE_ID_UGEE_XPPEN_TABLET_DECO_PRO_MW):
case VID_PID(USB_VENDOR_ID_UGEE,
USB_DEVICE_ID_UGEE_XPPEN_TABLET_DECO_PRO_S):
+ case VID_PID(USB_VENDOR_ID_UGEE,
+ USB_DEVICE_ID_UGEE_XPPEN_TABLET_ARTIST12_GEN2):
case VID_PID(USB_VENDOR_ID_UGEE,
USB_DEVICE_ID_UGEE_XPPEN_TABLET_DECO_PRO_SW):
rc = uclogic_params_ugee_v2_init(&p, hdev);
--
2.56.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] HID: uclogic: Report stylus invert state for UGEE v2 devices
2026-10-06 0:38 [PATCH 0/2] HID: uclogic: Add XP-Pen Artist 12 (2nd Gen) support Bartosz Barc
2026-10-06 0:38 ` [PATCH 1/2] HID: uclogic: Add support for XP-Pen Artist 12 (2nd Gen) Bartosz Barc
@ 2026-10-06 0:39 ` Bartosz Barc
1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Barc @ 2026-10-06 0:39 UTC (permalink / raw)
To: Benjamin Tissoires, Jiri Kosina
Cc: linux-input, linux-kernel, Bartosz Paweł Barc
From: Bartosz Paweł Barc <bpbarc@proton.me>
Captured raw reports from the XP-Pen Artist 12 (2nd Gen) show that the
first of the two bits immediately after Tip Switch, Barrel Switch,
Tablet Pick (one that is currently declared as padding) is set whenever
the stylus is flipped to the eraser end, and otherwise is set to zero:
hovering, nib: 1010 0000
pressing, nib: 1010 0001
hovering, eraser: 1010 1000
pressing, eraser: 1010 1001
Declare that bit as Usage (Invert) from the Digitizer page, which already
gets mapped to BTN_TOOL_RUBBER.
This field is part of the shared uclogic_rdesc_ugee_v2_pen_template_arr
template used by multiple devices. As this change only reclaims a
padding bit, it should not affect devices that do not support this
feature, assuming their hardware leaves that bit as a zero. I have only
tested this with the XP-Pen Artist 12 (2nd Gen), so further testing with
other UGEE v2 devices would be appreciated.
Signed-off-by: Bartosz Paweł Barc <bpbarc@proton.me>
---
drivers/hid/hid-uclogic-rdesc.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/hid/hid-uclogic-rdesc.c b/drivers/hid/hid-uclogic-rdesc.c
index a1b31511b625..186beca6a26a 100644
--- a/drivers/hid/hid-uclogic-rdesc.c
+++ b/drivers/hid/hid-uclogic-rdesc.c
@@ -878,13 +878,14 @@ const __u8 uclogic_rdesc_ugee_v2_pen_template_arr[] = {
0x09, 0x42, /* Usage (Tip Switch), */
0x09, 0x44, /* Usage (Barrel Switch), */
0x09, 0x46, /* Usage (Tablet Pick), */
+ 0x09, 0x3c, /* Usage (Invert), */
0x75, 0x01, /* Report Size (1), */
- 0x95, 0x03, /* Report Count (3), */
+ 0x95, 0x04, /* Report Count (4), */
0x14, /* Logical Minimum (0), */
0x25, 0x01, /* Logical Maximum (1), */
0x81, 0x02, /* Input (Variable), */
- 0x95, 0x02, /* Report Count (2), */
- 0x81, 0x03, /* Input (Constant, Variable), */
+ 0x95, 0x01, /* Report Count (1), */
+ 0x81, 0x03, /* Input (Constant), */
0x09, 0x32, /* Usage (In Range), */
0x95, 0x01, /* Report Count (1), */
0x81, 0x02, /* Input (Variable), */
--
2.56.0
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-06 0:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-06 0:38 [PATCH 0/2] HID: uclogic: Add XP-Pen Artist 12 (2nd Gen) support Bartosz Barc
2026-10-06 0:38 ` [PATCH 1/2] HID: uclogic: Add support for XP-Pen Artist 12 (2nd Gen) Bartosz Barc
2026-10-06 0:39 ` [PATCH 2/2] HID: uclogic: Report stylus invert state for UGEE v2 devices Bartosz Barc
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®