diff options
| -rw-r--r-- | drivers/input/mouse/lifebook.c | 20 | ||||
| -rw-r--r-- | drivers/input/mouse/lifebook.h | 4 | ||||
| -rw-r--r-- | drivers/input/mouse/psmouse-base.c | 3 | ||||
| -rw-r--r-- | drivers/input/mouse/synaptics.c | 23 | ||||
| -rw-r--r-- | drivers/input/mouse/synaptics.h | 1 |
5 files changed, 38 insertions, 13 deletions
diff --git a/drivers/input/mouse/lifebook.c b/drivers/input/mouse/lifebook.c index 54b7f64d6e62..cd81cefdc1c5 100644 --- a/drivers/input/mouse/lifebook.c +++ b/drivers/input/mouse/lifebook.c | |||
| @@ -25,11 +25,13 @@ struct lifebook_data { | |||
| 25 | char phys[32]; | 25 | char phys[32]; |
| 26 | }; | 26 | }; |
| 27 | 27 | ||
| 28 | static bool lifebook_present; | ||
| 29 | |||
| 28 | static const char *desired_serio_phys; | 30 | static const char *desired_serio_phys; |
| 29 | 31 | ||
| 30 | static int lifebook_set_serio_phys(const struct dmi_system_id *d) | 32 | static int lifebook_limit_serio3(const struct dmi_system_id *d) |
| 31 | { | 33 | { |
| 32 | desired_serio_phys = d->driver_data; | 34 | desired_serio_phys = "isa0060/serio3"; |
| 33 | return 0; | 35 | return 0; |
| 34 | } | 36 | } |
| 35 | 37 | ||
| @@ -41,7 +43,8 @@ static int lifebook_set_6byte_proto(const struct dmi_system_id *d) | |||
| 41 | return 0; | 43 | return 0; |
| 42 | } | 44 | } |
| 43 | 45 | ||
| 44 | static const struct dmi_system_id lifebook_dmi_table[] = { | 46 | static const struct dmi_system_id __initconst lifebook_dmi_table[] = { |
| 47 | #if defined(CONFIG_DMI) && defined(CONFIG_X86) | ||
| 45 | { | 48 | { |
| 46 | .ident = "FLORA-ie 55mi", | 49 | .ident = "FLORA-ie 55mi", |
| 47 | .matches = { | 50 | .matches = { |
| @@ -83,8 +86,7 @@ static const struct dmi_system_id lifebook_dmi_table[] = { | |||
| 83 | .matches = { | 86 | .matches = { |
| 84 | DMI_MATCH(DMI_PRODUCT_NAME, "CF-18"), | 87 | DMI_MATCH(DMI_PRODUCT_NAME, "CF-18"), |
| 85 | }, | 88 | }, |
| 86 | .callback = lifebook_set_serio_phys, | 89 | .callback = lifebook_limit_serio3, |
| 87 | .driver_data = "isa0060/serio3", | ||
| 88 | }, | 90 | }, |
| 89 | { | 91 | { |
| 90 | .ident = "Panasonic CF-28", | 92 | .ident = "Panasonic CF-28", |
| @@ -116,8 +118,14 @@ static const struct dmi_system_id lifebook_dmi_table[] = { | |||
| 116 | }, | 118 | }, |
| 117 | }, | 119 | }, |
| 118 | { } | 120 | { } |
| 121 | #endif | ||
| 119 | }; | 122 | }; |
| 120 | 123 | ||
| 124 | void __init lifebook_module_init(void) | ||
| 125 | { | ||
| 126 | lifebook_present = dmi_check_system(lifebook_dmi_table); | ||
| 127 | } | ||
| 128 | |||
| 121 | static psmouse_ret_t lifebook_process_byte(struct psmouse *psmouse) | 129 | static psmouse_ret_t lifebook_process_byte(struct psmouse *psmouse) |
| 122 | { | 130 | { |
| 123 | struct lifebook_data *priv = psmouse->private; | 131 | struct lifebook_data *priv = psmouse->private; |
| @@ -243,7 +251,7 @@ static void lifebook_disconnect(struct psmouse *psmouse) | |||
| 243 | 251 | ||
| 244 | int lifebook_detect(struct psmouse *psmouse, bool set_properties) | 252 | int lifebook_detect(struct psmouse *psmouse, bool set_properties) |
| 245 | { | 253 | { |
| 246 | if (!dmi_check_system(lifebook_dmi_table)) | 254 | if (!lifebook_present) |
| 247 | return -1; | 255 | return -1; |
| 248 | 256 | ||
| 249 | if (desired_serio_phys && | 257 | if (desired_serio_phys && |
diff --git a/drivers/input/mouse/lifebook.h b/drivers/input/mouse/lifebook.h index 407cb226bc0a..4c4326c6f504 100644 --- a/drivers/input/mouse/lifebook.h +++ b/drivers/input/mouse/lifebook.h | |||
| @@ -12,9 +12,13 @@ | |||
| 12 | #define _LIFEBOOK_H | 12 | #define _LIFEBOOK_H |
| 13 | 13 | ||
| 14 | #ifdef CONFIG_MOUSE_PS2_LIFEBOOK | 14 | #ifdef CONFIG_MOUSE_PS2_LIFEBOOK |
| 15 | void lifebook_module_init(void); | ||
| 15 | int lifebook_detect(struct psmouse *psmouse, bool set_properties); | 16 | int lifebook_detect(struct psmouse *psmouse, bool set_properties); |
| 16 | int lifebook_init(struct psmouse *psmouse); | 17 | int lifebook_init(struct psmouse *psmouse); |
| 17 | #else | 18 | #else |
| 19 | inline void lifebook_module_init(void) | ||
| 20 | { | ||
| 21 | } | ||
| 18 | inline int lifebook_detect(struct psmouse *psmouse, bool set_properties) | 22 | inline int lifebook_detect(struct psmouse *psmouse, bool set_properties) |
| 19 | { | 23 | { |
| 20 | return -ENOSYS; | 24 | return -ENOSYS; |
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index acd16707696e..fd0bc094616a 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c | |||
| @@ -1696,6 +1696,9 @@ static int __init psmouse_init(void) | |||
| 1696 | { | 1696 | { |
| 1697 | int err; | 1697 | int err; |
| 1698 | 1698 | ||
| 1699 | lifebook_module_init(); | ||
| 1700 | synaptics_module_init(); | ||
| 1701 | |||
| 1699 | kpsmoused_wq = create_singlethread_workqueue("kpsmoused"); | 1702 | kpsmoused_wq = create_singlethread_workqueue("kpsmoused"); |
| 1700 | if (!kpsmoused_wq) { | 1703 | if (!kpsmoused_wq) { |
| 1701 | printk(KERN_ERR "psmouse: failed to create kpsmoused workqueue\n"); | 1704 | printk(KERN_ERR "psmouse: failed to create kpsmoused workqueue\n"); |
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index f4a61252bcc9..36d6df4c0a78 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,9 +630,10 @@ 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 | .ident = "Toshiba Satellite", |
| 637 | .matches = { | 639 | .matches = { |
| @@ -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; |
diff --git a/drivers/input/mouse/synaptics.h b/drivers/input/mouse/synaptics.h index 871f6fe377f9..838e7f2c9b30 100644 --- a/drivers/input/mouse/synaptics.h +++ b/drivers/input/mouse/synaptics.h | |||
| @@ -105,6 +105,7 @@ struct synaptics_data { | |||
| 105 | int scroll; | 105 | int scroll; |
| 106 | }; | 106 | }; |
| 107 | 107 | ||
| 108 | void synaptics_module_init(void); | ||
| 108 | int synaptics_detect(struct psmouse *psmouse, bool set_properties); | 109 | int synaptics_detect(struct psmouse *psmouse, bool set_properties); |
| 109 | int synaptics_init(struct psmouse *psmouse); | 110 | int synaptics_init(struct psmouse *psmouse); |
| 110 | void synaptics_reset(struct psmouse *psmouse); | 111 | void synaptics_reset(struct psmouse *psmouse); |
