aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/kernel-parameters.txt1
-rw-r--r--drivers/input/serio/i8042-x86ia64io.h32
-rw-r--r--drivers/input/serio/i8042.c14
3 files changed, 47 insertions, 0 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 10d51c2f10d7..8013b4dd4460 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1243,6 +1243,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1243 i8042.notimeout [HW] Ignore timeout condition signalled by controller 1243 i8042.notimeout [HW] Ignore timeout condition signalled by controller
1244 i8042.reset [HW] Reset the controller during init and cleanup 1244 i8042.reset [HW] Reset the controller during init and cleanup
1245 i8042.unlock [HW] Unlock (ignore) the keylock 1245 i8042.unlock [HW] Unlock (ignore) the keylock
1246 i8042.kbdreset [HW] Reset device connected to KBD port
1246 1247
1247 i810= [HW,DRM] 1248 i810= [HW,DRM]
1248 1249
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
index c66d1b53843e..97cdc58d1894 100644
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -745,6 +745,35 @@ static const struct dmi_system_id __initconst i8042_dmi_dritek_table[] = {
745 { } 745 { }
746}; 746};
747 747
748/*
749 * Some laptops need keyboard reset before probing for the trackpad to get
750 * it detected, initialised & finally work.
751 */
752static const struct dmi_system_id __initconst i8042_dmi_kbdreset_table[] = {
753 {
754 /* Gigabyte P35 v2 - Elantech touchpad */
755 .matches = {
756 DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
757 DMI_MATCH(DMI_PRODUCT_NAME, "P35V2"),
758 },
759 },
760 {
761 /* Aorus branded Gigabyte X3 Plus - Elantech touchpad */
762 .matches = {
763 DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
764 DMI_MATCH(DMI_PRODUCT_NAME, "X3"),
765 },
766 },
767 {
768 /* Gigabyte P34 - Elantech touchpad */
769 .matches = {
770 DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
771 DMI_MATCH(DMI_PRODUCT_NAME, "P34"),
772 },
773 },
774 { }
775};
776
748#endif /* CONFIG_X86 */ 777#endif /* CONFIG_X86 */
749 778
750#ifdef CONFIG_PNP 779#ifdef CONFIG_PNP
@@ -1040,6 +1069,9 @@ static int __init i8042_platform_init(void)
1040 if (dmi_check_system(i8042_dmi_dritek_table)) 1069 if (dmi_check_system(i8042_dmi_dritek_table))
1041 i8042_dritek = true; 1070 i8042_dritek = true;
1042 1071
1072 if (dmi_check_system(i8042_dmi_kbdreset_table))
1073 i8042_kbdreset = true;
1074
1043 /* 1075 /*
1044 * A20 was already enabled during early kernel init. But some buggy 1076 * A20 was already enabled during early kernel init. But some buggy
1045 * BIOSes (in MSI Laptops) require A20 to be enabled using 8042 to 1077 * BIOSes (in MSI Laptops) require A20 to be enabled using 8042 to
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index f5a98af3b325..804d2e02010a 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -67,6 +67,10 @@ static bool i8042_notimeout;
67module_param_named(notimeout, i8042_notimeout, bool, 0); 67module_param_named(notimeout, i8042_notimeout, bool, 0);
68MODULE_PARM_DESC(notimeout, "Ignore timeouts signalled by i8042"); 68MODULE_PARM_DESC(notimeout, "Ignore timeouts signalled by i8042");
69 69
70static bool i8042_kbdreset;
71module_param_named(kbdreset, i8042_kbdreset, bool, 0);
72MODULE_PARM_DESC(kbdreset, "Reset device connected to KBD port");
73
70#ifdef CONFIG_X86 74#ifdef CONFIG_X86
71static bool i8042_dritek; 75static bool i8042_dritek;
72module_param_named(dritek, i8042_dritek, bool, 0); 76module_param_named(dritek, i8042_dritek, bool, 0);
@@ -790,6 +794,16 @@ static int __init i8042_check_aux(void)
790 return -1; 794 return -1;
791 795
792/* 796/*
797 * Reset keyboard (needed on some laptops to successfully detect
798 * touchpad, e.g., some Gigabyte laptop models with Elantech
799 * touchpads).
800 */
801 if (i8042_kbdreset) {
802 pr_warn("Attempting to reset device connected to KBD port\n");
803 i8042_kbd_write(NULL, (unsigned char) 0xff);
804 }
805
806/*
793 * Test AUX IRQ delivery to make sure BIOS did not grab the IRQ and 807 * Test AUX IRQ delivery to make sure BIOS did not grab the IRQ and
794 * used it for a PCI card or somethig else. 808 * used it for a PCI card or somethig else.
795 */ 809 */