@@ -408,10 +408,10 @@ static void elantech_report_trackpoint(struct psmouse *psmouse,
int packet_type)
{
/*
- * byte 0: 0 0 ~sx ~sy 0 M R L
- * byte 1: sx 0 0 0 0 0 0 0
- * byte 2: sy 0 0 0 0 0 0 0
- * byte 3: 0 0 sy sx 0 1 1 0
+ * byte 0: 0 0 sx sy 0 M R L
+ * byte 1:~sx 0 0 0 0 0 0 0
+ * byte 2:~sy 0 0 0 0 0 0 0
+ * byte 3: 0 0 ~sy ~sx 0 1 1 0
* byte 4: x7 x6 x5 x4 x3 x2 x1 x0
* byte 5: y7 y6 y5 y4 y3 y2 y1 y0
*
@@ -443,8 +443,8 @@ static void elantech_report_trackpoint(struct psmouse *psmouse,
case 0x16008020U:
case 0x26800010U:
case 0x36808000U:
- x = packet[4] - (int)(packet[1] << 1);
- y = (int)(packet[2] << 1) - packet[5];
+ x = packet[4] - (int)((packet[1]^0x80) << 1);
+ y = (int)((packet[2]^0x80) << 1) - packet[5];
input_report_key(tp_dev, BTN_LEFT, packet[0] & 0x01);
input_report_key(tp_dev, BTN_RIGHT, packet[0] & 0x02);