All of lore.kernel.org
 help / color / mirror / Atom feed
From: "yhch" <yhch@generaltouch.com>
To: linux-input <linux-input@vger.kernel.org>
Subject: patch for usbtouchscreen.c
Date: Thu, 11 Feb 2010 11:32:06 +0800	[thread overview]
Message-ID: <201002111132063289729@generaltouch.com> (raw)

Hi all

--This is time,I paste the patch into my email directly.
There is a problem,that is,the coordinate of Generaltouch touchscreen is limited to 0xFFF by usbtouchscreen.c while many models of our touchscreen give bigger coordinate than that.Could you please apply this patch to linux kernel?

Thanks!

2010-02-03 
Best Regards
Roy.Yin 
Generaltouch.com

--- usbtouchscreen.c	2008-11-21 07:02:37.000000000 +0800
+++ usbtouchscreengt.c	2010-02-03 15:30:57.000000000 +0800
@@ -526,8 +526,8 @@
 #ifdef CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH
 static int general_touch_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
 {
-	dev->x = ((pkt[2] & 0x0F) << 8) | pkt[1] ;
-	dev->y = ((pkt[4] & 0x0F) << 8) | pkt[3] ;
+	dev->x = ((pkt[2]) << 8) | pkt[1] ;
+	dev->y = ((pkt[4]) << 8) | pkt[3] ;
 	dev->press = pkt[5] & 0xff;
 	dev->touch = pkt[0] & 0x01;
 
@@ -669,9 +669,9 @@
 #ifdef CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH
 	[DEVTYPE_GENERAL_TOUCH] = {
 		.min_xc		= 0x0,
-		.max_xc		= 0x0500,
+		.max_xc		= 0x0fff,
 		.min_yc		= 0x0,
-		.max_yc		= 0x0500,
+		.max_yc		= 0x0fff,
 		.rept_size	= 7,
 		.read_data	= general_touch_read_data,
 	},


                 reply	other threads:[~2010-02-11  3:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201002111132063289729@generaltouch.com \
    --to=yhch@generaltouch.com \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.