Linux I2C development
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Andi Shyti <andi.shyti@kernel.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Hans de Goede <johannes.goede@oss.qualcomm.com>,
	penhouse24@proton.me, linux-i2c@vger.kernel.org,
	linux-acpi@vger.kernel.org,
	Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: [PATCH] i2c: acpi: Force Dell XPS 17 9720 touchpad to 100 kHz
Date: Fri, 13 Nov 2026 09:39:40 +0100	[thread overview]
Message-ID: <20261113083940.2583439-1-mika.westerberg@linux.intel.com> (raw)

The Dell XPS 17 9720 touchpad has the same lagging issue as with others
when run at 400 kHz as the ACPI tables describe. This particular system
does not use standard ACPI ID but it seems to use "Windows Device ID"
VEN_04F3 for whatever reason. Add this one to the 100 kHz quirk list as
well but since this is not a standard ACPI ID match it also via DMI
strings just to be on the safe side.

Reported-by: penhouse24@proton.me
Link: https://lore.kernel.org/linux-i2c/20261109104542.GL176724@black.igk.intel.com/
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
 drivers/i2c/i2c-core-acpi.c | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c
index 84841ed13487..98a8d63e3fb8 100644
--- a/drivers/i2c/i2c-core-acpi.c
+++ b/drivers/i2c/i2c-core-acpi.c
@@ -7,6 +7,7 @@
 
 #include <linux/acpi.h>
 #include <linux/device.h>
+#include <linux/dmi.h>
 #include <linux/err.h>
 #include <linux/i2c.h>
 #include <linux/list.h>
@@ -356,6 +357,16 @@ static const struct acpi_device_id i2c_acpi_force_400khz_device_ids[] = {
 	{ }
 };
 
+static const struct dmi_system_id i2c_acpi_dell_xps_17_9720_dmi_ids[] = {
+	{
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "XPS 17 9720"),
+		},
+	},
+	{ }
+};
+
 static const struct acpi_device_id i2c_acpi_force_100khz_device_ids[] = {
 	/*
 	 * When a 400KHz freq is used on this model of ELAN touchpad in Linux,
@@ -377,6 +388,14 @@ static const struct acpi_device_id i2c_acpi_force_100khz_device_ids[] = {
 	{ .id = "ELAN0678" },
 	{ .id = "ELAN06FA" },
 	{ .id = "ELAN1300" },
+	{
+		/*
+		 * Some Dell XPS 17 9720 systems do not use standard
+		 * ACPI IDs so we need to match also via DMI strings.
+		 */
+		.id = "VEN_04F3",
+		.driver_data = (kernel_ulong_t)i2c_acpi_dell_xps_17_9720_dmi_ids,
+	},
 	{ }
 };
 
@@ -385,6 +404,7 @@ static acpi_status i2c_acpi_lookup_speed(acpi_handle handle, u32 level,
 {
 	struct i2c_acpi_lookup *lookup = data;
 	struct acpi_device *adev = acpi_fetch_acpi_dev(handle);
+	const struct acpi_device_id *id;
 
 	if (!adev || i2c_acpi_do_lookup(adev, lookup))
 		return AE_OK;
@@ -398,7 +418,9 @@ static acpi_status i2c_acpi_lookup_speed(acpi_handle handle, u32 level,
 	if (acpi_match_device_ids(adev, i2c_acpi_force_400khz_device_ids) == 0)
 		lookup->force_speed = I2C_MAX_FAST_MODE_FREQ;
 
-	if (acpi_match_device_ids(adev, i2c_acpi_force_100khz_device_ids) == 0)
+	id = acpi_match_acpi_device(i2c_acpi_force_100khz_device_ids, adev);
+	if (id && (!id->driver_data ||
+		   dmi_check_system((const struct dmi_system_id *)id->driver_data)))
 		lookup->force_speed = I2C_MAX_STANDARD_MODE_FREQ;
 
 	return AE_OK;
-- 
2.53.0


             reply	other threads:[~2026-11-13  8:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13  8:39 Mika Westerberg [this message]
2026-11-13  9:52 ` [PATCH] i2c: acpi: Force Dell XPS 17 9720 touchpad to 100 kHz Hans de Goede
2026-11-13 11:17   ` Mika Westerberg
2026-11-13 12:22 ` Andy Shevchenko

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=20261113083940.2583439-1-mika.westerberg@linux.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=andi.shyti@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=johannes.goede@oss.qualcomm.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=penhouse24@proton.me \
    /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