Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294019
b: refs/heads/master
c: aa87512
h: refs/heads/master
i:
  294017: 649b022
  294015: 6c666e7
v: v3
  • Loading branch information
Armando Visconti authored and Dmitry Torokhov committed Mar 4, 2012
1 parent 5f52719 commit 30fe8d8
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f0c5f65bc5729e94c62953eae0712b392f09bec1
refs/heads/master: aa87512fbc56e107c14f7fa85823eb7e82a2f64c
9 changes: 9 additions & 0 deletions trunk/drivers/input/touchscreen/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,7 @@ config TOUCHSCREEN_USB_COMPOSITE
- JASTEC USB Touch Controller/DigiTech DTR-02U
- Zytronic controllers
- Elo TouchSystems 2700 IntelliTouch
- EasyTouch USB Touch Controller from Data Modul

Have a look at <http://linux.chapter7.ch/touchkit/> for
a usage description and the required user-space stuff.
Expand Down Expand Up @@ -723,6 +724,14 @@ config TOUCHSCREEN_USB_NEXIO
bool "NEXIO/iNexio device support" if EXPERT
depends on TOUCHSCREEN_USB_COMPOSITE

config TOUCHSCREEN_USB_EASYTOUCH
default y
bool "EasyTouch USB Touch controller device support" if EMBEDDED
depends on TOUCHSCREEN_USB_COMPOSITE
help
Say Y here if you have a EasyTouch USB Touch controller device support.
If unsure, say N.

config TOUCHSCREEN_TOUCHIT213
tristate "Sahara TouchIT-213 touchscreen"
select SERIO
Expand Down
63 changes: 63 additions & 0 deletions trunk/drivers/input/touchscreen/usbtouchscreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* - Zytronic capacitive touchscreen
* - NEXIO/iNexio
* - Elo TouchSystems 2700 IntelliTouch
* - EasyTouch USB Dual/Multi touch controller from Data Modul
*
* Copyright (C) 2004-2007 by Daniel Ritz <daniel.ritz@gmx.ch>
* Copyright (C) by Todd E. Johnson (mtouchusb.c)
Expand Down Expand Up @@ -140,6 +141,7 @@ enum {
DEVTYPE_TC45USB,
DEVTYPE_NEXIO,
DEVTYPE_ELO,
DEVTYPE_ETOUCH,
};

#define USB_DEVICE_HID_CLASS(vend, prod) \
Expand Down Expand Up @@ -245,6 +247,10 @@ static const struct usb_device_id usbtouch_devices[] = {
{USB_DEVICE(0x04e7, 0x0020), .driver_info = DEVTYPE_ELO},
#endif

#ifdef CONFIG_TOUCHSCREEN_USB_EASYTOUCH
{USB_DEVICE(0x7374, 0x0001), .driver_info = DEVTYPE_ETOUCH},
#endif

{}
};

Expand Down Expand Up @@ -326,6 +332,51 @@ static int egalax_get_pkt_len(unsigned char *buf, int len)
}
#endif

/*****************************************************************************
* EasyTouch part
*/

#ifdef CONFIG_TOUCHSCREEN_USB_EASYTOUCH

#ifndef MULTI_PACKET
#define MULTI_PACKET
#endif

#define ETOUCH_PKT_TYPE_MASK 0xFE
#define ETOUCH_PKT_TYPE_REPT 0x80
#define ETOUCH_PKT_TYPE_REPT2 0xB0
#define ETOUCH_PKT_TYPE_DIAG 0x0A

static int etouch_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
{
if ((pkt[0] & ETOUCH_PKT_TYPE_MASK) != ETOUCH_PKT_TYPE_REPT &&
(pkt[0] & ETOUCH_PKT_TYPE_MASK) != ETOUCH_PKT_TYPE_REPT2)
return 0;

dev->x = ((pkt[1] & 0x1F) << 7) | (pkt[2] & 0x7F);
dev->y = ((pkt[3] & 0x1F) << 7) | (pkt[4] & 0x7F);
dev->touch = pkt[0] & 0x01;

return 1;
}

static int etouch_get_pkt_len(unsigned char *buf, int len)
{
switch (buf[0] & ETOUCH_PKT_TYPE_MASK) {
case ETOUCH_PKT_TYPE_REPT:
case ETOUCH_PKT_TYPE_REPT2:
return 5;

case ETOUCH_PKT_TYPE_DIAG:
if (len < 2)
return -1;

return buf[1] + 2;
}

return 0;
}
#endif

/*****************************************************************************
* PanJit Part
Expand Down Expand Up @@ -1175,6 +1226,18 @@ static struct usbtouch_device_info usbtouch_dev_info[] = {
.exit = nexio_exit,
},
#endif
#ifdef CONFIG_TOUCHSCREEN_USB_EASYTOUCH
[DEVTYPE_ETOUCH] = {
.min_xc = 0x0,
.max_xc = 0x07ff,
.min_yc = 0x0,
.max_yc = 0x07ff,
.rept_size = 16,
.process_pkt = usbtouch_process_multi,
.get_pkt_len = etouch_get_pkt_len,
.read_data = etouch_read_data,
},
#endif
};


Expand Down

0 comments on commit 30fe8d8

Please sign in to comment.