aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2009-11-30 02:37:07 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2009-11-30 02:38:01 -0500
commitdbe1420b4ba398feef035f7cd8181ec2e492228b (patch)
treec300be7bc9a3da8ece5dcefd1a9dbc077f9423aa /drivers/input
parentdadaae3777cbc1d747d5fd97c3eac94eb9f1a85b (diff)
Input: usbtouchscreen - add support for ET&T TC5UH touchscreen controller
This patch adds support for the ET&T TC5UH 5-wire USB touchscreen controller. More info at http://www.etandt.com.tw/board_solution.html Signed-off-by: Petr Štetiar <ynezz@true.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/touchscreen/Kconfig5
-rw-r--r--drivers/input/touchscreen/usbtouchscreen.c29
2 files changed, 34 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index acf00896f48a..32fc8ba039aa 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -520,6 +520,11 @@ config TOUCHSCREEN_USB_ZYTRONIC
520 bool "Zytronic controller" if EMBEDDED 520 bool "Zytronic controller" if EMBEDDED
521 depends on TOUCHSCREEN_USB_COMPOSITE 521 depends on TOUCHSCREEN_USB_COMPOSITE
522 522
523config TOUCHSCREEN_USB_ETT_TC5UH
524 default y
525 bool "ET&T TC5UH touchscreen controler support" if EMBEDDED
526 depends on TOUCHSCREEN_USB_COMPOSITE
527
523config TOUCHSCREEN_TOUCHIT213 528config TOUCHSCREEN_TOUCHIT213
524 tristate "Sahara TouchIT-213 touchscreen" 529 tristate "Sahara TouchIT-213 touchscreen"
525 select SERIO 530 select SERIO
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