linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] input: Add support for eGalax TouchKit USB touchscreen used on HP tx1305us
@ 2008-06-28 15:19 Daniel Ritz
  2008-06-28 15:57 ` Daniel Ritz
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Ritz @ 2008-06-28 15:19 UTC (permalink / raw)
  To: Alastair Bridgewater; +Cc: Dmitry Torokhov, linux-kernel, linux-input

hi

> The eGalax touchscreen used in the HP tx1305us tablet PC (and presumably 
> the rest of the tx1000 series) uses a different format for events from 
> the device than the existing driver supports.
> 
is there more information available? datasheets? drivers?

> Add a new device description and interrupt packet handler for the 
> touchscreen used in the tx1305us, claiming the USB device ID for the 
> device that this patch was tested with from the older eGalax device code.
>
NAK. you cannot change device IDs currently used to some new code.
this will break most eGalax setups as the device ID 0x0eef,0x0001 is used
in most of them, including the one i have..

you'll need to find a way to distinguish the screens. as a starting point
i attached an lsusb -vvv output from my screen...

NAK-by: Daniel Ritz <daniel.ritz@gmx.ch>

rgds
-daniel

Bus 001 Device 002: 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         8
  idVendor           0x0eef D-WAV Scientific Co., Ltd
  idProduct          0x0001 eGalax TouchScreen
  bcdDevice            1.00
  iManufacturer           1 eGalax Inc.
  iProduct                5
  iSerial                 3
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4 USB TouchScreen
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               5
Device Status:     0x0002
  (Bus Powered)
  Remote Wakeup Enabled

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH] input: Add support for eGalax TouchKit USB touchscreen used on HP tx1305us
@ 2008-06-28  1:36 Alastair Bridgewater
  0 siblings, 0 replies; 8+ messages in thread
From: Alastair Bridgewater @ 2008-06-28  1:36 UTC (permalink / raw)
  To: dmitry.torokhov; +Cc: linux-input, linux-kernel

The eGalax touchscreen used in the HP tx1305us tablet PC (and presumably 
the rest of the tx1000 series) uses a different format for events from 
the device than the existing driver supports.

Add a new device description and interrupt packet handler for the 
touchscreen used in the tx1305us, claiming the USB device ID for the 
device that this patch was tested with from the older eGalax device code.

Signed-off-by: Alastair Bridgewater <nyef@lisphacker.com>

---

Applies clean with linux-2.6.25 and linux-2.6.26-rc6.

--- linux-2.6.26-rc6/drivers/input/touchscreen/usbtouchscreen.c   
 2008-06-27 20:34:34.886969800 -0400
+++ linux-2.6.25/drivers/input/touchscreen/usbtouchscreen.c   
 2008-06-06 12:19:16.460568440 -0400
@@ -103,6 +103,7 @@ struct usbtouch_usb {
 enum {
     DEVTPYE_DUMMY = -1,
     DEVTYPE_EGALAX,
+    DEVTYPE_EGALAX2,
     DEVTYPE_PANJIT,
     DEVTYPE_3M,
     DEVTYPE_ITM,
@@ -120,7 +121,7 @@ static struct usb_device_id usbtouch_dev
     {USB_DEVICE(0x3823, 0x0001), .driver_info = DEVTYPE_EGALAX},
     {USB_DEVICE(0x3823, 0x0002), .driver_info = DEVTYPE_EGALAX},
     {USB_DEVICE(0x0123, 0x0001), .driver_info = DEVTYPE_EGALAX},
-    {USB_DEVICE(0x0eef, 0x0001), .driver_info = DEVTYPE_EGALAX},
+    {USB_DEVICE(0x0eef, 0x0001), .driver_info = DEVTYPE_EGALAX2},
     {USB_DEVICE(0x0eef, 0x0002), .driver_info = DEVTYPE_EGALAX},
     {USB_DEVICE(0x1234, 0x0001), .driver_info = DEVTYPE_EGALAX},
     {USB_DEVICE(0x1234, 0x0002), .driver_info = DEVTYPE_EGALAX},
@@ -217,6 +218,15 @@ static int egalax_get_pkt_len(unsigned c
 
     return 0;
 }
+
+static int egalax2_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
+{
+    dev->x = ((pkt[3] & 0x0F) << 8) | pkt[2];
+    dev->y = ((pkt[5] & 0x0F) << 8) | pkt[4];
+    dev->touch = pkt[1] & 0x01;
+
+    return 1;
+}
 #endif
 
 
@@ -555,6 +565,15 @@ static struct usbtouch_device_info usbto
         .get_pkt_len    = egalax_get_pkt_len,
         .read_data    = egalax_read_data,
     },
+
+    [DEVTYPE_EGALAX2] = {
+        .min_xc        = 0x0,
+        .max_xc        = 0x0fff,
+        .min_yc        = 0x0,
+        .max_yc        = 0x0fff,
+        .rept_size    = 8,
+        .read_data    = egalax2_read_data,
+    },
 #endif
 
 #ifdef CONFIG_TOUCHSCREEN_USB_PANJIT


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

end of thread, other threads:[~2008-07-01 19:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-28 15:19 [PATCH] input: Add support for eGalax TouchKit USB touchscreen used on HP tx1305us Daniel Ritz
2008-06-28 15:57 ` Daniel Ritz
2008-06-28 18:18   ` Alastair Bridgewater
2008-06-30 15:23     ` Dmitry Torokhov
2008-06-30 20:18       ` Daniel Ritz
2008-06-30 20:24         ` Dmitry Torokhov
2008-07-01 19:49           ` Daniel Ritz
  -- strict thread matches above, loose matches on Subject: below --
2008-06-28  1:36 Alastair Bridgewater

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).