[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1272307701.19363.69.camel@localhost.localdomain>
Date: Mon, 26 Apr 2010 11:48:21 -0700
From: Hollis Blanchard <hollis_blanchard@...tor.com>
To: Daniel Ritz <daniel.ritz-ml@...ssonline.ch>
Cc: linux-kernel@...r.kernel.org, linux-input@...r.kernel.org
Subject: hack for Lilliput 669GL-70NP/C/T 7" USB touchscreen
I've been working with a Lilliput 7" USB touchscreen (model
669GL-70NP/C/T), and discovered that while usbtouchscreen.c claims to
support its USB ID, the driver didn't actually work.
Here is the lsusb output:
Bus 001 Device 003: ID 0eef:0001 D-WAV Scientific Co., Ltd eGalax TouchScreen
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0eef D-WAV Scientific Co., Ltd
idProduct 0x0001 eGalax TouchScreen
bcdDevice 1.00
iManufacturer 1 eGalax Inc.
iProduct 2 USB TouchController
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 8704
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 1 eGalax Inc.
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
** UNRECOGNIZED: 09 21 10 02 00 01 22 8d 00
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0800 2x 0 bytes
bInterval 3
Device Status: 0x0000
(Bus Powered)
After dumping the incoming bytestream, here is the hack I made to
usbtouchscreen.c to actually register touches correctly. I haven't tried
to clean it up because I'm not sure what the real problem is. It sounds
like this device is not expected to work with the standard usbhid driver
(and it doesn't), but neither does it work with usbtouchscreen.c. I
really don't know anything about USB, but I could figure out how to
interpret this 6-byte packet...
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c
index 68ece58..e9597fa 100644
--- a/drivers/input/touchscreen/usbtouchscreen.c
+++ b/drivers/input/touchscreen/usbtouchscreen.c
@@ -252,6 +252,7 @@ static int e2i_read_data(struct usbtouch_usb *dev, unsigned
#define EGALAX_PKT_TYPE_REPT 0x80
#define EGALAX_PKT_TYPE_DIAG 0x0A
+#if 0
static int egalax_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
{
if ((pkt[0] & EGALAX_PKT_TYPE_MASK) != EGALAX_PKT_TYPE_REPT)
@@ -279,6 +280,34 @@ static int egalax_get_pkt_len(unsigned char *buf, int len)
return 0;
}
+
+#else
+
+static int egalax_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
+{
+ if ((pkt[0] & EGALAX_PKT_TYPE_MASK) != 2)
+ return 0;
+
+ dev->x = (pkt[5] << 8) | pkt[4];
+ dev->y = (pkt[3] << 8) | pkt[2];
+ dev->touch = pkt[1] & 0x01;
+
+ return 1;
+}
+
+static int egalax_get_pkt_len(unsigned char *buf, int len)
+{
+ switch (buf[0] & EGALAX_PKT_TYPE_MASK) {
+ case 2:
+ return 6;
+ default:
+ printk(KERN_WARNING "%s: unknown packet type 0x%x\n", __func__, buf[0]);
+ }
+
+ return 0;
+}
+#endif
+
#endif
Signed-off-by: Hollis Blanchard <hollis_blanchard@...tor.com>
Comments?
--
Hollis Blanchard
Mentor Graphics, Embedded Systems Division
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists