diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-09-04 00:45:34 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-09-11 01:09:40 -0400 |
commit | 1c7827ae70e7c8456e08f7bb9ef2238d27814cbe (patch) | |
tree | 70d6dc74fad758801d7a9c1cebfd812e81cccd29 /drivers/input | |
parent | 41c372dcad935fe7c27ec45211bad810515110bd (diff) |
Input: i8042 - bypass AUX IRQ delivery test on laptops
It seems that many laptops do not fully implement AUX LOOP command in
their keyboard controllers, causing issues with touchpad detection.
We know however that almost every laptop/portable uses a PS/2 pointing
device and, even if user disables it in favor of an external mouse,
the system will not use IRQ 12 for anything else. Therefore we may
bypass AUX IRQ delivery test when running on a laptop and assume that
it is routed properly.
Just to be safe we require the box to have good PNP data in order to
bypass the test.
[Jin Dongming <jin.dongming@np.css.fujitsu.com>: fix crash caused
by missing terminator in the DMI table]
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/serio/i8042-x86ia64io.h | 33 | ||||
-rw-r--r-- | drivers/input/serio/i8042.c | 4 |
2 files changed, 36 insertions, 1 deletions
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index ae04d8a494e5..66829a860eec 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h | |||
@@ -449,6 +449,34 @@ static struct dmi_system_id __initdata i8042_dmi_nopnp_table[] = { | |||
449 | }, | 449 | }, |
450 | { } | 450 | { } |
451 | }; | 451 | }; |
452 | |||
453 | static struct dmi_system_id __initdata i8042_dmi_laptop_table[] = { | ||
454 | { | ||
455 | .ident = "Portable", | ||
456 | .matches = { | ||
457 | DMI_MATCH(DMI_CHASSIS_TYPE, "8"), /* Portable */ | ||
458 | }, | ||
459 | }, | ||
460 | { | ||
461 | .ident = "Laptop", | ||
462 | .matches = { | ||
463 | DMI_MATCH(DMI_CHASSIS_TYPE, "9"), /* Laptop */ | ||
464 | }, | ||
465 | }, | ||
466 | { | ||
467 | .ident = "Notebook", | ||
468 | .matches = { | ||
469 | DMI_MATCH(DMI_CHASSIS_TYPE, "10"), /* Notebook */ | ||
470 | }, | ||
471 | }, | ||
472 | { | ||
473 | .ident = "Sub-Notebook", | ||
474 | .matches = { | ||
475 | DMI_MATCH(DMI_CHASSIS_TYPE, "14"), /* Sub-Notebook */ | ||
476 | }, | ||
477 | }, | ||
478 | { } | ||
479 | }; | ||
452 | #endif | 480 | #endif |
453 | 481 | ||
454 | /* | 482 | /* |
@@ -727,6 +755,11 @@ static int __init i8042_pnp_init(void) | |||
727 | i8042_kbd_irq = i8042_pnp_kbd_irq; | 755 | i8042_kbd_irq = i8042_pnp_kbd_irq; |
728 | i8042_aux_irq = i8042_pnp_aux_irq; | 756 | i8042_aux_irq = i8042_pnp_aux_irq; |
729 | 757 | ||
758 | #ifdef CONFIG_X86 | ||
759 | i8042_bypass_aux_irq_test = !pnp_data_busted && | ||
760 | dmi_check_system(i8042_dmi_laptop_table); | ||
761 | #endif | ||
762 | |||
730 | return 0; | 763 | return 0; |
731 | } | 764 | } |
732 | 765 | ||
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 9f5c0506242f..b53a015bf8a5 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c | |||
@@ -83,6 +83,8 @@ module_param_named(debug, i8042_debug, bool, 0600); | |||
83 | MODULE_PARM_DESC(debug, "Turn i8042 debugging mode on and off"); | 83 | MODULE_PARM_DESC(debug, "Turn i8042 debugging mode on and off"); |
84 | #endif | 84 | #endif |
85 | 85 | ||
86 | static bool i8042_bypass_aux_irq_test; | ||
87 | |||
86 | #include "i8042.h" | 88 | #include "i8042.h" |
87 | 89 | ||
88 | static DEFINE_SPINLOCK(i8042_lock); | 90 | static DEFINE_SPINLOCK(i8042_lock); |
@@ -641,7 +643,7 @@ static int __devinit i8042_check_aux(void) | |||
641 | * used it for a PCI card or somethig else. | 643 | * used it for a PCI card or somethig else. |
642 | */ | 644 | */ |
643 | 645 | ||
644 | if (i8042_noloop || aux_loop_broken) { | 646 | if (i8042_noloop || i8042_bypass_aux_irq_test || aux_loop_broken) { |
645 | /* | 647 | /* |
646 | * Without LOOP command we can't test AUX IRQ delivery. Assume the port | 648 | * Without LOOP command we can't test AUX IRQ delivery. Assume the port |
647 | * is working and hope we are right. | 649 | * is working and hope we are right. |