[PATCH] Input: synaptics - make InterTouch quirks table driven
From: Lovekesh Solanki
Date: Wed Nov 04 2026 - 23:27:42 EST
Move the device specific InterTouch quirk into a dedicated table to
simplify exempting more devices in future.
Signed-off-by: Lovekesh Solanki <lovekeshsolanki00@xxxxxxxxx>
---
drivers/input/mouse/synaptics.c | 50 ++++++++++++++++++++++++++++++---
1 file changed, 46 insertions(+), 4 deletions(-)
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 1ed9261bff2b..748ade2004c3 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -213,6 +213,23 @@ static const char * const forcepad_pnp_ids[] = {
NULL
};
+struct synaptics_intertouch_quirk {
+ u32 board_id;
+ const char *pnp_id;
+};
+
+/*
+ * List of devices with broken board revisions.
+ */
+static const struct synaptics_intertouch_quirk
+synaptics_intertouch_blocklist[] = {
+ {
+ /* ThinkPad T440p */
+ .board_id = 2722,
+ .pnp_id = "LEN0036",
+ },
+};
+
/*
* Send a command to the synaptics touchpad by special commands
*/
@@ -1814,6 +1831,33 @@ static int synaptics_create_intertouch(struct psmouse *psmouse,
leave_breadcrumbs);
}
+/*
+ * synaptics_intertouch_disabled - check if InterTouch should be disabled
+ * for a given touchpad based on its board revision.
+ *
+ * Returns true if the touchpad's board ID and PNP ID match a known broken
+ * entry in the synaptics_intertouch_blocklist table.
+ */
+static bool synaptics_intertouch_disabled(struct psmouse *psmouse,
+ const struct synaptics_device_info *info)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(synaptics_intertouch_blocklist); i++) {
+ const struct synaptics_intertouch_quirk *quirk =
+ &synaptics_intertouch_blocklist[i];
+
+ if (info->board_id == quirk->board_id &&
+ psmouse_matches_pnp_id(psmouse,
+ (const char * const []) {
+ quirk->pnp_id, NULL
+ }))
+ return true;
+ }
+
+ return false;
+}
+
/*
* synaptics_setup_intertouch - called once the PS/2 devices are enumerated
* and decides to instantiate a SMBus InterTouch device.
@@ -1840,10 +1884,8 @@ static int synaptics_setup_intertouch(struct psmouse *psmouse,
return -ENXIO;
}
- /* Disable intertouch on known-broken T440p board revisions */
- if (info->board_id == 2722 &&
- psmouse_matches_pnp_id(psmouse,
- (const char * const []){"LEN0036", NULL})) {
+ /* Disable intertouch on known-broken board revisions */
+ if (synaptics_intertouch_disabled(psmouse, info)) {
psmouse_info(psmouse,
"Disabling intertouch for board id %u\n",
info->board_id);
--
2.56.0