From: Horvath Gergely <horvathg@hekate>
Date: Sun, 26 Apr 2020 01:02:06 +0200
Subject: Add support for XP-Pen Artist 10s
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Description: Add support for XP-Pen Artist 10s
Author: Gergely HORVÁTH <horvathg.1988@gmail.com>
Forwarded: not-needed
Bug: https://github.com/DIGImend/digimend-kernel-drivers/issues/137

Signed-off-by: Gergely HORVÁTH <horvathg.1988@gmail.com>
Signed-off-by: Kentaro Hayashi <kenhys@xdump.org>
---
 hid-ids.h            | 1 +
 hid-uclogic-core.c   | 2 ++
 hid-uclogic-params.c | 2 ++
 xorg.conf            | 2 +-
 4 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/hid-ids.h b/hid-ids.h
index d90e1ab..8ff0719 100644
--- a/hid-ids.h
+++ b/hid-ids.h
@@ -45,6 +45,7 @@
 #define USB_DEVICE_ID_UCLOGIC_UGEE_TABLET_81	0x0081
 #define USB_DEVICE_ID_UCLOGIC_UGEE_TABLET_45	0x0045
 #define USB_DEVICE_ID_UCLOGIC_UGEE_TABLET_47	0x0047
+#define USB_DEVICE_ID_UCLOGIC_XPPEN_ARTIST_10S  0x004a
 
 #define USB_DEVICE_ID_YIYNOVA_TABLET	0x004d
 
diff --git a/hid-uclogic-core.c b/hid-uclogic-core.c
index e34584b..716ab97 100644
--- a/hid-uclogic-core.c
+++ b/hid-uclogic-core.c
@@ -539,6 +539,8 @@ static const struct hid_device_id uclogic_devices[] = {
 				USB_DEVICE_ID_UCLOGIC_UGEE_TABLET_45) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC,
 				USB_DEVICE_ID_UCLOGIC_UGEE_TABLET_47) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC,
+				USB_DEVICE_ID_UCLOGIC_XPPEN_ARTIST_10S) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC,
 				USB_DEVICE_ID_UCLOGIC_DRAWIMAGE_G3) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_UGTIZER,
diff --git a/hid-uclogic-params.c b/hid-uclogic-params.c
index 60fe2eb..7407fa8 100644
--- a/hid-uclogic-params.c
+++ b/hid-uclogic-params.c
@@ -1748,6 +1748,8 @@ int uclogic_params_init(struct uclogic_params *params,
 		     USB_DEVICE_ID_UCLOGIC_UGEE_TABLET_45):
 	case VID_PID(USB_VENDOR_ID_UCLOGIC,
 		     USB_DEVICE_ID_UCLOGIC_UGEE_TABLET_47):
+	case VID_PID(USB_VENDOR_ID_UCLOGIC,
+		     USB_DEVICE_ID_UCLOGIC_XPPEN_ARTIST_10S):
 		rc = uclogic_params_huion_init(&p, hdev);
 		if (rc != 0)
 			goto cleanup;
diff --git a/xorg.conf b/xorg.conf
index e78654d..66362a1 100644
--- a/xorg.conf
+++ b/xorg.conf
@@ -23,7 +23,7 @@ EndSection
 
 Section "InputClass"
 	Identifier "Ugee/XP-Pen tablets with Wacom driver"
-	MatchUSBID "28bd:007[1458]|28bd:0094|28bd:0042|5543:004[57]|5543:0081|5543:0004|5543:3031"
+	MatchUSBID "28bd:007[1458]|28bd:0094|28bd:0042|5543:004[57a]|5543:0081|5543:0004|5543:3031"
 	MatchDevicePath "/dev/input/event*"
 	Driver "wacom"
 EndSection
