Re: [PATCH v3] HID: i2c-hid: Refactor _DSM helper and add i2c-hid-acpi-prp0001 driver
From: Hans de Goede <hansg@kernel.org>
Date: 2026-06-09 13:07:57
Also in:
lkml, sashiko-reviews
From: Hans de Goede <hansg@kernel.org>
Date: 2026-06-09 13:07:57
Also in:
lkml, sashiko-reviews
Hi, On 9-Jun-26 12:10, 谢致邦 (XIE Zhibang) wrote:
Hi Hans, Thanks for the review. The current header-based approach lets i2c-hid-acpi-prp0001.c work independently by just including a header for the _DSM helper. Switching to EXPORT_SYMBOL_GPL would force prp0001 to depend on i2c-hid-acpi — a Kconfig "depends on I2C_HID_ACPI", plus module-level dependency at load time — all for sharing a single function. I find that hard to accept. I understand that adding a new header for one prototype is unusual, though it contains only a single static inline function and introduces no runtime dependency between the two drivers. Looking back at the full discussion: Benjamin made it clear from the start that he doesn't want i2c-hid-of.c handling ACPI _DSM fallback. His line is that ACPI devices and OF devices should each go through their own drivers without cross-contamination. If you still prefer exporting the function from i2c-hid-acpi.c, then prp0001 would have to drag i2c-hid-acpi along with it — an independent leaf driver turned into something that can't stand alone.
Well it is a special case/version of the ACPI driver so depending on it seems fine to me. Anyways if you prefer the inline function in header solution that is fine with me. Lets see what bentiss has to say about this. Regards, Hans