diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/touchscreen/Kconfig | 6 | ||||
-rw-r--r-- | drivers/input/touchscreen/usbtouchscreen.c | 59 |
2 files changed, 64 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index f929fcdbae2e..f787ee69dc5f 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig | |||
@@ -191,6 +191,7 @@ config TOUCHSCREEN_USB_COMPOSITE | |||
191 | - Gunze AHL61 | 191 | - Gunze AHL61 |
192 | - DMC TSC-10/25 | 192 | - DMC TSC-10/25 |
193 | - IRTOUCHSYSTEMS/UNITOP | 193 | - IRTOUCHSYSTEMS/UNITOP |
194 | - IdealTEK URTC1000 | ||
194 | 195 | ||
195 | Have a look at <http://linux.chapter7.ch/touchkit/> for | 196 | Have a look at <http://linux.chapter7.ch/touchkit/> for |
196 | a usage description and the required user-space stuff. | 197 | a usage description and the required user-space stuff. |
@@ -238,4 +239,9 @@ config TOUCHSCREEN_USB_IRTOUCH | |||
238 | bool "IRTOUCHSYSTEMS/UNITOP device support" if EMBEDDED | 239 | bool "IRTOUCHSYSTEMS/UNITOP device support" if EMBEDDED |
239 | depends on TOUCHSCREEN_USB_COMPOSITE | 240 | depends on TOUCHSCREEN_USB_COMPOSITE |
240 | 241 | ||
242 | config TOUCHSCREEN_USB_IDEALTEK | ||
243 | default y | ||
244 | bool "IdealTEK URTC1000 device support" if EMBEDDED | ||
245 | depends on TOUCHSCREEN_USB_COMPOSITE | ||
246 | |||
241 | endif | 247 | endif |
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index b407028ffc59..796b837deeea 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c | |||
@@ -10,6 +10,7 @@ | |||
10 | * - Gunze AHL61 | 10 | * - Gunze AHL61 |
11 | * - DMC TSC-10/25 | 11 | * - DMC TSC-10/25 |
12 | * - IRTOUCHSYSTEMS/UNITOP | 12 | * - IRTOUCHSYSTEMS/UNITOP |
13 | * - IdealTEK URTC1000 | ||
13 | * | 14 | * |
14 | * Copyright (C) 2004-2006 by Daniel Ritz <daniel.ritz@gmx.ch> | 15 | * Copyright (C) 2004-2006 by Daniel Ritz <daniel.ritz@gmx.ch> |
15 | * Copyright (C) by Todd E. Johnson (mtouchusb.c) | 16 | * Copyright (C) by Todd E. Johnson (mtouchusb.c) |
@@ -92,7 +93,7 @@ struct usbtouch_usb { | |||
92 | }; | 93 | }; |
93 | 94 | ||
94 | 95 | ||
95 | #if defined(CONFIG_TOUCHSCREEN_USB_EGALAX) || defined(CONFIG_TOUCHSCREEN_USB_ETURBO) | 96 | #if defined(CONFIG_TOUCHSCREEN_USB_EGALAX) || defined(CONFIG_TOUCHSCREEN_USB_ETURBO) || defined(CONFIG_TOUCHSCREEN_USB_IDEALTEK) |
96 | #define MULTI_PACKET | 97 | #define MULTI_PACKET |
97 | #endif | 98 | #endif |
98 | 99 | ||
@@ -112,6 +113,7 @@ enum { | |||
112 | DEVTYPE_GUNZE, | 113 | DEVTYPE_GUNZE, |
113 | DEVTYPE_DMC_TSC10, | 114 | DEVTYPE_DMC_TSC10, |
114 | DEVTYPE_IRTOUCH, | 115 | DEVTYPE_IRTOUCH, |
116 | DEVTYPE_IDEALTEK, | ||
115 | }; | 117 | }; |
116 | 118 | ||
117 | static struct usb_device_id usbtouch_devices[] = { | 119 | static struct usb_device_id usbtouch_devices[] = { |
@@ -157,6 +159,10 @@ static struct usb_device_id usbtouch_devices[] = { | |||
157 | {USB_DEVICE(0x6615, 0x0001), .driver_info = DEVTYPE_IRTOUCH}, | 159 | {USB_DEVICE(0x6615, 0x0001), .driver_info = DEVTYPE_IRTOUCH}, |
158 | #endif | 160 | #endif |
159 | 161 | ||
162 | #ifdef CONFIG_TOUCHSCREEN_USB_IDEALTEK | ||
163 | {USB_DEVICE(0x1391, 0x1000), .driver_info = DEVTYPE_IDEALTEK}, | ||
164 | #endif | ||
165 | |||
160 | {} | 166 | {} |
161 | }; | 167 | }; |
162 | 168 | ||
@@ -438,6 +444,43 @@ static int irtouch_read_data(struct usbtouch_usb *dev, unsigned char *pkt) | |||
438 | 444 | ||
439 | 445 | ||
440 | /***************************************************************************** | 446 | /***************************************************************************** |
447 | * IdealTEK URTC1000 Part | ||
448 | */ | ||
449 | #ifdef CONFIG_TOUCHSCREEN_USB_IDEALTEK | ||
450 | static int idealtek_get_pkt_len(unsigned char *buf, int len) | ||
451 | { | ||
452 | if (buf[0] & 0x80) | ||
453 | return 5; | ||
454 | if (buf[0] == 0x01) | ||
455 | return len; | ||
456 | return 0; | ||
457 | } | ||
458 | |||
459 | static int idealtek_read_data(struct usbtouch_usb *dev, unsigned char *pkt) | ||
460 | { | ||
461 | switch (pkt[0] & 0x98) { | ||
462 | case 0x88: | ||
463 | /* touch data in IdealTEK mode */ | ||
464 | dev->x = (pkt[1] << 5) | (pkt[2] >> 2); | ||
465 | dev->y = (pkt[3] << 5) | (pkt[4] >> 2); | ||
466 | dev->touch = (pkt[0] & 0x40) ? 1 : 0; | ||
467 | return 1; | ||
468 | |||
469 | case 0x98: | ||
470 | /* touch data in MT emulation mode */ | ||
471 | dev->x = (pkt[2] << 5) | (pkt[1] >> 2); | ||
472 | dev->y = (pkt[4] << 5) | (pkt[3] >> 2); | ||
473 | dev->touch = (pkt[0] & 0x40) ? 1 : 0; | ||
474 | return 1; | ||
475 | |||
476 | default: | ||
477 | return 0; | ||
478 | } | ||
479 | } | ||
480 | #endif | ||
481 | |||
482 | |||
483 | /***************************************************************************** | ||
441 | * the different device descriptors | 484 | * the different device descriptors |
442 | */ | 485 | */ |
443 | static struct usbtouch_device_info usbtouch_dev_info[] = { | 486 | static struct usbtouch_device_info usbtouch_dev_info[] = { |
@@ -537,6 +580,20 @@ static struct usbtouch_device_info usbtouch_dev_info[] = { | |||
537 | .read_data = irtouch_read_data, | 580 | .read_data = irtouch_read_data, |
538 | }, | 581 | }, |
539 | #endif | 582 | #endif |
583 | |||
584 | #ifdef CONFIG_TOUCHSCREEN_USB_IDEALTEK | ||
585 | [DEVTYPE_IDEALTEK] = { | ||
586 | .min_xc = 0x0, | ||
587 | .max_xc = 0x0fff, | ||
588 | .min_yc = 0x0, | ||
589 | .max_yc = 0x0fff, | ||
590 | .rept_size = 8, | ||
591 | .flags = USBTOUCH_FLG_BUFFER, | ||
592 | .process_pkt = usbtouch_process_multi, | ||
593 | .get_pkt_len = idealtek_get_pkt_len, | ||
594 | .read_data = idealtek_read_data, | ||
595 | }, | ||
596 | #endif | ||
540 | }; | 597 | }; |
541 | 598 | ||
542 | 599 | ||