From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon, 13 May 2024 12:24:39 +1000
Subject: HID: uclogic: Add Huion Inspiroy 2 S (H641P)

Description: Unlike the M and L version added in
commit 2683e80de827 ("HID: uclogic: Add support for Huion Inspiroy 2 M and L")
the small version does not have the group buttons. This patch only adds
the ID, it doesn't try to remove that device.
Author: Peter Hutterer <peter.hutterer@who-t.net>
Forwarded: not-needed
Origin: https://github.com/DIGImend/digimend-kernel-drivers/commit/f46d9293390b11a2c4714c3be6712fdee5237b51

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Kentaro Hayashi <kenhys@xdump.org>
---
 hid-ids.h            | 1 +
 hid-uclogic-core.c   | 2 ++
 hid-uclogic-params.c | 2 ++
 3 files changed, 5 insertions(+)

diff --git a/hid-ids.h b/hid-ids.h
index d4d8ba9..e4182c6 100644
--- a/hid-ids.h
+++ b/hid-ids.h
@@ -13,6 +13,7 @@
 #define USB_DEVICE_ID_HUION_TABLET4	0x006f
 #define USB_DEVICE_ID_HUION_H951P	0x0067
 #define USB_DEVICE_ID_HUION_H1061P	0x0068
+#define USB_DEVICE_ID_HUION_H641P	0x0066
 
 #define USB_VENDOR_ID_KYE		0x0458
 #define USB_DEVICE_ID_KYE_ERGO_525V	0x0087
diff --git a/hid-uclogic-core.c b/hid-uclogic-core.c
index 5fefd57..6f8160f 100644
--- a/hid-uclogic-core.c
+++ b/hid-uclogic-core.c
@@ -525,6 +525,8 @@ static const struct hid_device_id uclogic_devices[] = {
 				USB_DEVICE_ID_HUION_H951P) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_HUION,
 				USB_DEVICE_ID_HUION_H1061P) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_HUION,
+				USB_DEVICE_ID_HUION_H641P) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_TRUST,
 				USB_DEVICE_ID_TRUST_PANORA_TABLET) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC,
diff --git a/hid-uclogic-params.c b/hid-uclogic-params.c
index 2b38379..34b021e 100644
--- a/hid-uclogic-params.c
+++ b/hid-uclogic-params.c
@@ -1734,6 +1734,8 @@ int uclogic_params_init(struct uclogic_params *params,
 		     USB_DEVICE_ID_HUION_H951P):
 	case VID_PID(USB_VENDOR_ID_HUION,
 		     USB_DEVICE_ID_HUION_H1061P):
+	case VID_PID(USB_VENDOR_ID_HUION,
+		     USB_DEVICE_ID_HUION_H641P):
 	case VID_PID(USB_VENDOR_ID_UCLOGIC,
 		     USB_DEVICE_ID_HUION_TABLET):
 	case VID_PID(USB_VENDOR_ID_UCLOGIC,
