]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/input/touchscreen/usbtouchscreen.c
Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
[mv-sheeva.git] / drivers / input / touchscreen / usbtouchscreen.c
index 4474e2339f47581212e73bc761bd566a0e8f3cf0..09a5e7341bd5a7633166dbd8c2a5f17d00cf6da3 100644 (file)
@@ -132,6 +132,7 @@ enum {
        DEVTYPE_JASTEC,
        DEVTYPE_E2I,
        DEVTYPE_ZYTRONIC,
+       DEVTYPE_TC5UH,
 };
 
 #define USB_DEVICE_HID_CLASS(vend, prod) \
@@ -217,6 +218,10 @@ static struct usb_device_id usbtouch_devices[] = {
        {USB_DEVICE(0x14c8, 0x0003), .driver_info = DEVTYPE_ZYTRONIC},
 #endif
 
+#ifdef CONFIG_TOUCHSCREEN_USB_ETT_TC5UH
+       {USB_DEVICE(0x0664, 0x0309), .driver_info = DEVTYPE_TC5UH},
+#endif
+
        {}
 };
 
@@ -554,6 +559,19 @@ static int irtouch_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
 }
 #endif
 
+/*****************************************************************************
+ * ET&T TC5UH part
+ */
+#ifdef CONFIG_TOUCHSCREEN_USB_ETT_TC5UH
+static int tc5uh_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->touch = pkt[0] & 0x01;
+
+       return 1;
+}
+#endif
 
 /*****************************************************************************
  * IdealTEK URTC1000 Part
@@ -844,6 +862,17 @@ static struct usbtouch_device_info usbtouch_dev_info[] = {
                .irq_always     = true,
        },
 #endif
+
+#ifdef CONFIG_TOUCHSCREEN_USB_ETT_TC5UH
+       [DEVTYPE_TC5UH] = {
+               .min_xc         = 0x0,
+               .max_xc         = 0x0fff,
+               .min_yc         = 0x0,
+               .max_yc         = 0x0fff,
+               .rept_size      = 5,
+               .read_data      = tc5uh_read_data,
+       },
+#endif
 };