Skip to contentSkip to conversation

Implement i8042 detect by BIOS FADT i8042 flag

PATCH In review Wan Zongshun 2 participants 2 messages Dec 2, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Implement i8042 detect by BIOS FADT i8042 flag

Detecting x86 platform supporting i8042 or not, we should resort to BIOS's FADT i8042 flag per ACPI spec.

Currently, Windows is conforming to this spec, and request this flag to detect i8042 supporting.

---
 drivers/input/serio/i8042-x86ia64io.h | 4 ++++
 1 file changed, 4 insertions(+)
drivers/input/serio/i8042-x86ia64io.h +4 -0
index c115565..73686bd 100644
@@ -9,6 +9,7 @@
 
 #ifdef CONFIG_X86
 #include <asm/x86_init.h>
+#include <linux/acpi.h>
 #endif
 
 /*
@@ -1047,6 +1048,9 @@ static int __init i8042_platform_init(void)
 	/* Just return if pre-detection shows no i8042 controller exist */
 	if (!x86_platform.i8042_detect())
 		return -ENODEV;
+
+	if (!(acpi_gbl_FADT.boot_flags & ACPI_FADT_8042))
+		return -ENODEV;
 #endif
 
 /*
Signature · 1 line
1.9.1
Acked-by on v2 1/1
#1 lore raw
Quoted 24 lines · Wan Zongshun

Detecting x86 platform supporting i8042 or not, we should resort to BIOS's FADT i8042 flag per ACPI spec.

Currently, Windows is conforming to this spec, and request this flag to detect i8042 supporting.

---
 drivers/input/serio/i8042-x86ia64io.h | 4 ++++
 1 file changed, 4 insertions(+)
drivers/input/serio/i8042-x86ia64io.h +1 -0
index c115565..73686bd 100644
@@ -9,6 +9,7 @@
 
 #ifdef CONFIG_X86
 #include <asm/x86_init.h>
+#include <linux/acpi.h>
 #endif
 
 /*

drivers/input/serio/i8042-x86ia64io.h static int __init i8042_platform_init(void) · line 1054

Quoted 7 lines
drivers/input/serio/i8042-x86ia64io.h +3 -0
@@ -1047,6 +1048,9 @@ static int __init i8042_platform_init(void)
 	/* Just return if pre-detection shows no i8042 controller exist */
 	if (!x86_platform.i8042_detect())
 		return -ENODEV;
+
+	if (!(acpi_gbl_FADT.boot_flags & ACPI_FADT_8042))
+		return -ENODEV;
 #endif

with the small remark that whoever commits it, could add the URL of the microsoft document to the commit message for further reference.

Thanks.

Signature · 4 lines
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.