* [PATCH] Input: synaptics - make InterTouch quirks table driven
@ 2026-11-05 4:26 Lovekesh Solanki
2026-11-05 4:32 ` sashiko-bot
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Lovekesh Solanki @ 2026-11-05 4:26 UTC (permalink / raw)
To: dmitry.torokhov; +Cc: linux-input, linux-kernel, Lovekesh Solanki
Move the device specific InterTouch quirk into a dedicated table to
simplify exempting more devices in future.
Signed-off-by: Lovekesh Solanki <lovekeshsolanki00@gmail.com>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Input: synaptics - make InterTouch quirks table driven
2026-11-05 4:26 [PATCH] Input: synaptics - make InterTouch quirks table driven Lovekesh Solanki
@ 2026-11-05 4:32 ` sashiko-bot
2026-11-05 14:47 ` kernel test robot
2026-11-05 14:49 ` kernel test robot
2 siblings, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-11-05 4:32 UTC (permalink / raw)
To: Lovekesh Solanki; +Cc: linux-input, dmitry.torokhov
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Input: synaptics - unused synaptics_intertouch_blocklist when SMBUS disabled
--
commit aa71c39dd9b45d27ea00e706a72ba8889d1bd158
Author: Lovekesh Solanki <lovekeshsolanki00@gmail.com>
Input: synaptics - make InterTouch quirks table driven
This commit moves the ThinkPad T440p InterTouch quirk check out of
synaptics_setup_intertouch() into a dedicated synaptics_intertouch_blocklist
table and helper function synaptics_intertouch_disabled().
> diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
> index b007e642ea765..d366fd3398c69 100644
> --- a/drivers/input/mouse/synaptics.c
> +++ b/drivers/input/mouse/synaptics.c
> @@ -214,6 +214,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",
> + },
> +};
[Severity: Low]
Will defining synaptics_intertouch_blocklist[] outside of
CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS trigger an unused-const-variable warning when
CONFIG_MOUSE_PS2_SYNAPTICS is enabled and CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS is
disabled?
Here synaptics_intertouch_blocklist[] is placed under:
#if defined(CONFIG_MOUSE_PS2_SYNAPTICS) || \
defined(CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS)
However, its only caller, synaptics_intertouch_disabled(), is inside the
#ifdef CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS block (similar to how smbus_pnp_ids[]
needed to be guarded by CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS in commit
496b7d2e5b93).
Should struct synaptics_intertouch_quirk and synaptics_intertouch_blocklist[]
be guarded by #ifdef CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS or moved down next to
synaptics_intertouch_disabled()?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261105042614.688312-1-lovekeshsolanki00@gmail.com?part=1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Input: synaptics - make InterTouch quirks table driven
2026-11-05 4:26 [PATCH] Input: synaptics - make InterTouch quirks table driven Lovekesh Solanki
2026-11-05 4:32 ` sashiko-bot
@ 2026-11-05 14:47 ` kernel test robot
2026-11-05 14:49 ` kernel test robot
2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2026-11-05 14:47 UTC (permalink / raw)
To: Lovekesh Solanki, dmitry.torokhov
Cc: oe-kbuild-all, linux-input, linux-kernel, Lovekesh Solanki
Hi Lovekesh,
kernel test robot noticed the following build warnings:
[auto build test WARNING on dtor-input/next]
[also build test WARNING on dtor-input/for-linus hid/for-next linus/master v7.4-rc1 next-20261030]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Lovekesh-Solanki/Input-synaptics-make-InterTouch-quirks-table-driven/20261105-095614
base: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
patch link: https://lore.kernel.org/r/20261105042614.688312-1-lovekeshsolanki00%40gmail.com
patch subject: [PATCH] Input: synaptics - make InterTouch quirks table driven
config: csky-defconfig (https://download.01.org/0day-ci/archive/20261105/202611052201.kQxXuVQk-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 16.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261105/202611052201.kQxXuVQk-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611052201.kQxXuVQk-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/input/mouse/synaptics.c:226:1: warning: 'synaptics_intertouch_blocklist' defined but not used [-Wunused-const-variable=]
226 | synaptics_intertouch_blocklist[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/device.h:15,
from include/linux/input.h:19,
from include/linux/input/mt.h:11,
from drivers/input/mouse/synaptics.c:26:
drivers/input/mouse/synaptics.c: In function 'synaptics_init_ps2':
<command-line>: warning: '%s' directive argument is null [-Wformat-overflow=]
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:160:58: note: in expansion of macro 'dev_fmt'
160 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/input/mouse/psmouse.h:202:9: note: in expansion of macro 'dev_info'
202 | dev_info(&(psmouse)->ps2dev.serio->dev, \
| ^~~~~~~~
drivers/input/mouse/psmouse.h:195:33: note: in expansion of macro 'KBUILD_BASENAME'
195 | #define psmouse_fmt(fmt) KBUILD_BASENAME ": " fmt
| ^~~~~~~~~~~~~~~
drivers/input/mouse/psmouse.h:203:18: note: in expansion of macro 'psmouse_fmt'
203 | psmouse_fmt(format), ##__VA_ARGS__)
| ^~~~~~~~~~~
drivers/input/mouse/synaptics.c:1696:17: note: in expansion of macro 'psmouse_info'
1696 | psmouse_info(psmouse,
| ^~~~~~~~~~~~
vim +/synaptics_intertouch_blocklist +226 drivers/input/mouse/synaptics.c
221
222 /*
223 * List of devices with broken board revisions.
224 */
225 static const struct synaptics_intertouch_quirk
> 226 synaptics_intertouch_blocklist[] = {
227 {
228 /* ThinkPad T440p */
229 .board_id = 2722,
230 .pnp_id = "LEN0036",
231 },
232 };
233
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Input: synaptics - make InterTouch quirks table driven
2026-11-05 4:26 [PATCH] Input: synaptics - make InterTouch quirks table driven Lovekesh Solanki
2026-11-05 4:32 ` sashiko-bot
2026-11-05 14:47 ` kernel test robot
@ 2026-11-05 14:49 ` kernel test robot
2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2026-11-05 14:49 UTC (permalink / raw)
To: Lovekesh Solanki, dmitry.torokhov
Cc: llvm, oe-kbuild-all, linux-input, linux-kernel, Lovekesh Solanki
Hi Lovekesh,
kernel test robot noticed the following build warnings:
[auto build test WARNING on dtor-input/next]
[also build test WARNING on dtor-input/for-linus hid/for-next linus/master v7.3 next-20261030]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Lovekesh-Solanki/Input-synaptics-make-InterTouch-quirks-table-driven/20261105-095614
base: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
patch link: https://lore.kernel.org/r/20261105042614.688312-1-lovekeshsolanki00%40gmail.com
patch subject: [PATCH] Input: synaptics - make InterTouch quirks table driven
config: um-defconfig (https://download.01.org/0day-ci/archive/20261105/202611052257.XSUus1c3-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 812626a41399a1d464a0d69627ab45c83b8ebfb9)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261105/202611052257.XSUus1c3-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611052257.XSUus1c3-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/input/mouse/synaptics.c:226:1: warning: unused variable 'synaptics_intertouch_blocklist' [-Wunused-const-variable]
226 | synaptics_intertouch_blocklist[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +/synaptics_intertouch_blocklist +226 drivers/input/mouse/synaptics.c
221
222 /*
223 * List of devices with broken board revisions.
224 */
225 static const struct synaptics_intertouch_quirk
> 226 synaptics_intertouch_blocklist[] = {
227 {
228 /* ThinkPad T440p */
229 .board_id = 2722,
230 .pnp_id = "LEN0036",
231 },
232 };
233
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-05 14:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-05 4:26 [PATCH] Input: synaptics - make InterTouch quirks table driven Lovekesh Solanki
2026-11-05 4:32 ` sashiko-bot
2026-11-05 14:47 ` kernel test robot
2026-11-05 14:49 ` kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox