mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
Input: usbtouchscreen - add support for ET&T TC5UH touchscreen controller
This patch adds support for the ET&T TC5UH 5-wire USB touchscreen controller. More info at http://www.etandt.com.tw/board_solution.html Signed-off-by: Petr Štetiar <ynezz@true.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
parent
dadaae3777
commit
dbe1420b4b
2 changed files with 34 additions and 0 deletions
|
@ -520,6 +520,11 @@ config TOUCHSCREEN_USB_ZYTRONIC
|
||||||
bool "Zytronic controller" if EMBEDDED
|
bool "Zytronic controller" if EMBEDDED
|
||||||
depends on TOUCHSCREEN_USB_COMPOSITE
|
depends on TOUCHSCREEN_USB_COMPOSITE
|
||||||
|
|
||||||
|
config TOUCHSCREEN_USB_ETT_TC5UH
|
||||||
|
default y
|
||||||
|
bool "ET&T TC5UH touchscreen controler support" if EMBEDDED
|
||||||
|
depends on TOUCHSCREEN_USB_COMPOSITE
|
||||||
|
|
||||||
config TOUCHSCREEN_TOUCHIT213
|
config TOUCHSCREEN_TOUCHIT213
|
||||||
tristate "Sahara TouchIT-213 touchscreen"
|
tristate "Sahara TouchIT-213 touchscreen"
|
||||||
select SERIO
|
select SERIO
|
||||||
|
|
|
@ -132,6 +132,7 @@ enum {
|
||||||
DEVTYPE_JASTEC,
|
DEVTYPE_JASTEC,
|
||||||
DEVTYPE_E2I,
|
DEVTYPE_E2I,
|
||||||
DEVTYPE_ZYTRONIC,
|
DEVTYPE_ZYTRONIC,
|
||||||
|
DEVTYPE_TC5UH,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define USB_DEVICE_HID_CLASS(vend, prod) \
|
#define USB_DEVICE_HID_CLASS(vend, prod) \
|
||||||
|
@ -217,6 +218,10 @@ static struct usb_device_id usbtouch_devices[] = {
|
||||||
{USB_DEVICE(0x14c8, 0x0003), .driver_info = DEVTYPE_ZYTRONIC},
|
{USB_DEVICE(0x14c8, 0x0003), .driver_info = DEVTYPE_ZYTRONIC},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_TOUCHSCREEN_USB_ETT_TC5UH
|
||||||
|
{USB_DEVICE(0x0664, 0x0309), .driver_info = DEVTYPE_TC5UH},
|
||||||
|
#endif
|
||||||
|
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -554,6 +559,19 @@ static int irtouch_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
* ET&T TC5UH part
|
||||||
|
*/
|
||||||
|
#ifdef CONFIG_TOUCHSCREEN_USB_ETT_TC5UH
|
||||||
|
static int tc5uh_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
|
||||||
|
{
|
||||||
|
dev->x = ((pkt[2] & 0x0F) << 8) | pkt[1];
|
||||||
|
dev->y = ((pkt[4] & 0x0F) << 8) | pkt[3];
|
||||||
|
dev->touch = pkt[0] & 0x01;
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* IdealTEK URTC1000 Part
|
* IdealTEK URTC1000 Part
|
||||||
|
@ -844,6 +862,17 @@ static struct usbtouch_device_info usbtouch_dev_info[] = {
|
||||||
.irq_always = true,
|
.irq_always = true,
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_TOUCHSCREEN_USB_ETT_TC5UH
|
||||||
|
[DEVTYPE_TC5UH] = {
|
||||||
|
.min_xc = 0x0,
|
||||||
|
.max_xc = 0x0fff,
|
||||||
|
.min_yc = 0x0,
|
||||||
|
.max_yc = 0x0fff,
|
||||||
|
.rept_size = 5,
|
||||||
|
.read_data = tc5uh_read_data,
|
||||||
|
},
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue