aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/usbtouchscreen.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/touchscreen/usbtouchscreen.c')
-rw-r--r--drivers/input/touchscreen/usbtouchscreen.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c
index 4474e2339f47..09a5e7341bd5 100644
--- a/drivers/input/touchscreen/usbtouchscreen.c
+++ b/drivers/input/touchscreen/usbtouchscreen.c
@@ -132,6 +132,7 @@ enum {
132 DEVTYPE_JASTEC, 132 DEVTYPE_JASTEC,
133 DEVTYPE_E2I, 133 DEVTYPE_E2I,
134 DEVTYPE_ZYTRONIC, 134 DEVTYPE_ZYTRONIC,
135 DEVTYPE_TC5UH,
135}; 136};
136 137
137#define USB_DEVICE_HID_CLASS(vend, prod) \ 138#define USB_DEVICE_HID_CLASS(vend, prod) \
@@ -217,6 +218,10 @@ static struct usb_device_id usbtouch_devices[] = {
217 {USB_DEVICE(0x14c8, 0x0003), .driver_info = DEVTYPE_ZYTRONIC}, 218 {USB_DEVICE(0x14c8, 0x0003), .driver_info = DEVTYPE_ZYTRONIC},
218#endif 219#endif
219 220
221#ifdef CONFIG_TOUCHSCREEN_USB_ETT_TC5UH
222 {USB_DEVICE(0x0664, 0x0309), .driver_info = DEVTYPE_TC5UH},
223#endif
224
220 {} 225 {}
221}; 226};
222 227
@@ -554,6 +559,19 @@ static int irtouch_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
554} 559}
555#endif 560#endif
556 561
562/*****************************************************************************
563 * ET&T TC5UH part
564 */
565#ifdef CONFIG_TOUCHSCREEN_USB_ETT_TC5UH
566static int tc5uh_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
567{
568 dev->x = ((pkt[2] & 0x0F) << 8) | pkt[1];
569 dev->y = ((pkt[4] & 0x0F) << 8) | pkt[3];
570 dev->touch = pkt[0] & 0x01;
571
572 return 1;
573}
574#endif
557 575
558/***************************************************************************** 576/*****************************************************************************
559 * IdealTEK URTC1000 Part 577 * IdealTEK URTC1000 Part
@@ -844,6 +862,17 @@ static struct usbtouch_device_info usbtouch_dev_info[] = {
844 .irq_always = true, 862 .irq_always = true,
845 }, 863 },
846#endif 864#endif
865
866#ifdef CONFIG_TOUCHSCREEN_USB_ETT_TC5UH
867 [DEVTYPE_TC5UH] = {
868 .min_xc = 0x0,
869 .max_xc = 0x0fff,
870 .min_yc = 0x0,
871 .max_yc = 0x0fff,
872 .rept_size = 5,
873 .read_data = tc5uh_read_data,
874 },
875#endif
847}; 876};
848 877
849 878