aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/mouse
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2013-07-12 23:34:25 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2013-07-12 23:34:25 -0700
commit88ce3c3ca3df754e8a2a63b01c38bd1667fcae70 (patch)
treef8c76e8d306d59862f28dfc1b3bab1e3bb171a8f /drivers/input/mouse
parent62f548d0c2d2418e39b8e4b7ec39b5ca2ef4380d (diff)
parent46146e7d4b383d5b34014d072553498c7cd52821 (diff)
Merge branch 'next' into for-linus
Bring in second round of updates for 3.11.
Diffstat (limited to 'drivers/input/mouse')
-rw-r--r--drivers/input/mouse/elantech.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index 1e8e42fb03a..57b2637e153 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -694,18 +694,18 @@ static int elantech_packet_check_v3(struct psmouse *psmouse)
static int elantech_packet_check_v4(struct psmouse *psmouse)
{
unsigned char *packet = psmouse->packet;
+ unsigned char packet_type = packet[3] & 0x03;
- if ((packet[0] & 0x0c) == 0x04 &&
- (packet[3] & 0x1f) == 0x11)
+ switch (packet_type) {
+ case 0:
+ return PACKET_V4_STATUS;
+
+ case 1:
return PACKET_V4_HEAD;
- if ((packet[0] & 0x0c) == 0x04 &&
- (packet[3] & 0x1f) == 0x12)
+ case 2:
return PACKET_V4_MOTION;
-
- if ((packet[0] & 0x0c) == 0x04 &&
- (packet[3] & 0x1f) == 0x10)
- return PACKET_V4_STATUS;
+ }
return PACKET_UNKNOWN;
}
@@ -1282,6 +1282,7 @@ static int elantech_set_properties(struct elantech_data *etd)
etd->hw_version = 3;
break;
case 6:
+ case 7:
etd->hw_version = 4;
break;
default: