Skip to contentSkip to conversation

Input: alps - Fix reporting pressure of v3 trackstick

PATCH Applied Pali Rohár 2 participants 2 messages Apr 8, 2018 – Apr 23, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Input: alps - Fix reporting pressure of v3 trackstick

According to documentation, all 7 lower bits represents trackpoint pressure.

Fixes 4621c9660459 ("Input: alps - report pressure of v3 and v7 trackstick")
---
 drivers/input/mouse/alps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/mouse/alps.c +1 -1
index 0a9e6a3a2f9f..1e28d9fc5492 100644
@@ -583,7 +583,7 @@ static void alps_process_trackstick_packet_v3(struct psmouse *psmouse)
 
 	x = (s8)(((packet[0] & 0x20) << 2) | (packet[1] & 0x7f));
 	y = (s8)(((packet[0] & 0x10) << 3) | (packet[2] & 0x7f));
-	z = packet[4] & 0x7c;
+	z = packet[4] & 0x7f;
 
 	/*
 	 * The x and y values tend to be quite large, and when used
Signature · 1 line
2.11.0
maintainer Applied
#1 lore raw
Quoted 4 lines · Pali Rohár

According to documentation, all 7 lower bits represents trackpoint pressure.

Fixes 4621c9660459 ("Input: alps - report pressure of v3 and v7 trackstick")

Applied, thank you.

Quoted 20 lines
---
 drivers/input/mouse/alps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/mouse/alps.c +1 -1
index 0a9e6a3a2f9f..1e28d9fc5492 100644
@@ -583,7 +583,7 @@ static void alps_process_trackstick_packet_v3(struct psmouse *psmouse)
 
 	x = (s8)(((packet[0] & 0x20) << 2) | (packet[1] & 0x7f));
 	y = (s8)(((packet[0] & 0x10) << 3) | (packet[2] & 0x7f));
-	z = packet[4] & 0x7c;
+	z = packet[4] & 0x7f;
 
 	/*
 	 * The x and y values tend to be quite large, and when used
Signature · 1 line
2.11.0
Signature · 1 line
Dmitry