Re: [PATCH v4] HID: i2c-hid: Refactor _DSM helper and add i2c-hid-acpi-prp0001 driver
From: sashiko-bot@kernel.org
Date: 2026-06-09 11:06:08
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] Using `of_match_ptr()` on the `of_match_table` prevents native ACPI PRP0001 matching when `CONFIG_OF` is disabled. -- commit fdffe866c804a579c14dbd7b1c8529b20466017b Author: 谢致邦 (XIE Zhibang) [off-list ref] HID: i2c-hid: Refactor _DSM helper and add i2c-hid-acpi-prp0001 driver This commit moves the _DSM call that retrieves the HID descriptor address into a shared header. It also introduces the i2c-hid-acpi-prp0001 driver to handle devices with _HID "PRP0001" and _DSD compatible "hid-over-i2c" that are missing the "hid-descr-addr" property.
quoted hunk ↗ jump to hunk
diff --git a/drivers/hid/i2c-hid/i2c-hid-acpi-prp0001.c b/drivers/hid/i2c-hid/i2c-hid-acpi-prp0001.c new file mode 100644 --- /dev/null +++ b/drivers/hid/i2c-hid/i2c-hid-acpi-prp0001.c
[ ... ]
+static const struct of_device_id i2c_hid_acpi_prp0001_of_match[] = {
+ { .compatible = "hid-over-i2c" },
+ {},
+};
+MODULE_DEVICE_TABLE(of, i2c_hid_acpi_prp0001_of_match);
+[ ... ]
+static struct i2c_driver i2c_hid_acpi_prp0001_driver = {
+ .driver = {
+ .name = "i2c_hid_acpi_prp0001",
+ .pm = &i2c_hid_core_pm,
+ .probe_type = PROBE_PREFER_ASYNCHRONOUS,
+ .of_match_table = of_match_ptr(i2c_hid_acpi_prp0001_of_match),[Severity: High] Will this prevent the driver from probing on ACPI systems that do not enable CONFIG_OF? The driver relies on ACPI PRP0001 matching to match the _DSD compatible property against the of_match_table. However, if CONFIG_OF is disabled (which is standard for x86 ACPI platforms where this hardware exists), of_match_ptr() evaluates to NULL. When of_match_table is NULL, the ACPI driver core will silently fail to match the device, leaving the touchpad non-functional. Should we drop the of_match_ptr() wrapper here to ensure the table is always available for PRP0001 matching?
+ }, + + .probe = i2c_hid_acpi_prp0001_probe, + .remove = i2c_hid_core_remove, + .shutdown = i2c_hid_core_shutdown, + .id_table = i2c_hid_acpi_prp0001_id, +};
-- Sashiko AI review · https://sashiko.dev/#/patchset/tencent_6169D37BDAAD7FFEEC9E41DA197FE6028309@qq.com?part=1