From: "谢致邦 (XIE Zhibang)" <Yeking@Red54.com>
To: linux-input@vger.kernel.org
Cc: "谢致邦 (XIE Zhibang)" <Yeking@Red54.com>,
"Jiri Kosina" <jikos@kernel.org>,
"Benjamin Tissoires" <bentiss@kernel.org>,
"Mario Limonciello (AMD)" <superm1@kernel.org>,
"Hans de Goede" <hansg@kernel.org>,
"Douglas Anderson" <dianders@chromium.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH] HID: i2c-hid-acpi: Add PRP0001 to match table and OF alias
Date: Wed, 27 May 2026 15:17:55 +0000 [thread overview]
Message-ID: <tencent_61698D7A14AC9BFE6C9F3FDB797FCA02E309@qq.com> (raw)
Some devices, for example the Lenovo KaiTian N60d and Inspur CP300L3,
declare their I2C HID ACPI touchpad in the DSDT as _HID "PRP0001" with
_DSD compatible "hid-over-i2c" instead of the standard "PNP0C50". This
worked before commit b33752c30023 ("HID: i2c-hid: Reorganize so ACPI and
OF are separate modules"), but after the split, PRP0001 devices on the
ACPI bus are no longer probed by either driver.
Fix this by adding PRP0001 to i2c_hid_acpi_match so the driver probes
these devices. The existing _DSM HID descriptor call in probe()
naturally rejects any PRP0001 device that does not implement the
protocol.
A MODULE_ALIAS is also needed for autoloading: when an ACPI device has a
_DSD "compatible" property, the uevent modalias uses the OF format
(of:N<name>T<compatible>) instead of the ACPI format (acpi:<HID>), so
udev would otherwise load only i2c-hid-of, which fails to probe because
these devices lack the "hid-descr-addr" property.
Fixes: b33752c30023 ("HID: i2c-hid: Reorganize so ACPI and OF are separate modules")
Signed-off-by: 谢致邦 (XIE Zhibang) <Yeking@Red54.com>
---
drivers/hid/i2c-hid/i2c-hid-acpi.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/hid/i2c-hid/i2c-hid-acpi.c b/drivers/hid/i2c-hid/i2c-hid-acpi.c
index abd700a101f4..515ced22c978 100644
--- a/drivers/hid/i2c-hid/i2c-hid-acpi.c
+++ b/drivers/hid/i2c-hid/i2c-hid-acpi.c
@@ -119,10 +119,30 @@ static int i2c_hid_acpi_probe(struct i2c_client *client)
static const struct acpi_device_id i2c_hid_acpi_match[] = {
{ "ACPI0C50" },
{ "PNP0C50" },
+ /*
+ * Some devices, for example the Lenovo KaiTian N60d and Inspur CP300L3,
+ * declare their I2C HID ACPI touchpad in the DSDT as _HID "PRP0001"
+ * with _DSD compatible "hid-over-i2c" instead of the standard
+ * "PNP0C50". This worked before i2c-hid was split into i2c-hid-acpi
+ * and i2c-hid-of, but PRP0001 devices on the ACPI bus are no longer
+ * probed after the split. The _DSM call in probe() naturally rejects
+ * PRP0001 devices that are not actually I2C HID, so matching PRP0001
+ * here is safe.
+ */
+ { "PRP0001" },
{ }
};
MODULE_DEVICE_TABLE(acpi, i2c_hid_acpi_match);
+ /*
+ * When an ACPI device has a _DSD "compatible" property, the uevent
+ * modalias uses the OF format (of:N<name>T<compatible>) instead of
+ * the ACPI format (acpi:<HID>). Add an OF alias so udev can autoload
+ * this module for such devices. probe() will reject pure DT devices
+ * via the _DSM HID descriptor call.
+ */
+MODULE_ALIAS("of:N*TChid-over-i2c");
+
static struct i2c_driver i2c_hid_acpi_driver = {
.driver = {
.name = "i2c_hid_acpi",
--
2.43.0
next reply other threads:[~2026-05-27 15:18 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 15:17 谢致邦 (XIE Zhibang) [this message]
2026-05-27 15:44 ` Hans de Goede
2026-05-29 12:16 ` [PATCH] HID: i2c-hid-of: Fall back to ACPI _DSM when hid-descr-addr is missing 谢致邦 (XIE Zhibang)
2026-05-29 15:00 ` Hans de Goede
2026-05-29 19:36 ` Dmitry Torokhov
2026-06-01 17:37 ` [PATCH 0/3] HID: i2c-hid: Fix some PRP0001 touchpads probe after OF/ACPI split 谢致邦 (XIE Zhibang)
[not found] ` <20260601173722.38151-1-Yeking@Red54.com>
2026-06-01 17:37 ` [PATCH 1/3] HID: i2c-hid-acpi: Move blacklist check to probe() before devm_kzalloc() 谢致邦 (XIE Zhibang)
2026-06-01 17:37 ` [PATCH 2/3] HID: i2c-hid: Move common ACPI _DSM helper into core 谢致邦 (XIE Zhibang)
2026-06-01 17:37 ` [PATCH 3/3] HID: i2c-hid-of: Fall back to ACPI _DSM when hid-descr-addr is missing 谢致邦 (XIE Zhibang)
2026-06-01 18:15 ` [PATCH v2 0/3] HID: i2c-hid: Fix some PRP0001 touchpads probe after OF/ACPI split 谢致邦 (XIE Zhibang)
[not found] ` <20260601181510.38705-1-Yeking@Red54.com>
2026-06-01 18:15 ` [PATCH v2 1/3] HID: i2c-hid-acpi: Move blacklist check to probe() before devm_kzalloc() 谢致邦 (XIE Zhibang)
2026-06-01 18:15 ` [PATCH v2 2/3] HID: i2c-hid: Move common ACPI _DSM helper into core 谢致邦 (XIE Zhibang)
2026-06-03 9:43 ` Benjamin Tissoires
2026-06-03 10:25 ` Hans de Goede
2026-06-03 11:59 ` Benjamin Tissoires
2026-06-03 13:12 ` Hans de Goede
2026-06-03 13:30 ` Benjamin Tissoires
2026-06-04 4:23 ` 谢致邦 (XIE Zhibang)
2026-06-05 1:29 ` [PATCH] HID: i2c-hid: Refactor _DSM helper and add i2c-hid-acpi-prp0001 driver 谢致邦 (XIE Zhibang)
2026-06-01 18:15 ` [PATCH v2 3/3] HID: i2c-hid-of: Fall back to ACPI _DSM when hid-descr-addr is missing 谢致邦 (XIE Zhibang)
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=tencent_61698D7A14AC9BFE6C9F3FDB797FCA02E309@qq.com \
--to=yeking@red54.com \
--cc=bentiss@kernel.org \
--cc=dianders@chromium.org \
--cc=hansg@kernel.org \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=superm1@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®