Linux Input/HID development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
Cc: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org
Subject: Re: [PATCH v4] HID: i2c-hid: Refactor _DSM helper and add i2c-hid-acpi-prp0001 driver
Date: Tue, 09 Jun 2026 11:06:07 +0000	[thread overview]
Message-ID: <20260609110608.3F4C21F00898@smtp.kernel.org> (raw)
In-Reply-To: <tencent_6169D37BDAAD7FFEEC9E41DA197FE6028309@qq.com>

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) <Yeking@Red54.com>

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.

> 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

  reply	other threads:[~2026-06-09 11:06 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-27 15:17 [PATCH] HID: i2c-hid-acpi: Add PRP0001 to match table and OF alias 谢致邦 (XIE Zhibang)
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-05  1:41                           ` sashiko-bot
2026-06-05 12:20                             ` [PATCH v2] " 谢致邦 (XIE Zhibang)
2026-06-06 16:06                               ` [PATCH v3] " 谢致邦 (XIE Zhibang)
2026-06-08 11:48                                 ` Hans de Goede
2026-06-08 11:51                                   ` Hans de Goede
2026-06-09 10:10                                     ` 谢致邦 (XIE Zhibang)
2026-06-09 10:21                                       ` 谢致邦 (XIE Zhibang)
2026-06-09 10:54                                         ` [PATCH v4] " 谢致邦 (XIE Zhibang)
2026-06-09 11:06                                           ` sashiko-bot [this message]
2026-06-09 13:07                                       ` [PATCH v3] " Hans de Goede
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)
2026-06-01 18:47             ` sashiko-bot
2026-06-03 10:22               ` [PATCH v3 0/3] HID: i2c-hid: Fix some PRP0001 touchpads probe after OF/ACPI split 谢致邦 (XIE Zhibang)
     [not found]               ` <20260603102239.26491-1-Yeking@Red54.com>
2026-06-03 10:22                 ` [PATCH v3 1/3] HID: i2c-hid-acpi: Move blacklist check to probe() before devm_kzalloc() 谢致邦 (XIE Zhibang)
2026-06-03 10:22                 ` [PATCH v3 2/3] HID: i2c-hid: Move common ACPI _DSM helper into core 谢致邦 (XIE Zhibang)
2026-06-03 10:22                 ` [PATCH v3 3/3] HID: i2c-hid-of: Fall back to ACPI _DSM when hid-descr-addr is missing 谢致邦 (XIE Zhibang)
2026-05-27 16:00 ` [PATCH] HID: i2c-hid-acpi: Add PRP0001 to match table and OF alias sashiko-bot

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=20260609110608.3F4C21F00898@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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