Skip to content

FROMLIST: HID: i2c-hid: Refactor _DSM helper and add i2c-hid-acpi-prp0001 driver#28

Open
Red54 wants to merge 1 commit into
AOSC-Tracking:aosc/v7.0.13from
Red54:aosc/v7.0.13
Open

FROMLIST: HID: i2c-hid: Refactor _DSM helper and add i2c-hid-acpi-prp0001 driver#28
Red54 wants to merge 1 commit into
AOSC-Tracking:aosc/v7.0.13from
Red54:aosc/v7.0.13

Conversation

@Red54

@Red54 Red54 commented Jun 23, 2026

Copy link
Copy Markdown

Move the _DSM call that gets the HID descriptor address from i2c-hid-acpi.c into i2c-hid-acpi.h as a static inline so both the ACPI and the new PRP0001 driver can use it. While refactoring, move the blacklist check and the _DSM call to the top of probe() to avoid a pointless alloc when the device is blacklisted or does not implement the _DSM.

Some devices, for example the Lenovo KaiTian N60d and Inspur CP300L3, are declared with _HID "PRP0001" and _DSD compatible "hid-over-i2c" but lack "hid-descr-addr" from the _DSD and provide the HID descriptor address only through an ACPI _DSM. The OF driver fails to probe them because it requires hid-descr-addr. Add a new driver that handles these devices by calling the shared _DSM helper.

Fixes: b33752c ("HID: i2c-hid: Reorganize so ACPI and OF are separate modules")
Link: https://lore.kernel.org/all/tencent_8AE8ED913FEC8151B4BA3D85D6BB7F3ACF08@qq.com/

…0001 driver

Move the _DSM call that gets the HID descriptor address from
i2c-hid-acpi.c into i2c-hid-acpi.h as a static inline so both the ACPI
and the new PRP0001 driver can use it. While refactoring, move the
blacklist check and the _DSM call to the top of probe() to avoid a
pointless alloc when the device is blacklisted or does not implement the
_DSM.

Some devices, for example the Lenovo KaiTian N60d and Inspur CP300L3,
are declared with _HID "PRP0001" and _DSD compatible "hid-over-i2c" but
lack "hid-descr-addr" from the _DSD and provide the HID descriptor
address only through an ACPI _DSM. The OF driver fails to probe them
because it requires hid-descr-addr. Add a new driver that handles these
devices by calling the shared _DSM helper.

Fixes: b33752c ("HID: i2c-hid: Reorganize so ACPI and OF are separate modules")
Link: https://lore.kernel.org/all/tencent_8AE8ED913FEC8151B4BA3D85D6BB7F3ACF08@qq.com/
Signed-off-by: 谢致邦 (XIE Zhibang) <Yeking@Red54.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant