aboutsummaryrefslogtreecommitdiffstats
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
parentInput: cyttsp4 - use 16bit address for I2C/SPI communication (diff)
parentInput: nspire-keypad - replace magic offset with define (diff)
downloadlinux-dev-88ce3c3ca3df754e8a2a63b01c38bd1667fcae70.tar.xz
linux-dev-88ce3c3ca3df754e8a2a63b01c38bd1667fcae70.zip
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 1e8e42fb03a4..57b2637e153a 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: