Merge tag 'v4.12-rc3' into next
[linux-2.6-block.git] / drivers / input / mouse / elantech.c
index e73d968023f7ce7de418dcf1315b7c554773d604..e8cc223373ae523d4ca0c23b6bf26da2df04f06a 100644 (file)
@@ -1695,6 +1695,17 @@ int elantech_init(struct psmouse *psmouse)
                             etd->samples[0], etd->samples[1], etd->samples[2]);
        }
 
+       if (etd->samples[1] == 0x74 && etd->hw_version == 0x03) {
+               /*
+                * This module has a bug which makes absolute mode
+                * unusable, so let's abort so we'll be using standard
+                * PS/2 protocol.
+                */
+               psmouse_info(psmouse,
+                            "absolute mode broken, forcing standard PS/2 protocol\n");
+               goto init_fail;
+       }
+
        if (elantech_set_absolute_mode(psmouse)) {
                psmouse_err(psmouse,
                            "failed to put touchpad into absolute mode.\n");