diff mbox series

[v2,1/2] Input: i8042: Avoid probing if no keyboard and mouse are set in quirks

Message ID 20231206212140.7458-1-mario.limonciello@amd.com
State New
Headers show
Series [v2,1/2] Input: i8042: Avoid probing if no keyboard and mouse are set in quirks | expand

Commit Message

Mario Limonciello Dec. 6, 2023, 9:21 p.m. UTC
Some laptops have an i8042 controller in the SOC, nothing mentioned in
ACPI PNP and nothing connected to the controller. Add the ability to
skip probing in this case.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/input/serio/i8042-acpipnpio.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

Rahul Rameshbabu Dec. 6, 2023, 9:54 p.m. UTC | #1
On Wed, 06 Dec, 2023 15:21:40 -0600 Mario Limonciello <mario.limonciello@amd.com> wrote:
> The Framework 16" laptop doesn't have a PS/2 keyboard. At bootup the
> following messages are emitted:
>
> i8042: PNP: No PS/2 controller found.
> i8042: PNP: Probing ports directly.
> i8042: Can't read CTR while initializing i8042
> i8042: probe of i8042 failed with error -5
>
> There are no PNP devices as those listed in `pnp_kbd_devids` but
> i8042_pnp_init() ignores this and still runs and will continue to
> try to probe.
>
> As there is no PS/2 keyboard or mouse in this laptop, set a quirk
> to avoid this behavior.
>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---

Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Rahul Rameshbabu Dec. 6, 2023, 9:55 p.m. UTC | #2
On Wed, 06 Dec, 2023 15:21:39 -0600 Mario Limonciello <mario.limonciello@amd.com> wrote:
> Some laptops have an i8042 controller in the SOC, nothing mentioned in
> ACPI PNP and nothing connected to the controller. Add the ability to
> skip probing in this case.
>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---

Thanks. I think this is a good choice for handling the issue you
presented with the Framework 16.

Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Mario Limonciello Dec. 7, 2023, 8:39 p.m. UTC | #3
On 12/6/2023 15:55, Rahul Rameshbabu wrote:
> On Wed, 06 Dec, 2023 15:21:39 -0600 Mario Limonciello <mario.limonciello@amd.com> wrote:
>> Some laptops have an i8042 controller in the SOC, nothing mentioned in
>> ACPI PNP and nothing connected to the controller. Add the ability to
>> skip probing in this case.
>>
>> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
>> ---
> 
> Thanks. I think this is a good choice for handling the issue you
> presented with the Framework 16.
> 
> Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>

Thanks!

Dmitry,

Are you OK with this?  The other direction I considered was to add a DMI 
BIOS year check and "only continue to probe" non PNP devices on systems 
older than 2023.

That could let you cut and run without needing to continue to add quirks 
like this but it could be riskier.
diff mbox series

Patch

diff --git a/drivers/input/serio/i8042-acpipnpio.h b/drivers/input/serio/i8042-acpipnpio.h
index 9c39553d30fa..0fd88bbfaee1 100644
--- a/drivers/input/serio/i8042-acpipnpio.h
+++ b/drivers/input/serio/i8042-acpipnpio.h
@@ -1707,6 +1707,9 @@  static int __init i8042_platform_init(void)
 		"");
 #endif
 
+	if (i8042_nokbd && i8042_noaux)
+		return -ENODEV;
+
 	retval = i8042_pnp_init();
 	if (retval)
 		return retval;