Commit b4b61b22 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull input fix from Dmitry Torokhov:
 "A fix for st1232 driver to properly report coordinates for 2nd and
  subsequent fingers when more than one is on the surface"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: st1232 - fix reporting multitouch coordinates
parents 9e2dd2ca b1a402e7
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -81,8 +81,10 @@ static int st1232_ts_read_data(struct st1232_ts_data *ts)
	for (i = 0, y = 0; i < ts->chip_info->max_fingers; i++, y += 3) {
		finger[i].is_valid = buf[i + y] >> 7;
		if (finger[i].is_valid) {
			finger[i].x = ((buf[i + y] & 0x0070) << 4) | buf[i + 1];
			finger[i].y = ((buf[i + y] & 0x0007) << 8) | buf[i + 2];
			finger[i].x = ((buf[i + y] & 0x0070) << 4) |
					buf[i + y + 1];
			finger[i].y = ((buf[i + y] & 0x0007) << 8) |
					buf[i + y + 2];

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