summaryrefslogtreecommitdiff
path: root/drivers/input/mouse/elantech.c
diff options
context:
space:
mode:
authorJJ Ding <jj_ding@emc.com.tw>2012-04-10 07:29:12 (GMT)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-04-10 07:40:31 (GMT)
commita67ada7a7239b78250c1594b0e02ca68eae848dc (patch)
treef46f0240f415e1217bb487e8b4a119334bfde697 /drivers/input/mouse/elantech.c
parentd626dad58f02e13730ded6ac84d6a9e53123f0e8 (diff)
downloadlinux-fsl-qoriq-a67ada7a7239b78250c1594b0e02ca68eae848dc.tar.xz
Input: elantech - reset touchpad before configuring it
Acer VH40 has a Fn key toggling the touchpad on and off, but it's implemented in system firmware, and the EC chip has to receive reset command to activate this function. Also when this machine wakes up after resume, psmouse_reset is necessary to bring the touchpad back on. Signed-off-by: JJ Ding <jj_ding@emc.com.tw> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/mouse/elantech.c')
-rw-r--r--drivers/input/mouse/elantech.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index d2c0db1..21c68a8 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -1245,6 +1245,8 @@ static void elantech_disconnect(struct psmouse *psmouse)
*/
static int elantech_reconnect(struct psmouse *psmouse)
{
+ psmouse_reset(psmouse);
+
if (elantech_detect(psmouse, 0))
return -1;
@@ -1324,6 +1326,8 @@ int elantech_init(struct psmouse *psmouse)
if (!etd)
return -ENOMEM;
+ psmouse_reset(psmouse);
+
etd->parity[0] = 1;
for (i = 1; i < 256; i++)
etd->parity[i] = etd->parity[i & (i - 1)] ^ 1;