[PATCH 8/9] HID: multitouch: Drop redundant report ID validation in mt_get_feature

From: Dmitry Torokhov

Date: Mon Oct 12 2026 - 23:44:34 EST


Now that the core HID layer validates returned report IDs centrally and
provides a quirk for devices with mismatched responses, remove the
per-driver report ID check in the multitouch driver.

Also drop the dedicated class and device entry for the ASUS ROG Flow
Z13 touchpad, as the device now falls back cleanly to the generic Win 8
multitouch entry.

Assisted-by: LLM
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
---
drivers/hid/hid-multitouch.c | 32 --------------------------------
1 file changed, 32 deletions(-)

diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 4e19a0c4d238..69f770a5c430 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -79,7 +79,6 @@ MODULE_LICENSE("GPL");
#define MT_QUIRK_APPLE_TOUCHBAR BIT(23)
#define MT_QUIRK_YOGABOOK9I BIT(24)
#define MT_QUIRK_KEEP_LATENCY_ON_CLOSE BIT(25)
-#define MT_QUIRK_IGNORE_FEATURE_ID_MISMATCH BIT(26)

#define MT_INPUTMODE_TOUCHSCREEN 0x02
#define MT_INPUTMODE_TOUCHPAD 0x03
@@ -236,7 +235,6 @@ static void mt_post_parse(struct mt_device *td, struct mt_application *app);
#define MT_CLS_APPLE_TOUCHBAR 0x0114
#define MT_CLS_YOGABOOK9I 0x0115
#define MT_CLS_EGALAX_P80H84 0x0116
-#define MT_CLS_ASUS_ROG_Z13_FOLIO 0x0117
#define MT_CLS_SIS 0x0457

#define MT_DEFAULT_MAXCONTACT 10
@@ -407,16 +405,6 @@ static const struct mt_class mt_classes[] = {
.quirks = MT_QUIRK_ALWAYS_VALID |
MT_QUIRK_CONTACT_CNT_ACCURATE |
MT_QUIRK_ASUS_CUSTOM_UP },
- { .name = MT_CLS_ASUS_ROG_Z13_FOLIO,
- .quirks = MT_QUIRK_ALWAYS_VALID |
- MT_QUIRK_IGNORE_DUPLICATES |
- MT_QUIRK_HOVERING |
- MT_QUIRK_CONTACT_CNT_ACCURATE |
- MT_QUIRK_STICKY_FINGERS |
- MT_QUIRK_WIN8_PTP_BUTTONS |
- MT_QUIRK_CONFIDENCE |
- MT_QUIRK_IGNORE_FEATURE_ID_MISMATCH,
- .export_all_inputs = true },
{ .name = MT_CLS_VTL,
.quirks = MT_QUIRK_ALWAYS_VALID |
MT_QUIRK_CONTACT_CNT_ACCURATE |
@@ -519,7 +507,6 @@ static const struct attribute_group mt_attribute_group = {

static void mt_get_feature(struct hid_device *hdev, struct hid_report *report)
{
- struct mt_device *td = hid_get_drvdata(hdev);
int ret;
u32 size = hid_report_len(report);
u8 *buf;
@@ -541,25 +528,12 @@ static void mt_get_feature(struct hid_device *hdev, struct hid_report *report)
dev_warn(&hdev->dev, "failed to fetch feature %d\n",
report->id);
} else {
- /*
- * The report ID in the request and the response should match.
- * Some firmware (e.g. the ASUS ROG Z13 Folio
- * touchpad) returns a mismatched ID on this specific fetch;
- * tolerate it only for devices explicitly flagged as such.
- */
- if (report->id != buf[0] &&
- !(td->mtclass.quirks & MT_QUIRK_IGNORE_FEATURE_ID_MISMATCH)) {
- hid_err(hdev, "Returned feature report did not match the request\n");
- goto free;
- }
-
ret = hid_report_raw_event(hdev, HID_FEATURE_REPORT, buf,
size, size, 0);
if (ret)
dev_warn(&hdev->dev, "failed to report feature\n");
}

-free:
kfree(buf);
}

@@ -2734,12 +2708,6 @@ static const struct hid_device_id mt_devices[] = {
HID_DEVICE(BUS_I2C, HID_GROUP_MULTITOUCH_WIN_8,
I2C_VENDOR_ID_HANTICK, I2C_PRODUCT_ID_HANTICK_5288) },

- /* Asus ROG Flow Z13 (2025) GZ302EA keyboard-cover touchpad */
- { .driver_data = MT_CLS_ASUS_ROG_Z13_FOLIO,
- HID_DEVICE(BUS_USB, HID_GROUP_MULTITOUCH_WIN_8,
- USB_VENDOR_ID_ASUSTEK,
- USB_DEVICE_ID_ASUSTEK_ROG_Z13_FOLIO) },
-
/* Generic MT device */
{ HID_DEVICE(HID_BUS_ANY, HID_GROUP_MULTITOUCH, HID_ANY_ID, HID_ANY_ID) },


--
2.56.0.385.gd3acb90ef8-goog