Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/dtor/input

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
  • Loading branch information
torvalds committed Oct 25, 2019
2 parents 9e2dd2c + b1a402e commit b4b61b2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/input/touchscreen/st1232.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b4b61b2

Please sign in to comment.