aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/usbtouchscreen.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/touchscreen/usbtouchscreen.c')
-rw-r--r--drivers/input/touchscreen/usbtouchscreen.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c
index 73fd6642b681..9dbd8b4d9a6e 100644
--- a/drivers/input/touchscreen/usbtouchscreen.c
+++ b/drivers/input/touchscreen/usbtouchscreen.c
@@ -16,6 +16,7 @@
16 * - JASTEC USB touch controller/DigiTech DTR-02U 16 * - JASTEC USB touch controller/DigiTech DTR-02U
17 * - Zytronic capacitive touchscreen 17 * - Zytronic capacitive touchscreen
18 * - NEXIO/iNexio 18 * - NEXIO/iNexio
19 * - Elo TouchSystems 2700 IntelliTouch
19 * 20 *
20 * Copyright (C) 2004-2007 by Daniel Ritz <daniel.ritz@gmx.ch> 21 * Copyright (C) 2004-2007 by Daniel Ritz <daniel.ritz@gmx.ch>
21 * Copyright (C) by Todd E. Johnson (mtouchusb.c) 22 * Copyright (C) by Todd E. Johnson (mtouchusb.c)
@@ -138,6 +139,7 @@ enum {
138 DEVTYPE_ZYTRONIC, 139 DEVTYPE_ZYTRONIC,
139 DEVTYPE_TC45USB, 140 DEVTYPE_TC45USB,
140 DEVTYPE_NEXIO, 141 DEVTYPE_NEXIO,
142 DEVTYPE_ELO,
141}; 143};
142 144
143#define USB_DEVICE_HID_CLASS(vend, prod) \ 145#define USB_DEVICE_HID_CLASS(vend, prod) \
@@ -239,6 +241,10 @@ static const struct usb_device_id usbtouch_devices[] = {
239 .driver_info = DEVTYPE_NEXIO}, 241 .driver_info = DEVTYPE_NEXIO},
240#endif 242#endif
241 243
244#ifdef CONFIG_TOUCHSCREEN_USB_ELO
245 {USB_DEVICE(0x04e7, 0x0020), .driver_info = DEVTYPE_ELO},
246#endif
247
242 {} 248 {}
243}; 249};
244 250
@@ -945,6 +951,24 @@ static int nexio_read_data(struct usbtouch_usb *usbtouch, unsigned char *pkt)
945 951
946 952
947/***************************************************************************** 953/*****************************************************************************
954 * ELO part
955 */
956
957#ifdef CONFIG_TOUCHSCREEN_USB_ELO
958
959static int elo_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
960{
961 dev->x = (pkt[3] << 8) | pkt[2];
962 dev->y = (pkt[5] << 8) | pkt[4];
963 dev->touch = pkt[6] > 0;
964 dev->press = pkt[6];
965
966 return 1;
967}
968#endif
969
970
971/*****************************************************************************
948 * the different device descriptors 972 * the different device descriptors
949 */ 973 */
950#ifdef MULTI_PACKET 974#ifdef MULTI_PACKET
@@ -953,6 +977,18 @@ static void usbtouch_process_multi(struct usbtouch_usb *usbtouch,
953#endif 977#endif
954 978
955static struct usbtouch_device_info usbtouch_dev_info[] = { 979static struct usbtouch_device_info usbtouch_dev_info[] = {
980#ifdef CONFIG_TOUCHSCREEN_USB_ELO
981 [DEVTYPE_ELO] = {
982 .min_xc = 0x0,
983 .max_xc = 0x0fff,
984 .min_yc = 0x0,
985 .max_yc = 0x0fff,
986 .max_press = 0xff,
987 .rept_size = 8,
988 .read_data = elo_read_data,
989 },
990#endif
991
956#ifdef CONFIG_TOUCHSCREEN_USB_EGALAX 992#ifdef CONFIG_TOUCHSCREEN_USB_EGALAX
957 [DEVTYPE_EGALAX] = { 993 [DEVTYPE_EGALAX] = {
958 .min_xc = 0x0, 994 .min_xc = 0x0,