All of lore.kernel.org
 help / color / mirror / Atom feed
From: akpm@linux-foundation.org
To: dtor@mail.ru
Cc: linux-input@vger.kernel.org, akpm@linux-foundation.org,
	linux@rainbow-software.org, oliver@neukum.org
Subject: [patch 2/3] usbtouchscreen: support bigger iNexio touchscreens
Date: Tue, 27 Apr 2010 14:12:38 -0700	[thread overview]
Message-ID: <201004272112.o3RLCcnp020085@imap1.linux-foundation.org> (raw)

From: Ondrej Zary <linux@rainbow-software.org>

Bigger Nexio touchscreens not only send more data but also the header
values are modified somehow.  Fix the header somehow (it's a guesswork but
it works at least on one 46" touchscreen with 2.00SMS firmware) and also
increase rept_size.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Cc: Oliver Neukum <oliver@neukum.org>
Cc: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/input/touchscreen/usbtouchscreen.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff -puN drivers/input/touchscreen/usbtouchscreen.c~usbtouchscreen-support-bigger-inexio-touchscreens drivers/input/touchscreen/usbtouchscreen.c
--- a/drivers/input/touchscreen/usbtouchscreen.c~usbtouchscreen-support-bigger-inexio-touchscreens
+++ a/drivers/input/touchscreen/usbtouchscreen.c
@@ -858,6 +858,11 @@ static int nexio_read_data(struct usbtou
 	if ((pkt[0] & 0xe0) != 0xe0)
 		return 0;
 
+	if (be16_to_cpu(packet->data_len) > 0xff)
+		packet->data_len = cpu_to_be16(be16_to_cpu(packet->data_len) - 0x100);
+	if (be16_to_cpu(packet->x_len) > 0xff)
+		packet->x_len = cpu_to_be16(be16_to_cpu(packet->x_len) - 0x80);
+
 	/* send ACK */
 	ret = usb_submit_urb(priv->ack, GFP_ATOMIC);
 
@@ -1113,7 +1118,7 @@ static struct usbtouch_device_info usbto
 
 #ifdef CONFIG_TOUCHSCREEN_USB_NEXIO
 	[DEVTYPE_NEXIO] = {
-		.rept_size	= 128,
+		.rept_size	= 1024,
 		.irq_always	= true,
 		.read_data	= nexio_read_data,
 		.init		= nexio_init,
_

                 reply	other threads:[~2010-04-27 21:13 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=201004272112.o3RLCcnp020085@imap1.linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=dtor@mail.ru \
    --cc=linux-input@vger.kernel.org \
    --cc=linux@rainbow-software.org \
    --cc=oliver@neukum.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.