diff options
author | Daniel Ritz <daniel.ritz-ml@swissonline.ch> | 2006-10-11 17:40:22 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-10-17 17:46:34 -0400 |
commit | 5dfb5f1d060a6f7dfddb78dc59f9e4d299088cc1 (patch) | |
tree | b6aad7a1ca336538ba9ad58f97b319fe20415a13 | |
parent | 9ab99c8c513313c1c5931bdbd27dcc4bc7a3b7cd (diff) |
usbtouchscreen: fix data reading for ITM touchscreens
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>
-rw-r--r-- | drivers/usb/input/usbtouchscreen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/input/usbtouchscreen.c b/drivers/usb/input/usbtouchscreen.c index f26c1cd1129f..2902742895ad 100644 --- a/drivers/usb/input/usbtouchscreen.c +++ b/drivers/usb/input/usbtouchscreen.c | |||
@@ -256,10 +256,10 @@ static int itm_read_data(unsigned char *pkt, int *x, int *y, int *touch, int *pr | |||
256 | { | 256 | { |
257 | *x = ((pkt[0] & 0x1F) << 7) | (pkt[3] & 0x7F); | 257 | *x = ((pkt[0] & 0x1F) << 7) | (pkt[3] & 0x7F); |
258 | *y = ((pkt[1] & 0x1F) << 7) | (pkt[4] & 0x7F); | 258 | *y = ((pkt[1] & 0x1F) << 7) | (pkt[4] & 0x7F); |
259 | *press = ((pkt[2] & 0x1F) << 7) | (pkt[5] & 0x7F); | 259 | *press = ((pkt[2] & 0x01) << 7) | (pkt[5] & 0x7F); |
260 | *touch = ~pkt[7] & 0x20; | 260 | *touch = ~pkt[7] & 0x20; |
261 | 261 | ||
262 | return 1; | 262 | return *touch; |
263 | } | 263 | } |
264 | #endif | 264 | #endif |
265 | 265 | ||