From: Lovekesh Solanki <lovekeshsolanki00@gmail.com>
To: dmitry.torokhov@gmail.com
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Lovekesh Solanki <lovekeshsolanki00@gmail.com>
Subject: [PATCH v2] Input: synaptics - make InterTouch quirks table driven
Date: Sat, 7 Nov 2026 07:37:51 +0530 [thread overview]
Message-ID: <20261107020751.3959748-1-lovekeshsolanki00@gmail.com> (raw)
In-Reply-To: <20261105042614.688312-1-lovekeshsolanki00@gmail.com>
Move the device specific InterTouch quirk into a dedicated table to
simplify exempting more devices in the future.
Signed-off-by: Lovekesh Solanki <lovekeshsolanki00@gmail.com>
---
Changes in v2:
- Guard synaptics_intertouch_quirk & synaptics_intertouch_blocklist by
#ifdef CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS to match its only caller
synaptics_intertouch_disabled().
---
drivers/input/mouse/synaptics.c | 52 ++++++++++++++++++++++++++++++---
1 file changed, 48 insertions(+), 4 deletions(-)
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 1ed9261bff2b..8561256406af 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -213,6 +213,25 @@ static const char * const forcepad_pnp_ids[] = {
NULL
};
+#ifdef CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS
+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",
+ },
+};
+#endif
+
/*
* Send a command to the synaptics touchpad by special commands
*/
@@ -1814,6 +1833,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 +1886,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
prev parent reply other threads:[~2026-11-07 2:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 4:26 [PATCH] " Lovekesh Solanki
2026-11-05 14:47 ` kernel test robot
2026-11-05 14:49 ` kernel test robot
2026-11-07 2:07 ` Lovekesh Solanki [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261107020751.3959748-1-lovekeshsolanki00@gmail.com \
--to=lovekeshsolanki00@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®