aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@queued.net>2010-12-23 04:19:38 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-12-23 04:21:23 -0500
commitef8313bb1a22e7d2125d9d758aa8a81f1de91d81 (patch)
treea3a182ac683ddf5d8c50218b7076cf44f02e2b47 /drivers/input
parent7ee99161a4febe53c906cb9becc596075fd6193e (diff)
Input: psmouse - disable the synaptics extension on OLPC machines
OLPC has switched to a Synaptics touchpad. It turns out that it's pretty useless in absolute mode. This patch looks for an OLPC system (via DMI tables), and refuses to init Synaptics mode in that scenario (falling back to relative mode). Signed-off-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/mouse/synaptics.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 53c65a634b26..a977ef4c6625 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -744,15 +744,45 @@ static const struct dmi_system_id __initconst toshiba_dmi_table[] = {
744#endif 744#endif
745}; 745};
746 746
747static bool broken_olpc_ec;
748
749static const struct dmi_system_id __initconst olpc_dmi_table[] = {
750#if defined(CONFIG_DMI) && defined(CONFIG_OLPC)
751 {
752 /* OLPC XO-1 or XO-1.5 */
753 .matches = {
754 DMI_MATCH(DMI_SYS_VENDOR, "OLPC"),
755 DMI_MATCH(DMI_PRODUCT_NAME, "XO"),
756 },
757 },
758 { }
759#endif
760};
761
747void __init synaptics_module_init(void) 762void __init synaptics_module_init(void)
748{ 763{
749 impaired_toshiba_kbc = dmi_check_system(toshiba_dmi_table); 764 impaired_toshiba_kbc = dmi_check_system(toshiba_dmi_table);
765 broken_olpc_ec = dmi_check_system(olpc_dmi_table);
750} 766}
751 767
752int synaptics_init(struct psmouse *psmouse) 768int synaptics_init(struct psmouse *psmouse)
753{ 769{
754 struct synaptics_data *priv; 770 struct synaptics_data *priv;
755 771
772 /*
773 * The OLPC XO has issues with Synaptics' absolute mode; similarly to
774 * the HGPK, it quickly degrades and the hardware becomes jumpy and
775 * overly sensitive. Not only that, but the constant packet spew
776 * (even at a lowered 40pps rate) overloads the EC such that key
777 * presses on the keyboard are missed. Given all of that, don't
778 * even attempt to use Synaptics mode. Relative mode seems to work
779 * just fine.
780 */
781 if (broken_olpc_ec) {
782 printk(KERN_INFO "synaptics: OLPC XO detected, not enabling Synaptics protocol.\n");
783 return -ENODEV;
784 }
785
756 psmouse->private = priv = kzalloc(sizeof(struct synaptics_data), GFP_KERNEL); 786 psmouse->private = priv = kzalloc(sizeof(struct synaptics_data), GFP_KERNEL);
757 if (!priv) 787 if (!priv)
758 return -ENOMEM; 788 return -ENOMEM;