Skip to content

Commit

Permalink
usbtouchscreen: fix data reading for ITM touchscreens
Browse files Browse the repository at this point in the history
ITM devices seem to report only garbage when not touched. update usbtouchscreen
to do data reading like itmtouch. also fix wrong mask on pressure bits.

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Daniel Ritz authored and Greg Kroah-Hartman committed Oct 17, 2006
1 parent 9ab99c8 commit 5dfb5f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/input/usbtouchscreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,10 @@ static int itm_read_data(unsigned char *pkt, int *x, int *y, int *touch, int *pr
{
*x = ((pkt[0] & 0x1F) << 7) | (pkt[3] & 0x7F);
*y = ((pkt[1] & 0x1F) << 7) | (pkt[4] & 0x7F);
*press = ((pkt[2] & 0x1F) << 7) | (pkt[5] & 0x7F);
*press = ((pkt[2] & 0x01) << 7) | (pkt[5] & 0x7F);
*touch = ~pkt[7] & 0x20;

return 1;
return *touch;
}
#endif

Expand Down

0 comments on commit 5dfb5f1

Please sign in to comment.