aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2010-06-28 12:38:48 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-06-28 12:42:17 -0400
commit38771bb440e8c01d07627abc39ac28acbf450cbe (patch)
tree5b417e27fc8a30b11bff1e342b1ef9ae407f1058 /drivers/input/touchscreen
parent7804302b14032d357d889e4a23e463eb6a6c5136 (diff)
Input: usbtouchscreen - add support for ET&T TC4UM touchscreen controller
This patch adds support for the ET&T TC4UM 4-wire USB touchscreen controller and tries to reuse the bits for TC5UH controller in kernel already. Data interface is same. Tested-by: Roger Pueyo Centelles <rogerpueyo@rogerpueyo.com> Signed-off-by: Petr Štetiar <ynezz@true.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r--drivers/input/touchscreen/Kconfig4
-rw-r--r--drivers/input/touchscreen/usbtouchscreen.c21
2 files changed, 14 insertions, 11 deletions
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index 3b9d5e2105d7..e835f04bc0d0 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -540,9 +540,9 @@ config TOUCHSCREEN_USB_ZYTRONIC
540 bool "Zytronic controller" if EMBEDDED 540 bool "Zytronic controller" if EMBEDDED
541 depends on TOUCHSCREEN_USB_COMPOSITE 541 depends on TOUCHSCREEN_USB_COMPOSITE
542 542
543config TOUCHSCREEN_USB_ETT_TC5UH 543config TOUCHSCREEN_USB_ETT_TC45USB
544 default y 544 default y
545 bool "ET&T TC5UH touchscreen controler support" if EMBEDDED 545 bool "ET&T USB series TC4UM/TC5UH touchscreen controler support" if EMBEDDED
546 depends on TOUCHSCREEN_USB_COMPOSITE 546 depends on TOUCHSCREEN_USB_COMPOSITE
547 547
548config TOUCHSCREEN_USB_NEXIO 548config TOUCHSCREEN_USB_NEXIO
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c
index 5d6bf2a4bbad..b9cee2738adb 100644
--- a/drivers/input/touchscreen/usbtouchscreen.c
+++ b/drivers/input/touchscreen/usbtouchscreen.c
@@ -135,7 +135,7 @@ enum {
135 DEVTYPE_JASTEC, 135 DEVTYPE_JASTEC,
136 DEVTYPE_E2I, 136 DEVTYPE_E2I,
137 DEVTYPE_ZYTRONIC, 137 DEVTYPE_ZYTRONIC,
138 DEVTYPE_TC5UH, 138 DEVTYPE_TC45USB,
139 DEVTYPE_NEXIO, 139 DEVTYPE_NEXIO,
140}; 140};
141 141
@@ -222,8 +222,11 @@ static const struct usb_device_id usbtouch_devices[] = {
222 {USB_DEVICE(0x14c8, 0x0003), .driver_info = DEVTYPE_ZYTRONIC}, 222 {USB_DEVICE(0x14c8, 0x0003), .driver_info = DEVTYPE_ZYTRONIC},
223#endif 223#endif
224 224
225#ifdef CONFIG_TOUCHSCREEN_USB_ETT_TC5UH 225#ifdef CONFIG_TOUCHSCREEN_USB_ETT_TC45USB
226 {USB_DEVICE(0x0664, 0x0309), .driver_info = DEVTYPE_TC5UH}, 226 /* TC5UH */
227 {USB_DEVICE(0x0664, 0x0309), .driver_info = DEVTYPE_TC45USB},
228 /* TC4UM */
229 {USB_DEVICE(0x0664, 0x0306), .driver_info = DEVTYPE_TC45USB},
227#endif 230#endif
228 231
229#ifdef CONFIG_TOUCHSCREEN_USB_NEXIO 232#ifdef CONFIG_TOUCHSCREEN_USB_NEXIO
@@ -574,10 +577,10 @@ static int irtouch_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
574#endif 577#endif
575 578
576/***************************************************************************** 579/*****************************************************************************
577 * ET&T TC5UH part 580 * ET&T TC5UH/TC4UM part
578 */ 581 */
579#ifdef CONFIG_TOUCHSCREEN_USB_ETT_TC5UH 582#ifdef CONFIG_TOUCHSCREEN_USB_ETT_TC45USB
580static int tc5uh_read_data(struct usbtouch_usb *dev, unsigned char *pkt) 583static int tc45usb_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
581{ 584{
582 dev->x = ((pkt[2] & 0x0F) << 8) | pkt[1]; 585 dev->x = ((pkt[2] & 0x0F) << 8) | pkt[1];
583 dev->y = ((pkt[4] & 0x0F) << 8) | pkt[3]; 586 dev->y = ((pkt[4] & 0x0F) << 8) | pkt[3];
@@ -1106,14 +1109,14 @@ static struct usbtouch_device_info usbtouch_dev_info[] = {
1106 }, 1109 },
1107#endif 1110#endif
1108 1111
1109#ifdef CONFIG_TOUCHSCREEN_USB_ETT_TC5UH 1112#ifdef CONFIG_TOUCHSCREEN_USB_ETT_TC45USB
1110 [DEVTYPE_TC5UH] = { 1113 [DEVTYPE_TC45USB] = {
1111 .min_xc = 0x0, 1114 .min_xc = 0x0,
1112 .max_xc = 0x0fff, 1115 .max_xc = 0x0fff,
1113 .min_yc = 0x0, 1116 .min_yc = 0x0,
1114 .max_yc = 0x0fff, 1117 .max_yc = 0x0fff,
1115 .rept_size = 5, 1118 .rept_size = 5,
1116 .read_data = tc5uh_read_data, 1119 .read_data = tc45usb_read_data,
1117 }, 1120 },
1118#endif 1121#endif
1119 1122