Skip to content

Commit b1a402e

Browse files
dixitparmar19dtor
authored andcommitted
Input: st1232 - fix reporting multitouch coordinates
For Sitronix st1633 multi-touch controller driver the coordinates reported for multiple fingers were wrong, as it was always taking LSB of coordinates from the first contact data. Signed-off-by: Dixit Parmar <[email protected]> Reviewed-by: Martin Kepplinger <[email protected]> Cc: [email protected] Fixes: 351e059 ("Input: st1232 - add support for st1633") Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204561 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent c324345 commit b1a402e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/input/touchscreen/st1232.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ static int st1232_ts_read_data(struct st1232_ts_data *ts)
8181
for (i = 0, y = 0; i < ts->chip_info->max_fingers; i++, y += 3) {
8282
finger[i].is_valid = buf[i + y] >> 7;
8383
if (finger[i].is_valid) {
84-
finger[i].x = ((buf[i + y] & 0x0070) << 4) | buf[i + 1];
85-
finger[i].y = ((buf[i + y] & 0x0007) << 8) | buf[i + 2];
84+
finger[i].x = ((buf[i + y] & 0x0070) << 4) |
85+
buf[i + y + 1];
86+
finger[i].y = ((buf[i + y] & 0x0007) << 8) |
87+
buf[i + y + 2];
8688

8789
/* st1232 includes a z-axis / touch strength */
8890
if (ts->chip_info->have_z)

0 commit comments

Comments
 (0)