[PATCH v2] HID: multitouch: add support for Goodix GXTP7863 touchpad

Ruzal Daminov <[email protected]>
Newsgroups org.kernel.vger.linux-input,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
The Goodix GXTP7863 touchpad controller (VID: 0x27c6, PID: 0x01e0)
found on Honor MagicBook laptops (e.g. FMI-76 / X14 Plus)
was missing from the mt_devices[] table.

As a result, it was claimed by hid-generic, which erroneously mapped
the vendor telemetry collection (0xFF01) to an input node, translating
the 1-Hz heartbeat timestamp into an endless loop of phantom
KEY_BRIGHTNESSUP autorepeat events.

Add the I2C_DEVICE_ID_GOODIX_01E0 definition to hid-ids.h and add the
device to mt_devices[] with MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU so
hid-multitouch claims the touchpad, eliminating the phantom input node.

Tested on Honor MagicBook X14 Plus (FMI-76, AMD Ryzen 8845HS).

Signed-off-by: Ruzal Daminov <[email protected]>
---
v1 -> v2:
 - Move entry to alphabetical order in the Goodix section.
 - Declare I2C_DEVICE_ID_GOODIX_01E0 in hid-ids.h instead of hardcoding.
 - Use MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU matching sibling GT7868Q devices.

 drivers/hid/hid-ids.h        | 1 +
 drivers/hid/hid-multitouch.c | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 1059922baaacd2..60d9d524cd2e15 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -562,6 +562,7 @@
 #define USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PIT_E100 0xe100
 
 #define I2C_VENDOR_ID_GOODIX		0x27c6
+#define I2C_DEVICE_ID_GOODIX_01E0	0x01e0
 #define I2C_DEVICE_ID_GOODIX_01E8	0x01e8
 #define I2C_DEVICE_ID_GOODIX_01E9	0x01e9
 #define I2C_DEVICE_ID_GOODIX_01F0	0x01f0
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index edb37b4c867e4b..ca0b40e6b8a83d 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -2460,6 +2460,11 @@ static const struct hid_device_id mt_devices[] = {
 		MT_BT_DEVICE(USB_VENDOR_ID_FRUCTEL,
 			USB_DEVICE_ID_GAMETEL_MT_MODE) },
 
+	/* Goodix GXTP7863 Touchpad */
+	{ .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU,
+	  HID_DEVICE(BUS_I2C, HID_GROUP_ANY, I2C_VENDOR_ID_GOODIX,
+		     I2C_DEVICE_ID_GOODIX_01E0) },
+
 	/* Goodix GT7868Q devices */
 	{ .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU,
 	  HID_DEVICE(BUS_I2C, HID_GROUP_ANY, I2C_VENDOR_ID_GOODIX,
-- 
2.45.2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.