Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit caeb0d37 authored by Ulrik De Bie's avatar Ulrik De Bie Committed by Dmitry Torokhov
Browse files

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: default avatarStefan Valouch <stefan@valouch.com>
Tested-by: default avatarStefan Valouch <stefan@valouch.com>
Tested-by: default avatarAlfredo Gemma <alfredo.gemma@gmail.com>
Signed-off-by: default avatarUlrik De Bie <ulrik.debie-os@e2big.org>
Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent c42bfd7f
Loading
Loading
Loading
Loading
+14 −2
Original line number Original line Diff line number Diff line
@@ -792,6 +792,9 @@ static int elantech_packet_check_v4(struct psmouse *psmouse)
	unsigned char packet_type = packet[3] & 0x03;
	unsigned char packet_type = packet[3] & 0x03;
	bool sanity_check;
	bool sanity_check;


	if ((packet[3] & 0x0f) == 0x06)
		return PACKET_TRACKPOINT;

	/*
	/*
	 * Sanity check based on the constant bits of a packet.
	 * Sanity check based on the constant bits of a packet.
	 * The constant bits change depending on the value of
	 * The constant bits change depending on the value of
@@ -877,13 +880,22 @@ static psmouse_ret_t elantech_process_byte(struct psmouse *psmouse)


	case 4:
	case 4:
		packet_type = elantech_packet_check_v4(psmouse);
		packet_type = elantech_packet_check_v4(psmouse);
		if (packet_type == PACKET_UNKNOWN)
		switch (packet_type) {
		case PACKET_UNKNOWN:
			return PSMOUSE_BAD_DATA;
			return PSMOUSE_BAD_DATA;


		case PACKET_TRACKPOINT:
			elantech_report_trackpoint(psmouse, packet_type);
			break;

		default:
			elantech_report_absolute_v4(psmouse, packet_type);
			elantech_report_absolute_v4(psmouse, packet_type);
			break;
			break;
		}
		}


		break;
	}

	return PSMOUSE_FULL_PACKET;
	return PSMOUSE_FULL_PACKET;
}
}