From: sashiko-bot@kernel.org
Cc: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com
Subject: Re: [PATCH v2 3/3] HID: i2c-hid-of: Fall back to ACPI _DSM when hid-descr-addr is missing
Date: Mon, 01 Jun 2026 18:47:47 +0000 [thread overview]
Message-ID: <20260601184747.843DB1F00893@smtp.kernel.org> (raw)
In-Reply-To: <tencent_0EE402E968E17B8EACEDFF0E9EBDDBF17E09@qq.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The i2c-hid-of driver uses the ACPI _DSM fallback to obtain the HID descriptor address but does not provide a restore_sequence callback to re-evaluate the _DSM during hibernation (S4) restore.
--
commit 3ebee1e22f96c1e99e3c6adbd49d92242f2497f9
Author: 谢致邦 (XIE Zhibang) <Yeking@Red54.com>
HID: i2c-hid-of: Fall back to ACPI _DSM when hid-descr-addr is missing
This commit updates the i2c-hid-of driver to fall back to the ACPI _DSM
method for obtaining the HID descriptor address when the "hid-descr-addr"
property is missing. It specifically targets devices using the "PRP0001"
_HID with a "hid-over-i2c" compatible string. Safe default power and reset
delays are also configured for these devices.
> diff --git a/drivers/hid/i2c-hid/i2c-hid-of.c b/drivers/hid/i2c-hid/i2c-hid-of.c
> index 57379b77e9778..e925e2d2cfe0d 100644
> --- a/drivers/hid/i2c-hid/i2c-hid-of.c
> +++ b/drivers/hid/i2c-hid/i2c-hid-of.c
> @@ -92,6 +92,36 @@ static int i2c_hid_of_probe(struct i2c_client *client)
> ihid_of->ops.power_down = i2c_hid_of_power_down;
>
> ret = device_property_read_u32(dev, "hid-descr-addr", &val);
> + if (ret) {
> + /*
> + * Some devices, for example the Lenovo KaiTian N60d and Inspur
> + * CP300L3, declare their I2C HID touchpad with _HID "PRP0001"
> + * and _DSD compatible "hid-over-i2c" but lack the
> + * "hid-descr-addr" property. Fall back to _DSM to obtain the
> + * HID descriptor address.
> + */
> + int dsm_ret = i2c_hid_core_acpi_get_descriptor(dev);
[Severity: High]
Does this missing PM callback break S4 hibernation restore?
The native i2c-hid-acpi driver re-evaluates the _DSM method during hibernation
restore via its restore_sequence callback to reinitialize the hardware state,
such as switching the hardware back from PS/2 emulation to I2C-HID mode.
Because this ACPI _DSM fallback is added in i2c_hid_of_probe() without also
wiring up ops.restore_sequence in the OF driver, will these touchpads fail
to resume correctly and become unresponsive after waking from S4?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260601181510.38705-1-Yeking@Red54.com?part=3
next prev parent reply other threads:[~2026-06-01 18:47 UTC|newest]
Thread overview: 15+ 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-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 [this message]
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=20260601184747.843DB1F00893@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