summaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorUlrik De Bie <ulrik.debie-os@e2big.org>2014-11-07 23:51:34 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-11-08 00:26:44 -0800
commitcaeb0d37fa3e387eb0dd22e5d497523c002033d1 (patch)
tree517c9f092b63f43988fd3a37e378961bf472dceb /drivers/input
parentc42bfd7f6cd26e8f712fc184460e32845d928d17 (diff)
downloadlinux-caeb0d37fa3e387eb0dd22e5d497523c002033d1.tar.gz
linux-caeb0d37fa3e387eb0dd22e5d497523c002033d1.tar.bz2
linux-caeb0d37fa3e387eb0dd22e5d497523c002033d1.zip
Input: elantech - use elantech_report_trackpoint for hardware v4 too
The Fujitsu H730 has hardware v4 with a trackpoint. This enables the elantech_report_trackpoint for v4. Reported-by: Stefan Valouch <stefan@valouch.com> Tested-by: Stefan Valouch <stefan@valouch.com> Tested-by: Alfredo Gemma <alfredo.gemma@gmail.com> Signed-off-by: Ulrik De Bie <ulrik.debie-os@e2big.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/mouse/elantech.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index 06fc6e76ffbe..53ddff91ab2e 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -792,6 +792,9 @@ static int elantech_packet_check_v4(struct psmouse *psmouse)
unsigned char packet_type = packet[3] & 0x03;
bool sanity_check;
+ if ((packet[3] & 0x0f) == 0x06)
+ return PACKET_TRACKPOINT;
+
/*
* Sanity check based on the constant bits of a packet.
* The constant bits change depending on the value of
@@ -877,10 +880,19 @@ static psmouse_ret_t elantech_process_byte(struct psmouse *psmouse)
case 4:
packet_type = elantech_packet_check_v4(psmouse);
- if (packet_type == PACKET_UNKNOWN)
+ switch (packet_type) {
+ case PACKET_UNKNOWN:
return PSMOUSE_BAD_DATA;
- elantech_report_absolute_v4(psmouse, packet_type);
+ case PACKET_TRACKPOINT:
+ elantech_report_trackpoint(psmouse, packet_type);
+ break;
+
+ default:
+ elantech_report_absolute_v4(psmouse, packet_type);
+ break;
+ }
+
break;
}