Skip to content

Commit caeb0d3

Browse files
ulrikdbdtor
authored andcommitted
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>
1 parent c42bfd7 commit caeb0d3

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

‎drivers/input/mouse/elantech.c‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,9 @@ static int elantech_packet_check_v4(struct psmouse *psmouse)
792792
unsigned char packet_type = packet[3] & 0x03;
793793
bool sanity_check;
794794

795+
if ((packet[3] & 0x0f) == 0x06)
796+
return PACKET_TRACKPOINT;
797+
795798
/*
796799
* Sanity check based on the constant bits of a packet.
797800
* The constant bits change depending on the value of
@@ -877,10 +880,19 @@ static psmouse_ret_t elantech_process_byte(struct psmouse *psmouse)
877880

878881
case 4:
879882
packet_type = elantech_packet_check_v4(psmouse);
880-
if (packet_type == PACKET_UNKNOWN)
883+
switch (packet_type) {
884+
case PACKET_UNKNOWN:
881885
return PSMOUSE_BAD_DATA;
882886

883-
elantech_report_absolute_v4(psmouse, packet_type);
887+
case PACKET_TRACKPOINT:
888+
elantech_report_trackpoint(psmouse, packet_type);
889+
break;
890+
891+
default:
892+
elantech_report_absolute_v4(psmouse, packet_type);
893+
break;
894+
}
895+
884896
break;
885897
}
886898

0 commit comments

Comments
 (0)