Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 69361
b: refs/heads/master
c: a14a840
h: refs/heads/master
i:
  69359: 73647d5
v: v3
  • Loading branch information
Ondrej Zary authored and Dmitry Torokhov committed Sep 5, 2007
1 parent ed3d564 commit 318022a
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 554fc1935365ddba0936dfb6dc4088ba4ef23a4f
refs/heads/master: a14a84014167c970886b44503f0736b015f4375e
6 changes: 6 additions & 0 deletions trunk/drivers/input/touchscreen/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ config TOUCHSCREEN_USB_COMPOSITE
- Gunze AHL61
- DMC TSC-10/25
- IRTOUCHSYSTEMS/UNITOP
- IdealTEK URTC1000

Have a look at <http://linux.chapter7.ch/touchkit/> for
a usage description and the required user-space stuff.
Expand Down Expand Up @@ -238,4 +239,9 @@ config TOUCHSCREEN_USB_IRTOUCH
bool "IRTOUCHSYSTEMS/UNITOP device support" if EMBEDDED
depends on TOUCHSCREEN_USB_COMPOSITE

config TOUCHSCREEN_USB_IDEALTEK
default y
bool "IdealTEK URTC1000 device support" if EMBEDDED
depends on TOUCHSCREEN_USB_COMPOSITE

endif
59 changes: 58 additions & 1 deletion trunk/drivers/input/touchscreen/usbtouchscreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* - Gunze AHL61
* - DMC TSC-10/25
* - IRTOUCHSYSTEMS/UNITOP
* - IdealTEK URTC1000
*
* Copyright (C) 2004-2006 by Daniel Ritz <daniel.ritz@gmx.ch>
* Copyright (C) by Todd E. Johnson (mtouchusb.c)
Expand Down Expand Up @@ -92,7 +93,7 @@ struct usbtouch_usb {
};


#if defined(CONFIG_TOUCHSCREEN_USB_EGALAX) || defined(CONFIG_TOUCHSCREEN_USB_ETURBO)
#if defined(CONFIG_TOUCHSCREEN_USB_EGALAX) || defined(CONFIG_TOUCHSCREEN_USB_ETURBO) || defined(CONFIG_TOUCHSCREEN_USB_IDEALTEK)
#define MULTI_PACKET
#endif

Expand All @@ -112,6 +113,7 @@ enum {
DEVTYPE_GUNZE,
DEVTYPE_DMC_TSC10,
DEVTYPE_IRTOUCH,
DEVTYPE_IDEALTEK,
};

static struct usb_device_id usbtouch_devices[] = {
Expand Down Expand Up @@ -157,6 +159,10 @@ static struct usb_device_id usbtouch_devices[] = {
{USB_DEVICE(0x6615, 0x0001), .driver_info = DEVTYPE_IRTOUCH},
#endif

#ifdef CONFIG_TOUCHSCREEN_USB_IDEALTEK
{USB_DEVICE(0x1391, 0x1000), .driver_info = DEVTYPE_IDEALTEK},
#endif

{}
};

Expand Down Expand Up @@ -437,6 +443,43 @@ static int irtouch_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
#endif


/*****************************************************************************
* IdealTEK URTC1000 Part
*/
#ifdef CONFIG_TOUCHSCREEN_USB_IDEALTEK
static int idealtek_get_pkt_len(unsigned char *buf, int len)
{
if (buf[0] & 0x80)
return 5;
if (buf[0] == 0x01)
return len;
return 0;
}

static int idealtek_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
{
switch (pkt[0] & 0x98) {
case 0x88:
/* touch data in IdealTEK mode */
dev->x = (pkt[1] << 5) | (pkt[2] >> 2);
dev->y = (pkt[3] << 5) | (pkt[4] >> 2);
dev->touch = (pkt[0] & 0x40) ? 1 : 0;
return 1;

case 0x98:
/* touch data in MT emulation mode */
dev->x = (pkt[2] << 5) | (pkt[1] >> 2);
dev->y = (pkt[4] << 5) | (pkt[3] >> 2);
dev->touch = (pkt[0] & 0x40) ? 1 : 0;
return 1;

default:
return 0;
}
}
#endif


/*****************************************************************************
* the different device descriptors
*/
Expand Down Expand Up @@ -537,6 +580,20 @@ static struct usbtouch_device_info usbtouch_dev_info[] = {
.read_data = irtouch_read_data,
},
#endif

#ifdef CONFIG_TOUCHSCREEN_USB_IDEALTEK
[DEVTYPE_IDEALTEK] = {
.min_xc = 0x0,
.max_xc = 0x0fff,
.min_yc = 0x0,
.max_yc = 0x0fff,
.rept_size = 8,
.flags = USBTOUCH_FLG_BUFFER,
.process_pkt = usbtouch_process_multi,
.get_pkt_len = idealtek_get_pkt_len,
.read_data = idealtek_read_data,
},
#endif
};


Expand Down

0 comments on commit 318022a

Please sign in to comment.