diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-09 22:52:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-09 22:52:01 -0500 |
commit | fa395aaec823b9d1a5800913a6b5d0e6d1c5ced2 (patch) | |
tree | d599abe9f4f48f1737da50fa9a48dadfd08100e3 /drivers/input/mouse/synaptics.c | |
parent | 3e7468313758913c5e4d372f35b271b96bad1298 (diff) | |
parent | 1f26978afd123deb22dd3c7dc75771a02f6e03f6 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (51 commits)
Input: appletouch - give up maintainership
Input: dm355evm_kbd - switch to using sparse keymap library
Input: wistron_btns - switch to using sparse keymap library
Input: add generic support for sparse keymaps
Input: fix memory leak in force feedback core
Input: wistron - remove identification strings from DMI table
Input: psmouse - remove identification strings from DMI tables
Input: atkbd - remove identification strings from DMI table
Input: i8042 - remove identification strings from DMI tables
DMI: allow omitting ident strings in DMI tables
Input: psmouse - do not carry DMI data around
Input: matrix-keypad - switch to using dev_pm_ops
Input: keyboard - fix lack of locking when traversing handler->h_list
Input: gpio_keys - scan gpio state at probe and resume time
Input: keyboard - add locking around event handling
Input: usbtouchscreen - add support for ET&T TC5UH touchscreen controller
Input: xpad - add two new Xbox 360 devices
Input: polled device - do not start polling if interval is zero
Input: polled device - schedule first poll immediately
Input: add S3C24XX touchscreen driver
...
Diffstat (limited to 'drivers/input/mouse/synaptics.c')
-rw-r--r-- | drivers/input/mouse/synaptics.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index f4a61252bcc9..05689e732191 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c | |||
@@ -24,6 +24,7 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/dmi.h> | ||
27 | #include <linux/input.h> | 28 | #include <linux/input.h> |
28 | #include <linux/serio.h> | 29 | #include <linux/serio.h> |
29 | #include <linux/libps2.h> | 30 | #include <linux/libps2.h> |
@@ -629,25 +630,26 @@ static int synaptics_reconnect(struct psmouse *psmouse) | |||
629 | return 0; | 630 | return 0; |
630 | } | 631 | } |
631 | 632 | ||
632 | #if defined(__i386__) | 633 | static bool impaired_toshiba_kbc; |
633 | #include <linux/dmi.h> | 634 | |
634 | static const struct dmi_system_id toshiba_dmi_table[] = { | 635 | static const struct dmi_system_id __initconst toshiba_dmi_table[] = { |
636 | #if defined(CONFIG_DMI) && defined(CONFIG_X86) | ||
635 | { | 637 | { |
636 | .ident = "Toshiba Satellite", | 638 | /* Toshiba Satellite */ |
637 | .matches = { | 639 | .matches = { |
638 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | 640 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), |
639 | DMI_MATCH(DMI_PRODUCT_NAME, "Satellite"), | 641 | DMI_MATCH(DMI_PRODUCT_NAME, "Satellite"), |
640 | }, | 642 | }, |
641 | }, | 643 | }, |
642 | { | 644 | { |
643 | .ident = "Toshiba Dynabook", | 645 | /* Toshiba Dynabook */ |
644 | .matches = { | 646 | .matches = { |
645 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | 647 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), |
646 | DMI_MATCH(DMI_PRODUCT_NAME, "dynabook"), | 648 | DMI_MATCH(DMI_PRODUCT_NAME, "dynabook"), |
647 | }, | 649 | }, |
648 | }, | 650 | }, |
649 | { | 651 | { |
650 | .ident = "Toshiba Portege M300", | 652 | /* Toshiba Portege M300 */ |
651 | .matches = { | 653 | .matches = { |
652 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | 654 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), |
653 | DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M300"), | 655 | DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M300"), |
@@ -655,7 +657,7 @@ static const struct dmi_system_id toshiba_dmi_table[] = { | |||
655 | 657 | ||
656 | }, | 658 | }, |
657 | { | 659 | { |
658 | .ident = "Toshiba Portege M300", | 660 | /* Toshiba Portege M300 */ |
659 | .matches = { | 661 | .matches = { |
660 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | 662 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), |
661 | DMI_MATCH(DMI_PRODUCT_NAME, "Portable PC"), | 663 | DMI_MATCH(DMI_PRODUCT_NAME, "Portable PC"), |
@@ -664,8 +666,13 @@ static const struct dmi_system_id toshiba_dmi_table[] = { | |||
664 | 666 | ||
665 | }, | 667 | }, |
666 | { } | 668 | { } |
667 | }; | ||
668 | #endif | 669 | #endif |
670 | }; | ||
671 | |||
672 | void __init synaptics_module_init(void) | ||
673 | { | ||
674 | impaired_toshiba_kbc = dmi_check_system(toshiba_dmi_table); | ||
675 | } | ||
669 | 676 | ||
670 | int synaptics_init(struct psmouse *psmouse) | 677 | int synaptics_init(struct psmouse *psmouse) |
671 | { | 678 | { |
@@ -718,18 +725,16 @@ int synaptics_init(struct psmouse *psmouse) | |||
718 | if (SYN_CAP_PASS_THROUGH(priv->capabilities)) | 725 | if (SYN_CAP_PASS_THROUGH(priv->capabilities)) |
719 | synaptics_pt_create(psmouse); | 726 | synaptics_pt_create(psmouse); |
720 | 727 | ||
721 | #if defined(__i386__) | ||
722 | /* | 728 | /* |
723 | * Toshiba's KBC seems to have trouble handling data from | 729 | * Toshiba's KBC seems to have trouble handling data from |
724 | * Synaptics as full rate, switch to lower rate which is roughly | 730 | * Synaptics as full rate, switch to lower rate which is roughly |
725 | * thye same as rate of standard PS/2 mouse. | 731 | * thye same as rate of standard PS/2 mouse. |
726 | */ | 732 | */ |
727 | if (psmouse->rate >= 80 && dmi_check_system(toshiba_dmi_table)) { | 733 | if (psmouse->rate >= 80 && impaired_toshiba_kbc) { |
728 | printk(KERN_INFO "synaptics: Toshiba %s detected, limiting rate to 40pps.\n", | 734 | printk(KERN_INFO "synaptics: Toshiba %s detected, limiting rate to 40pps.\n", |
729 | dmi_get_system_info(DMI_PRODUCT_NAME)); | 735 | dmi_get_system_info(DMI_PRODUCT_NAME)); |
730 | psmouse->rate = 40; | 736 | psmouse->rate = 40; |
731 | } | 737 | } |
732 | #endif | ||
733 | 738 | ||
734 | return 0; | 739 | return 0; |
735 | 740 | ||
@@ -740,6 +745,10 @@ int synaptics_init(struct psmouse *psmouse) | |||
740 | 745 | ||
741 | #else /* CONFIG_MOUSE_PS2_SYNAPTICS */ | 746 | #else /* CONFIG_MOUSE_PS2_SYNAPTICS */ |
742 | 747 | ||
748 | void __init synaptics_module_init(void) | ||
749 | { | ||
750 | } | ||
751 | |||
743 | int synaptics_init(struct psmouse *psmouse) | 752 | int synaptics_init(struct psmouse *psmouse) |
744 | { | 753 | { |
745 | return -ENOSYS; | 754 | return -ENOSYS; |