Skip to content

Commit ef8313b

Browse files
dilingerdtor
authored andcommitted
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>
1 parent 7ee9916 commit ef8313b

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

drivers/input/mouse/synaptics.c

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,15 +744,45 @@ static const struct dmi_system_id __initconst toshiba_dmi_table[] = {
744744
#endif
745745
};
746746

747+
static bool broken_olpc_ec;
748+
749+
static 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+
747762
void __init synaptics_module_init(void)
748763
{
749764
impaired_toshiba_kbc = dmi_check_system(toshiba_dmi_table);
765+
broken_olpc_ec = dmi_check_system(olpc_dmi_table);
750766
}
751767

752768
int synaptics_init(struct psmouse *psmouse)
753769
{
754770
struct synaptics_data *priv;
755771

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+
756786
psmouse->private = priv = kzalloc(sizeof(struct synaptics_data), GFP_KERNEL);
757787
if (!priv)
758788
return -ENOMEM;

0 commit comments

Comments
 (0)