Skip to content

Commit

Permalink
Input: usbtouchscreen - support for JASTEC/DigiTech DTR-02U USB touch…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
Jim Persson authored and Dmitry Torokhov committed Jul 8, 2009
1 parent 72398e4 commit f737069
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/input/touchscreen/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ config TOUCHSCREEN_USB_COMPOSITE
- IRTOUCHSYSTEMS/UNITOP
- IdealTEK URTC1000
- GoTop Super_Q2/GogoPen/PenPower tablets
- JASTEC USB Touch Controller/DigiTech DTR-02U

Have a look at <http://linux.chapter7.ch/touchkit/> for
a usage description and the required user-space stuff.
Expand Down Expand Up @@ -468,6 +469,11 @@ config TOUCHSCREEN_USB_GOTOP
bool "GoTop Super_Q2/GogoPen/PenPower tablet device support" if EMBEDDED
depends on TOUCHSCREEN_USB_COMPOSITE

config TOUCHSCREEN_USB_JASTEC
default y
bool "JASTEC/DigiTech DTR-02U USB touch controller device support" if EMBEDDED
depends on TOUCHSCREEN_USB_COMPOSITE

config TOUCHSCREEN_TOUCHIT213
tristate "Sahara TouchIT-213 touchscreen"
select SERIO
Expand Down
32 changes: 32 additions & 0 deletions drivers/input/touchscreen/usbtouchscreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* - IdealTEK URTC1000
* - General Touch
* - GoTop Super_Q2/GogoPen/PenPower tablets
* - JASTEC USB touch controller/DigiTech DTR-02U
*
* Copyright (C) 2004-2007 by Daniel Ritz <daniel.ritz@gmx.ch>
* Copyright (C) by Todd E. Johnson (mtouchusb.c)
Expand Down Expand Up @@ -118,6 +119,7 @@ enum {
DEVTYPE_IDEALTEK,
DEVTYPE_GENERAL_TOUCH,
DEVTYPE_GOTOP,
DEVTYPE_JASTEC,
};

#define USB_DEVICE_HID_CLASS(vend, prod) \
Expand Down Expand Up @@ -191,6 +193,10 @@ static struct usb_device_id usbtouch_devices[] = {
{USB_DEVICE(0x08f2, 0x00f4), .driver_info = DEVTYPE_GOTOP},
#endif

#ifdef CONFIG_TOUCHSCREEN_USB_JASTEC
{USB_DEVICE(0x0f92, 0x0001), .driver_info = DEVTYPE_JASTEC},
#endif

{}
};

Expand Down Expand Up @@ -559,6 +565,21 @@ static int gotop_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
dev->x = ((pkt[1] & 0x38) << 4) | pkt[2];
dev->y = ((pkt[1] & 0x07) << 7) | pkt[3];
dev->touch = pkt[0] & 0x01;

return 1;
}
#endif

/*****************************************************************************
* JASTEC Part
*/
#ifdef CONFIG_TOUCHSCREEN_USB_JASTEC
static int jastec_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
{
dev->x = ((pkt[0] & 0x3f) << 6) | (pkt[2] & 0x3f);
dev->y = ((pkt[1] & 0x3f) << 6) | (pkt[3] & 0x3f);
dev->touch = (pkt[0] & 0x40) >> 6;

return 1;
}
#endif
Expand Down Expand Up @@ -702,6 +723,17 @@ static struct usbtouch_device_info usbtouch_dev_info[] = {
.read_data = gotop_read_data,
},
#endif

#ifdef CONFIG_TOUCHSCREEN_USB_JASTEC
[DEVTYPE_JASTEC] = {
.min_xc = 0x0,
.max_xc = 0x0fff,
.min_yc = 0x0,
.max_yc = 0x0fff,
.rept_size = 4,
.read_data = jastec_read_data,
},
#endif
};


Expand Down

0 comments on commit f737069

Please sign in to comment.