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.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c
index e3f22852bd09..b407028ffc59 100644
--- a/drivers/input/touchscreen/usbtouchscreen.c
+++ b/drivers/input/touchscreen/usbtouchscreen.c
@@ -9,6 +9,7 @@
9 * - eTurboTouch 9 * - eTurboTouch
10 * - Gunze AHL61 10 * - Gunze AHL61
11 * - DMC TSC-10/25 11 * - DMC TSC-10/25
12 * - IRTOUCHSYSTEMS/UNITOP
12 * 13 *
13 * Copyright (C) 2004-2006 by Daniel Ritz <daniel.ritz@gmx.ch> 14 * Copyright (C) 2004-2006 by Daniel Ritz <daniel.ritz@gmx.ch>
14 * Copyright (C) by Todd E. Johnson (mtouchusb.c) 15 * Copyright (C) by Todd E. Johnson (mtouchusb.c)
@@ -110,6 +111,7 @@ enum {
110 DEVTYPE_ETURBO, 111 DEVTYPE_ETURBO,
111 DEVTYPE_GUNZE, 112 DEVTYPE_GUNZE,
112 DEVTYPE_DMC_TSC10, 113 DEVTYPE_DMC_TSC10,
114 DEVTYPE_IRTOUCH,
113}; 115};
114 116
115static struct usb_device_id usbtouch_devices[] = { 117static struct usb_device_id usbtouch_devices[] = {
@@ -150,6 +152,11 @@ static struct usb_device_id usbtouch_devices[] = {
150 {USB_DEVICE(0x0afa, 0x03e8), .driver_info = DEVTYPE_DMC_TSC10}, 152 {USB_DEVICE(0x0afa, 0x03e8), .driver_info = DEVTYPE_DMC_TSC10},
151#endif 153#endif
152 154
155#ifdef CONFIG_TOUCHSCREEN_USB_IRTOUCH
156 {USB_DEVICE(0x595a, 0x0001), .driver_info = DEVTYPE_IRTOUCH},
157 {USB_DEVICE(0x6615, 0x0001), .driver_info = DEVTYPE_IRTOUCH},
158#endif
159
153 {} 160 {}
154}; 161};
155 162
@@ -416,6 +423,21 @@ static int dmc_tsc10_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
416 423
417 424
418/***************************************************************************** 425/*****************************************************************************
426 * IRTOUCH Part
427 */
428#ifdef CONFIG_TOUCHSCREEN_USB_IRTOUCH
429static int irtouch_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
430{
431 dev->x = (pkt[3] << 8) | pkt[2];
432 dev->y = (pkt[5] << 8) | pkt[4];
433 dev->touch = (pkt[1] & 0x03) ? 1 : 0;
434
435 return 1;
436}
437#endif
438
439
440/*****************************************************************************
419 * the different device descriptors 441 * the different device descriptors
420 */ 442 */
421static struct usbtouch_device_info usbtouch_dev_info[] = { 443static struct usbtouch_device_info usbtouch_dev_info[] = {
@@ -504,6 +526,17 @@ static struct usbtouch_device_info usbtouch_dev_info[] = {
504 .read_data = dmc_tsc10_read_data, 526 .read_data = dmc_tsc10_read_data,
505 }, 527 },
506#endif 528#endif
529
530#ifdef CONFIG_TOUCHSCREEN_USB_IRTOUCH
531 [DEVTYPE_IRTOUCH] = {
532 .min_xc = 0x0,
533 .max_xc = 0x0fff,
534 .min_yc = 0x0,
535 .max_yc = 0x0fff,
536 .rept_size = 8,
537 .read_data = irtouch_read_data,
538 },
539#endif
507}; 540};
508 541
509 542