aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Persson <jim-linux@nurd.se>2009-07-08 01:07:59 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2009-07-08 01:48:45 -0400
commitf7370699fbbb18f97442d6f47cc2d478a911ad6f (patch)
treee7c46868027ad86f5c6f2661929457a553df5a2d
parent72398e4b1a4cf55d3698a4f265b638093a470b04 (diff)
Input: usbtouchscreen - support for JASTEC/DigiTech DTR-02U USB touch controllers
Add support for the JASTEC/DigiTech DTR-02U USB touch screen controllers. Signed-off-by: Jim Persson <jim-linux@nurd.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
-rw-r--r--drivers/input/touchscreen/Kconfig6
-rw-r--r--drivers/input/touchscreen/usbtouchscreen.c32
2 files changed, 38 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index 72e2712c7e2a..a66e50aeba11 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -406,6 +406,7 @@ config TOUCHSCREEN_USB_COMPOSITE
406 - IRTOUCHSYSTEMS/UNITOP 406 - IRTOUCHSYSTEMS/UNITOP
407 - IdealTEK URTC1000 407 - IdealTEK URTC1000
408 - GoTop Super_Q2/GogoPen/PenPower tablets 408 - GoTop Super_Q2/GogoPen/PenPower tablets
409 - JASTEC USB Touch Controller/DigiTech DTR-02U
409 410
410 Have a look at <http://linux.chapter7.ch/touchkit/> for 411 Have a look at <http://linux.chapter7.ch/touchkit/> for
411 a usage description and the required user-space stuff. 412 a usage description and the required user-space stuff.
@@ -468,6 +469,11 @@ config TOUCHSCREEN_USB_GOTOP
468 bool "GoTop Super_Q2/GogoPen/PenPower tablet device support" if EMBEDDED 469 bool "GoTop Super_Q2/GogoPen/PenPower tablet device support" if EMBEDDED
469 depends on TOUCHSCREEN_USB_COMPOSITE 470 depends on TOUCHSCREEN_USB_COMPOSITE
470 471
472config TOUCHSCREEN_USB_JASTEC
473 default y
474 bool "JASTEC/DigiTech DTR-02U USB touch controller device support" if EMBEDDED
475 depends on TOUCHSCREEN_USB_COMPOSITE
476
471config TOUCHSCREEN_TOUCHIT213 477config TOUCHSCREEN_TOUCHIT213
472 tristate "Sahara TouchIT-213 touchscreen" 478 tristate "Sahara TouchIT-213 touchscreen"
473 select SERIO 479 select SERIO
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c
index fb7cb9bdfbd5..c07be07a69bb 100644
--- a/drivers/input/touchscreen/usbtouchscreen.c
+++ b/drivers/input/touchscreen/usbtouchscreen.c
@@ -13,6 +13,7 @@
13 * - IdealTEK URTC1000 13 * - IdealTEK URTC1000
14 * - General Touch 14 * - General Touch
15 * - GoTop Super_Q2/GogoPen/PenPower tablets 15 * - GoTop Super_Q2/GogoPen/PenPower tablets
16 * - JASTEC USB touch controller/DigiTech DTR-02U
16 * 17 *
17 * Copyright (C) 2004-2007 by Daniel Ritz <daniel.ritz@gmx.ch> 18 * Copyright (C) 2004-2007 by Daniel Ritz <daniel.ritz@gmx.ch>
18 * Copyright (C) by Todd E. Johnson (mtouchusb.c) 19 * Copyright (C) by Todd E. Johnson (mtouchusb.c)
@@ -118,6 +119,7 @@ enum {
118 DEVTYPE_IDEALTEK, 119 DEVTYPE_IDEALTEK,
119 DEVTYPE_GENERAL_TOUCH, 120 DEVTYPE_GENERAL_TOUCH,
120 DEVTYPE_GOTOP, 121 DEVTYPE_GOTOP,
122 DEVTYPE_JASTEC,
121}; 123};
122 124
123#define USB_DEVICE_HID_CLASS(vend, prod) \ 125#define USB_DEVICE_HID_CLASS(vend, prod) \
@@ -191,6 +193,10 @@ static struct usb_device_id usbtouch_devices[] = {
191 {USB_DEVICE(0x08f2, 0x00f4), .driver_info = DEVTYPE_GOTOP}, 193 {USB_DEVICE(0x08f2, 0x00f4), .driver_info = DEVTYPE_GOTOP},
192#endif 194#endif
193 195
196#ifdef CONFIG_TOUCHSCREEN_USB_JASTEC
197 {USB_DEVICE(0x0f92, 0x0001), .driver_info = DEVTYPE_JASTEC},
198#endif
199
194 {} 200 {}
195}; 201};
196 202
@@ -559,6 +565,21 @@ static int gotop_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
559 dev->x = ((pkt[1] & 0x38) << 4) | pkt[2]; 565 dev->x = ((pkt[1] & 0x38) << 4) | pkt[2];
560 dev->y = ((pkt[1] & 0x07) << 7) | pkt[3]; 566 dev->y = ((pkt[1] & 0x07) << 7) | pkt[3];
561 dev->touch = pkt[0] & 0x01; 567 dev->touch = pkt[0] & 0x01;
568
569 return 1;
570}
571#endif
572
573/*****************************************************************************
574 * JASTEC Part
575 */
576#ifdef CONFIG_TOUCHSCREEN_USB_JASTEC
577static int jastec_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
578{
579 dev->x = ((pkt[0] & 0x3f) << 6) | (pkt[2] & 0x3f);
580 dev->y = ((pkt[1] & 0x3f) << 6) | (pkt[3] & 0x3f);
581 dev->touch = (pkt[0] & 0x40) >> 6;
582
562 return 1; 583 return 1;
563} 584}
564#endif 585#endif
@@ -702,6 +723,17 @@ static struct usbtouch_device_info usbtouch_dev_info[] = {
702 .read_data = gotop_read_data, 723 .read_data = gotop_read_data,
703 }, 724 },
704#endif 725#endif
726
727#ifdef CONFIG_TOUCHSCREEN_USB_JASTEC
728 [DEVTYPE_JASTEC] = {
729 .min_xc = 0x0,
730 .max_xc = 0x0fff,
731 .min_yc = 0x0,
732 .max_yc = 0x0fff,
733 .rept_size = 4,
734 .read_data = jastec_read_data,
735 },
736#endif
705}; 737};
706 738
707 739