mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] itmtouch: fix inverted flag to indicate touch location correctly
@ 2006-10-05  0:36 Mark Assad
  2006-10-05  2:14 ` Linus Torvalds
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Assad @ 2006-10-05  0:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: trivial, hc, torvalds, dtor

From: Mark Assad <massad@gmail.com>

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 origonal 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.

Patched applied from: linux-2.6.18

Signed-off-by: Mark Assad <massad@gmail.com>

---

--- linux-2.6.18/drivers/usb/input/itmtouch.c   2006-09-20
13:42:06.000000000 +1000
+++ linux/drivers/usb/input/itmtouch.c  2006-10-05 09:49:56.000000000 +1000
@@ -36,7 +36,11 @@
  *
  * 1.2.1  09/03/2005 (HCE) hc@mivu.no
  *   Code cleanup and adjusting syntax to start matching kernel standards
- *
+ *
+ * 1.2.2  10/05/2006 (MJA) massad@gmail.com
+ *   Flag for detecting if the screen was being touch was incorrectly
+ *   inverted, so no touch events were being detected.
+ *
  *****************************************************************************/

 #include <linux/kernel.h>
@@ -53,7 +57,7 @@
 #define USB_PRODUCT_ID_TOUCHPANEL      0xf9e9

 #define DRIVER_AUTHOR "Hans-Christian Egtvedt <hc@mivu.no>"
-#define DRIVER_VERSION "v1.2.1"
+#define DRIVER_VERSION "v1.2.2"
 #define DRIVER_DESC "USB ITM Inc Touch Panel Driver"
 #define DRIVER_LICENSE "GPL"

@@ -108,7 +112,7 @@ static void itmtouch_irq(struct urb *urb
        input_regs(dev, regs);

        /* if pressure has been released, then don't report X/Y */
-       if (data[7] & 0x20) {
+       if (!(data[7] & 0x20)) {
                input_report_abs(dev, ABS_X, (data[0] & 0x1F) << 7 |
(data[3] & 0x7F));
                input_report_abs(dev, ABS_Y, (data[1] & 0x1F) << 7 |
(data[4] & 0x7F));
        }

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] itmtouch: fix inverted flag to indicate touch location correctly
  2006-10-05  0:36 [PATCH] itmtouch: fix inverted flag to indicate touch location correctly Mark Assad
@ 2006-10-05  2:14 ` Linus Torvalds
  2006-10-05  3:41   ` Randy Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Linus Torvalds @ 2006-10-05  2:14 UTC (permalink / raw)
  To: Mark Assad; +Cc: linux-kernel, trivial, hc, dtor



On Thu, 5 Oct 2006, Mark Assad wrote:
>
> From: Mark Assad <massad@gmail.com>

This email is totally whitespace-mangled.. I'm not a gmail user myself, 
but there's _bound_ to be some way to not turn tabs into spaces and get 
word-wrap etc.

		Linus

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] itmtouch: fix inverted flag to indicate touch location correctly
  2006-10-05  2:14 ` Linus Torvalds
@ 2006-10-05  3:41   ` Randy Dunlap
  2006-10-10 21:36     ` Paul Jackson
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2006-10-05  3:41 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Mark Assad, linux-kernel, trivial, hc, dtor

On Wed, 4 Oct 2006 19:14:11 -0700 (PDT) Linus Torvalds wrote:

> 
> 
> On Thu, 5 Oct 2006, Mark Assad wrote:
> >
> > From: Mark Assad <massad@gmail.com>
> 
> This email is totally whitespace-mangled.. I'm not a gmail user myself, 
> but there's _bound_ to be some way to not turn tabs into spaces and get 
> word-wrap etc.

Sure, if you use SMTP to gmail instead of the web interface.
The web interface isn't decent for sending patches.

---
~Randy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] itmtouch: fix inverted flag to indicate touch location correctly
  2006-10-05  3:41   ` Randy Dunlap
@ 2006-10-10 21:36     ` Paul Jackson
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Jackson @ 2006-10-10 21:36 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: torvalds, massad, linux-kernel, trivial, hc, dtor

Randy, commenting on a patch of Mark Assad <massad@gmail.com>:
>
> Sure, if you use SMTP to gmail instead of the web interface.
> The web interface isn't decent for sending patches.


If you're going that route, another option is to use my sendpatchset
utility:

  http://www.speakeasy.org/~pj99/sgi/sendpatchset

It has hooks (read the code - it's a script) for directly feeding
patches to the gmail SMTP agent.  See the embedded usage statement
for instructions on using it.

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@sgi.com> 1.925.600.0401

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-10-10 21:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-05  0:36 [PATCH] itmtouch: fix inverted flag to indicate touch location correctly Mark Assad
2006-10-05  2:14 ` Linus Torvalds
2006-10-05  3:41   ` Randy Dunlap
2006-10-10 21:36     ` Paul Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®