aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/usbtouchscreen.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-10 13:55:52 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-10 13:55:52 -0500
commitdbe950f201a8edd353b0bd9079e8d536ee4ce37c (patch)
treedffbada6b3d33cc67383758570de22b4f45693b6 /drivers/input/touchscreen/usbtouchscreen.c
parentf62f61917d72c1fb0101ad405664f6fc868d676b (diff)
parentda733563be5a9da26fe81d9f007262d00b846e22 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (64 commits) Input: tc3589x-keypad - add missing kerneldoc Input: ucb1400-ts - switch to using dev_xxx() for diagnostic messages Input: ucb1400_ts - convert to threaded IRQ Input: ucb1400_ts - drop inline annotations Input: usb1400_ts - add __devinit/__devexit section annotations Input: ucb1400_ts - set driver owner Input: ucb1400_ts - convert to use dev_pm_ops Input: psmouse - make sure we do not use stale methods Input: evdev - do not block waiting for an event if fd is nonblock Input: evdev - if no events and non-block, return EAGAIN not 0 Input: evdev - only allow reading events if a full packet is present Input: add driver for pixcir i2c touchscreens Input: samsung-keypad - implement runtime power management support Input: tegra-kbc - report wakeup key for some platforms Input: tegra-kbc - add device tree bindings Input: add driver for AUO In-Cell touchscreens using pixcir ICs Input: mpu3050 - configure the sampling method Input: mpu3050 - ensure we enable interrupts Input: mpu3050 - add of_match table for device-tree probing Input: sentelic - document the latest hardware ... Fix up fairly trivial conflicts (device tree matching conflicting with some independent cleanups) in drivers/input/keyboard/samsung-keypad.c
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 e539d92cc626..06cef3ccc63a 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,