aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/serio/i8042-x86ia64io.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2009-09-14 00:16:56 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2009-09-14 00:16:56 -0400
commitfc8e1ead9314cf0e0f1922e661428b93d3a50d88 (patch)
treef3cb97c4769b74f6627a59769f1ed5c92a13c58a /drivers/input/serio/i8042-x86ia64io.h
parent2bcaa6a4238094c5695d5b1943078388d82d3004 (diff)
parent9de48cc300fb10f7d9faa978670becf5e352462a (diff)
Merge branch 'next' into for-linus
Diffstat (limited to 'drivers/input/serio/i8042-x86ia64io.h')
-rw-r--r--drivers/input/serio/i8042-x86ia64io.h71
1 files changed, 52 insertions, 19 deletions
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
index ccbf23ece8e3..a39bc4eb902b 100644
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -457,6 +457,34 @@ static struct dmi_system_id __initdata i8042_dmi_nopnp_table[] = {
457 }, 457 },
458 { } 458 { }
459}; 459};
460
461static struct dmi_system_id __initdata i8042_dmi_laptop_table[] = {
462 {
463 .ident = "Portable",
464 .matches = {
465 DMI_MATCH(DMI_CHASSIS_TYPE, "8"), /* Portable */
466 },
467 },
468 {
469 .ident = "Laptop",
470 .matches = {
471 DMI_MATCH(DMI_CHASSIS_TYPE, "9"), /* Laptop */
472 },
473 },
474 {
475 .ident = "Notebook",
476 .matches = {
477 DMI_MATCH(DMI_CHASSIS_TYPE, "10"), /* Notebook */
478 },
479 },
480 {
481 .ident = "Sub-Notebook",
482 .matches = {
483 DMI_MATCH(DMI_CHASSIS_TYPE, "14"), /* Sub-Notebook */
484 },
485 },
486 { }
487};
460#endif 488#endif
461 489
462/* 490/*
@@ -530,9 +558,9 @@ static struct dmi_system_id __initdata i8042_dmi_dritek_table[] = {
530#ifdef CONFIG_PNP 558#ifdef CONFIG_PNP
531#include <linux/pnp.h> 559#include <linux/pnp.h>
532 560
533static int i8042_pnp_kbd_registered; 561static bool i8042_pnp_kbd_registered;
534static unsigned int i8042_pnp_kbd_devices; 562static unsigned int i8042_pnp_kbd_devices;
535static int i8042_pnp_aux_registered; 563static bool i8042_pnp_aux_registered;
536static unsigned int i8042_pnp_aux_devices; 564static unsigned int i8042_pnp_aux_devices;
537 565
538static int i8042_pnp_command_reg; 566static int i8042_pnp_command_reg;
@@ -620,12 +648,12 @@ static struct pnp_driver i8042_pnp_aux_driver = {
620static void i8042_pnp_exit(void) 648static void i8042_pnp_exit(void)
621{ 649{
622 if (i8042_pnp_kbd_registered) { 650 if (i8042_pnp_kbd_registered) {
623 i8042_pnp_kbd_registered = 0; 651 i8042_pnp_kbd_registered = false;
624 pnp_unregister_driver(&i8042_pnp_kbd_driver); 652 pnp_unregister_driver(&i8042_pnp_kbd_driver);
625 } 653 }
626 654
627 if (i8042_pnp_aux_registered) { 655 if (i8042_pnp_aux_registered) {
628 i8042_pnp_aux_registered = 0; 656 i8042_pnp_aux_registered = false;
629 pnp_unregister_driver(&i8042_pnp_aux_driver); 657 pnp_unregister_driver(&i8042_pnp_aux_driver);
630 } 658 }
631} 659}
@@ -633,12 +661,12 @@ static void i8042_pnp_exit(void)
633static int __init i8042_pnp_init(void) 661static int __init i8042_pnp_init(void)
634{ 662{
635 char kbd_irq_str[4] = { 0 }, aux_irq_str[4] = { 0 }; 663 char kbd_irq_str[4] = { 0 }, aux_irq_str[4] = { 0 };
636 int pnp_data_busted = 0; 664 int pnp_data_busted = false;
637 int err; 665 int err;
638 666
639#ifdef CONFIG_X86 667#ifdef CONFIG_X86
640 if (dmi_check_system(i8042_dmi_nopnp_table)) 668 if (dmi_check_system(i8042_dmi_nopnp_table))
641 i8042_nopnp = 1; 669 i8042_nopnp = true;
642#endif 670#endif
643 671
644 if (i8042_nopnp) { 672 if (i8042_nopnp) {
@@ -648,11 +676,11 @@ static int __init i8042_pnp_init(void)
648 676
649 err = pnp_register_driver(&i8042_pnp_kbd_driver); 677 err = pnp_register_driver(&i8042_pnp_kbd_driver);
650 if (!err) 678 if (!err)
651 i8042_pnp_kbd_registered = 1; 679 i8042_pnp_kbd_registered = true;
652 680
653 err = pnp_register_driver(&i8042_pnp_aux_driver); 681 err = pnp_register_driver(&i8042_pnp_aux_driver);
654 if (!err) 682 if (!err)
655 i8042_pnp_aux_registered = 1; 683 i8042_pnp_aux_registered = true;
656 684
657 if (!i8042_pnp_kbd_devices && !i8042_pnp_aux_devices) { 685 if (!i8042_pnp_kbd_devices && !i8042_pnp_aux_devices) {
658 i8042_pnp_exit(); 686 i8042_pnp_exit();
@@ -680,9 +708,9 @@ static int __init i8042_pnp_init(void)
680 708
681#if defined(__ia64__) 709#if defined(__ia64__)
682 if (!i8042_pnp_kbd_devices) 710 if (!i8042_pnp_kbd_devices)
683 i8042_nokbd = 1; 711 i8042_nokbd = true;
684 if (!i8042_pnp_aux_devices) 712 if (!i8042_pnp_aux_devices)
685 i8042_noaux = 1; 713 i8042_noaux = true;
686#endif 714#endif
687 715
688 if (((i8042_pnp_data_reg & ~0xf) == (i8042_data_reg & ~0xf) && 716 if (((i8042_pnp_data_reg & ~0xf) == (i8042_data_reg & ~0xf) &&
@@ -693,7 +721,7 @@ static int __init i8042_pnp_init(void)
693 "using default %#x\n", 721 "using default %#x\n",
694 i8042_pnp_data_reg, i8042_data_reg); 722 i8042_pnp_data_reg, i8042_data_reg);
695 i8042_pnp_data_reg = i8042_data_reg; 723 i8042_pnp_data_reg = i8042_data_reg;
696 pnp_data_busted = 1; 724 pnp_data_busted = true;
697 } 725 }
698 726
699 if (((i8042_pnp_command_reg & ~0xf) == (i8042_command_reg & ~0xf) && 727 if (((i8042_pnp_command_reg & ~0xf) == (i8042_command_reg & ~0xf) &&
@@ -704,7 +732,7 @@ static int __init i8042_pnp_init(void)
704 "using default %#x\n", 732 "using default %#x\n",
705 i8042_pnp_command_reg, i8042_command_reg); 733 i8042_pnp_command_reg, i8042_command_reg);
706 i8042_pnp_command_reg = i8042_command_reg; 734 i8042_pnp_command_reg = i8042_command_reg;
707 pnp_data_busted = 1; 735 pnp_data_busted = true;
708 } 736 }
709 737
710 if (!i8042_nokbd && !i8042_pnp_kbd_irq) { 738 if (!i8042_nokbd && !i8042_pnp_kbd_irq) {
@@ -712,7 +740,7 @@ static int __init i8042_pnp_init(void)
712 "PNP: PS/2 controller doesn't have KBD irq; " 740 "PNP: PS/2 controller doesn't have KBD irq; "
713 "using default %d\n", i8042_kbd_irq); 741 "using default %d\n", i8042_kbd_irq);
714 i8042_pnp_kbd_irq = i8042_kbd_irq; 742 i8042_pnp_kbd_irq = i8042_kbd_irq;
715 pnp_data_busted = 1; 743 pnp_data_busted = true;
716 } 744 }
717 745
718 if (!i8042_noaux && !i8042_pnp_aux_irq) { 746 if (!i8042_noaux && !i8042_pnp_aux_irq) {
@@ -721,7 +749,7 @@ static int __init i8042_pnp_init(void)
721 "PNP: PS/2 appears to have AUX port disabled, " 749 "PNP: PS/2 appears to have AUX port disabled, "
722 "if this is incorrect please boot with " 750 "if this is incorrect please boot with "
723 "i8042.nopnp\n"); 751 "i8042.nopnp\n");
724 i8042_noaux = 1; 752 i8042_noaux = true;
725 } else { 753 } else {
726 printk(KERN_WARNING 754 printk(KERN_WARNING
727 "PNP: PS/2 controller doesn't have AUX irq; " 755 "PNP: PS/2 controller doesn't have AUX irq; "
@@ -735,6 +763,11 @@ static int __init i8042_pnp_init(void)
735 i8042_kbd_irq = i8042_pnp_kbd_irq; 763 i8042_kbd_irq = i8042_pnp_kbd_irq;
736 i8042_aux_irq = i8042_pnp_aux_irq; 764 i8042_aux_irq = i8042_pnp_aux_irq;
737 765
766#ifdef CONFIG_X86
767 i8042_bypass_aux_irq_test = !pnp_data_busted &&
768 dmi_check_system(i8042_dmi_laptop_table);
769#endif
770
738 return 0; 771 return 0;
739} 772}
740 773
@@ -763,21 +796,21 @@ static int __init i8042_platform_init(void)
763 return retval; 796 return retval;
764 797
765#if defined(__ia64__) 798#if defined(__ia64__)
766 i8042_reset = 1; 799 i8042_reset = true;
767#endif 800#endif
768 801
769#ifdef CONFIG_X86 802#ifdef CONFIG_X86
770 if (dmi_check_system(i8042_dmi_reset_table)) 803 if (dmi_check_system(i8042_dmi_reset_table))
771 i8042_reset = 1; 804 i8042_reset = true;
772 805
773 if (dmi_check_system(i8042_dmi_noloop_table)) 806 if (dmi_check_system(i8042_dmi_noloop_table))
774 i8042_noloop = 1; 807 i8042_noloop = true;
775 808
776 if (dmi_check_system(i8042_dmi_nomux_table)) 809 if (dmi_check_system(i8042_dmi_nomux_table))
777 i8042_nomux = 1; 810 i8042_nomux = true;
778 811
779 if (dmi_check_system(i8042_dmi_dritek_table)) 812 if (dmi_check_system(i8042_dmi_dritek_table))
780 i8042_dritek = 1; 813 i8042_dritek = true;
781#endif /* CONFIG_X86 */ 814#endif /* CONFIG_X86 */
782 815
783 return retval; 816 return retval;