aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMark Assad <massad@gmail.com>2006-10-04 22:25:05 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-04 22:44:36 -0400
commit77dc2db6d1d2703ee4e83d4b3dbecf4e06a910e6 (patch)
treef8ff9b87a63409bd774a9723e2c5b3b546d91134 /drivers
parent4b8447184ae85de4ce710e5f561fbaada21b8394 (diff)
[PATCH] itmtouch: fix inverted flag to indicate touch location correctly, correct white space
There is a bug in the current version of the itmtouch USB touchscreen driver. The if statment that checks if pressure is being applied to the touch screen is now missing a ! (not), so events are no longer being reported correctly. The original source code for this line was as follows: #define UCP(x) ((unsigned char*)(x)) #define UCOM(x,y,z) ((UCP((x)->transfer_buffer)[y]) & (z)) ... if (!UCOM(urb, 7, 0x20)) { And was cleaned to: unsigned char *data = urb->transfer_buffer; .... if (data[7] & 0x20) { (note the lack of '!') This has been tested on an LG L1510BF and an LG1510SF touch screen. Signed-off-by: Mark Assad <massad@gmail.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/input/itmtouch.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/usb/input/itmtouch.c b/drivers/usb/input/itmtouch.c
index 61966d719ca3..f3e3080de5b5 100644
--- a/drivers/usb/input/itmtouch.c
+++ b/drivers/usb/input/itmtouch.c
@@ -36,7 +36,11 @@
36 * 36 *
37 * 1.2.1 09/03/2005 (HCE) hc@mivu.no 37 * 1.2.1 09/03/2005 (HCE) hc@mivu.no
38 * Code cleanup and adjusting syntax to start matching kernel standards 38 * Code cleanup and adjusting syntax to start matching kernel standards
39 * 39 *
40 * 1.2.2 10/05/2006 (MJA) massad@gmail.com
41 * Flag for detecting if the screen was being touch was incorrectly
42 * inverted, so no touch events were being detected.
43 *
40 *****************************************************************************/ 44 *****************************************************************************/
41 45
42#include <linux/kernel.h> 46#include <linux/kernel.h>
@@ -53,7 +57,7 @@
53#define USB_PRODUCT_ID_TOUCHPANEL 0xf9e9 57#define USB_PRODUCT_ID_TOUCHPANEL 0xf9e9
54 58
55#define DRIVER_AUTHOR "Hans-Christian Egtvedt <hc@mivu.no>" 59#define DRIVER_AUTHOR "Hans-Christian Egtvedt <hc@mivu.no>"
56#define DRIVER_VERSION "v1.2.1" 60#define DRIVER_VERSION "v1.2.2"
57#define DRIVER_DESC "USB ITM Inc Touch Panel Driver" 61#define DRIVER_DESC "USB ITM Inc Touch Panel Driver"
58#define DRIVER_LICENSE "GPL" 62#define DRIVER_LICENSE "GPL"
59 63
@@ -108,7 +112,7 @@ static void itmtouch_irq(struct urb *urb, struct pt_regs *regs)
108 input_regs(dev, regs); 112 input_regs(dev, regs);
109 113
110 /* if pressure has been released, then don't report X/Y */ 114 /* if pressure has been released, then don't report X/Y */
111 if (data[7] & 0x20) { 115 if (!(data[7] & 0x20)) {
112 input_report_abs(dev, ABS_X, (data[0] & 0x1F) << 7 | (data[3] & 0x7F)); 116 input_report_abs(dev, ABS_X, (data[0] & 0x1F) << 7 | (data[3] & 0x7F));
113 input_report_abs(dev, ABS_Y, (data[1] & 0x1F) << 7 | (data[4] & 0x7F)); 117 input_report_abs(dev, ABS_Y, (data[1] & 0x1F) << 7 | (data[4] & 0x7F));
114 } 118 }