summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/usbtouchscreen.c
AgeCommit message (Collapse)Author
2021-05-24Input: usbtouchscreen - fix control-request directionsJohan Hovold
The direction of the pipe argument must match the request-type direction bit or control requests may fail depending on the host-controller-driver implementation. Fix the four control requests which erroneously used usb_rcvctrlpipe(). Fixes: 1d3e20236d7a ("[PATCH] USB: usbtouchscreen: unified USB touchscreen driver") Fixes: 24ced062a296 ("usbtouchscreen: add support for DMC TSC-10/25 devices") Fixes: 9e3b25837a20 ("Input: usbtouchscreen - add support for e2i touchscreen controller") Signed-off-by: Johan Hovold <johan@kernel.org> Cc: stable@vger.kernel.org # 2.6.17 Link: https://lore.kernel.org/r/20210524092048.4443-1-johan@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2021-01-19Input: usbtouchscreen - actually check return value of usb_submit_urb()Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/input/touchscreen/usbtouchscreen.c: In function ‘nexio_read_data’: drivers/input/touchscreen/usbtouchscreen.c:1052:50: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20210114152323.2382283-4-lee.jones@linaro.org [dtor: log error code as well] Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2020-04-18Input: usbtouchscreen - add support for BonXeon TPJames Hilliard
Based on available information this uses the singletouch irtouch protocol. This is tested and confirmed to be fully functional on the BonXeon TP hardware I have. Signed-off-by: James Hilliard <james.hilliard1@gmail.com> Link: https://lore.kernel.org/r/20200413184217.55700-1-james.hilliard1@gmail.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-08-01Input: usbtouchscreen - initialize PM mutex before using itOliver Neukum
Mutexes shall be initialized before they are used. Fixes: 12e510dbc57b2 ("Input: usbtouchscreen - fix deadlock in autosuspend") Reported-by: syzbot+199ea16c7f26418b4365@syzkaller.appspotmail.com Signed-off-by: Oliver Neukum <oneukum@suse.com> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-05-24treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61Thomas Gleixner
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 675 mass ave cambridge ma 02139 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 441 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc) Reviewed-by: Richard Fontana <rfontana@redhat.com> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190520071858.739733335@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-15Input: usbtouchscreen - add sysfs attribute for 3M MTouch firmware revNick Dyer
Allow querying of the firmware revision of the device example: 4.10 Tested on ZII RDU2 platform and on Intel x86_64 PC. Signed-off-by: Nick Dyer <nick@shmanahar.org> Tested-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-03-26Input: usbtouchscreen - do not rely on input_dev->usersMarcus Folkesson
If the device is unused and suspended, a call to open will cause the device to autoresume through the call to usb_autopm_get_interface(). input_dev->users is already incremented by the input subsystem, therefore this expression will always be evaluated to true: if (input->users || usbtouch->type->irq_always) result = usb_submit_urb(usbtouch->irq, GFP_NOIO); The same URB will then be fail when resubmitted in usbtouch_open(). Introduce usbtouch->is_open to keep track of the state instead. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-03-26Input: usbtouchscreen - fix deadlock in autosuspendMarcus Folkesson
usb_autopm_get_interface() that is called in usbtouch_open() does an autoresume if the device is suspended. input_dev->mutex used in usbtouch_resume() is in this case already taken by the input subsystem and will cause a deadlock. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-01-17Input: inline macros for MODULE_LICENSE, etcJulia Lawall
Inline macro for MODULE_LICENSE to make the license information easy to find, eg with grep. Inline the other module-related macros at the same time. A simplified version of the semantic patch for the MODULE_LICENSE case is as follows: (http://coccinelle.lip6.fr/) // <smpl> @s@ identifier i; expression e; @@ @@ declarer name MODULE_LICENSE; identifier s.i; expression s.e; @@ MODULE_LICENSE( - i + e ); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> [dtor: added a couple of drivers missed by the script, removed a few unused DRIVER_VERSION macros] Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-07-23Input: usbtouchscreen - avoid unresponsive TSC-30 touch screenBernhard Bender
This patch fixes a problem in the usbtouchscreen driver for DMC TSC-30 touch screen. Due to a missing delay between the RESET and SET_RATE commands, the touch screen may become unresponsive during system startup or driver loading. According to the DMC documentation, a delay is needed after the RESET command to allow the chip to complete its internal initialization. As this delay is not guaranteed, we had a system where the touch screen occasionally did not send any touch data. There was no other indication of the problem. The patch fixes the problem by adding a 150ms delay between the RESET and SET_RATE commands. Cc: stable@vger.kernel.org Suggested-by: Jakob Mustafa <jakob.mustafa@bytecmed.com> Signed-off-by: Bernhard Bender <bernhard.bender@bytecmed.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-03-24Input: usbtouchscreen - add new model from IRTOUCHSYSTEMSLars Poeschel
This adds support for another model of IRTOUCH SYSTEMS Co.,LtD infrared touchscreens. The USB vendorID/deviceID is 6615/0012. It is also sold under the label "Elektrosil". The datasheet states that coordinates for x and y are in the range from 0 to 32767. Signed-off-by: Lars Poeschel <poeschel@lemonage.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-06Input: delete non-required instances of include <linux/init.h>Paul Gortmaker
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-09Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: "An update to ALPS to support devices on Dell XT2 (hopefully working better this time around and although it is largish it should not affect any other ALPS devices) and a tiny update to Elantech driver to support newer devices as well. Also a coupe of new input event codes have been defined" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: ALPS - add support for DualPoint device on Dell XT2 model Input: elantech - add support for newer (August 2013) devices Input: add SW_MUTE_DEVICE switch definition Input: usbtouchscreen - separate report and transmit buffer size handling Input: sur40 - suppress false uninitialized variable warning Input: add key code for ambient light sensor button Input: keyboard - "keycode & KEY_MAX" changes some keycode values
2013-12-01Input: usbtouchscreen - separate report and transmit buffer size handlingChristian Engelmayer
This patch supports the separate handling of the USB transfer buffer length and the length of the buffer used for multi packet support. For devices supporting multiple report or diagnostic packets, the USB transfer size is now limited to the USB endpoints wMaxPacketSize - otherwise it defaults to the configured report packet size as before. This fixes an issue where event reporting can be delayed for an arbitrary time for multi packet devices. For instance the report size for eGalax devices is defined to the 16 byte maximum diagnostic packet size as opposed to the 5 byte report packet size. In case the driver requests 16 byte from the USB interrupt endpoint, the USB host controller driver needs to split up the request into 2 accesses according to the endpoints wMaxPacketSize of 8 byte. When the first transfer is answered by the eGalax device with not less than the full 8 byte requested, the host controller has got no way of knowing whether the touch controller has got additional data queued and will issue the second transfer. If per example a liftoff event finishes at such a wMaxPacketSize boundary, the data will not be available to the usbtouch driver until a further event is triggered and transfered to the host. From user perspective the BTN_TOUCH release event in this case is stuck until the next touch down event. Signed-off-by: Christian Engelmayer <christian.engelmayer@frequentis.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-11-11Input: usbtouchscreen: ignore eGalax/D-Wav/EETI HIDsForest Bond
The HID driver now handles these devices, regardless of what protocol the device claims it supports. Signed-off-by: Forest Bond <forest.bond@rapidrollout.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-04Input: usbtouchscreen - initialize eGalax devicesForest Bond
Certain eGalax devices expose an interface with class HID and protocol None. Some work with usbhid and some work with usbtouchscreen, but there is no easy way to differentiate. Sending an eGalax diagnostic packet seems to kick them all into using the right protocol for usbtouchscreen, so we can continue to bind them all there (as opposed to handing some off to usbhid). This fixes a regression for devices that were claimed by (and worked with) usbhid prior to commit 139ebe8dc80dd74cb2ac9f5603d18fbf5cff049f ("Input: usbtouchscreen - fix eGalax HID ignoring"), which made usbtouchscreen claim them instead. With this patch they will still be claimed by usbtouchscreen, but they will actually report events usbtouchscreen can understand. Note that these devices will be limited to the usbtouchscreen feature set so e.g. dual touch features are not supported. I have the distinct pleasure of needing to support devices of both types and have tested accordingly. Signed-off-by: Forest Bond <forest.bond@rapidrollout.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-05-04USB: input: usbtouchscreen.c: fix up dev_* messagesGreg Kroah-Hartman
Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Dmitry Torokhov <dmitry.torokhov@gmail.com> CC: Henrik Rydberg <rydberg@euromail.se> CC: Rusty Russell <rusty@rustcorp.com.au> CC: Viresh Kumar <viresh.kumar@st.com> CC: Armando Visconti <armando.visconti@st.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01USB: usbtouchscreen.c: remove dbg() usageGreg Kroah-Hartman
dbg() was a very old USB-specific macro that should no longer be used. This patch removes it from being used in the driver and uses dev_dbg() instead. CC: Dmitry Torokhov <dmitry.torokhov@gmail.com> CC: Henrik Rydberg <rydberg@euromail.se> CC: Rusty Russell <rusty@rustcorp.com.au> CC: Viresh Kumar <viresh.kumar@st.com> CC: Armando Visconti <armando.visconti@st.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01USB: input: usbtouchscreen.c: fix up dev_err() usageGreg Kroah-Hartman
We should always reference the input device for dev_err(), not the USB device. Fix up the places where I got this wrong. Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> CC: Henrik Rydberg <rydberg@euromail.se> CC: Rusty Russell <rusty@rustcorp.com.au> CC: Viresh Kumar <viresh.kumar@st.com> CC: Armando Visconti <armando.visconti@st.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-25USB: usbtouchscreen.c: remove err() usageGreg Kroah-Hartman
err() was a very old USB-specific macro that I thought had gone away. This patch removes it from being used in the driver and uses dev_err() instead. CC: Dmitry Torokhov <dmitry.torokhov@gmail.com> CC: Henrik Rydberg <rydberg@euromail.se> CC: Rusty Russell <rusty@rustcorp.com.au> CC: Viresh Kumar <viresh.kumar@st.com> CC: Armando Visconti <armando.visconti@st.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09Merge commit 'v3.3-rc6' into nextDmitry Torokhov
2012-03-04Input: usbtouchscreen - add support for Data Modul EasyTouch TP 72037Armando Visconti
The Data Modul TP 72037 EasyTouch controller is derived from EGALAX controller and is capable of detecting dual contacts. Packets can be 5 bytes or 10 bytes long, depending whether one or two contacts are detected. Format is same as EGALAX touch controller, but with x and y coordinates inverted. Signed-off-by: Armando Visconti <armando.visconti@st.com> Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-01-13module_param: make bool parameters really bool (drivers & misc)Rusty Russell
module_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick. It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version. Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-01-10Merge branch 'for-linus' of ↵Linus Torvalds
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
2011-11-18USB: convert drivers/input/* to use module_usb_driver()Greg Kroah-Hartman
This converts the drivers in drivers/input/* to use the module_usb_driver() macro which makes the code smaller and a bit simpler. Added bonus is that it removes some unneeded kernel log messages about drivers loading and/or unloading. Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Ville Syrjala <syrjala@sci.fi> Cc: Henk Vergonet <Henk.Vergonet@gmail.com> Cc: Alessandro Rubini <rubini@ipvvis.unipv.it> Cc: Henrik Rydberg <rydberg@euromail.se> Cc: "Magnus Hörlin" <magnus@alefors.se> Cc: Chris Moeller <kode54@gmail.c> Cc: Christoph Fritz <chf.fritz@googlemail.com> Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi> Cc: Jesper Juhl <jj@chaosbits.net> Cc: Edwin van Vliet <edwin@cheatah.nl> Cc: Ping Cheng <pingc@wacom.com> Cc: Eduard Hasenleithner <eduard@hasenleithner.at> Cc: Alexander Strakh <strakh@ispras.ru> Cc: Glenn Sommer <gsommer@datanordisk.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-05Input: usbtouchscreen - add ELO IntelliTouch 2700 supportMichael Gebetsroither
Signed-off-by: Michael Gebetsroither <michael@mgeb.org> Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-22Input: usbtouchscreen - add support for LG Flatron T1710BGlenn Sommer
I've recently got my hands on a LG Flatron T1710B touchscreen. As other LG products, this seems to use the ITM panel. Signed-off-by: Glenn Sommer <gsommer@datanordisk.dk> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-07-15Input: usbtouchscreen - implement reset_resumeOliver Neukum
This implements reset_resume() by splitting init into allocations of private data structures and device initializations. Device initializations are repeated upon reset_resume. Signed-off-by: Oliver Neukum <oneukum@suse.de> Tested-by: Petr Štetiar <ynezz@true.cz> Tested-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-07-15Input: usbtouchscreen - implement runtime power managementOliver Neukum
This implement USB autosuspend while the device is opened for devices that do remote wakeup with a fallback to open/close for those devices that don't. Devices that require the host to constantly poll them are never autosuspended. Signed-off-by: Oliver Neukum <oneukum@suse.de> Tested-by: Petr Štetiar <ynezz@true.cz> Tested-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-07-15Input: usbtouchscreen - implement basic suspend/resumeOliver Neukum
This implements basic support for suspend & resume. Signed-off-by: Oliver Neukum <oneukum@suse.de> Tested-by: Petr Štetiar <ynezz@true.cz> Tested-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-06-28Input: usbtouchscreen - add support for ET&T TC4UM touchscreen controllerPetr Štetiar
This patch adds support for the ET&T TC4UM 4-wire USB touchscreen controller and tries to reuse the bits for TC5UH controller in kernel already. Data interface is same. Tested-by: Roger Pueyo Centelles <rogerpueyo@rogerpueyo.com> Signed-off-by: Petr Štetiar <ynezz@true.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-06-08Input: usbtouchscreen - reduce number fo be16_to_cpu conversionsDmitry Torokhov
Let's perform be16_to_cpu() conversions once for each received packet, and then use cached values. Makes code a little bit easier to follow. Tested-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-05-27Merge branch 'for-linus' of ↵Linus Torvalds
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: Input: usbtouchscreen - support bigger iNexio touchscreens Input: ads7846 - return error on regulator_get() failure Input: twl4030-vibra - correct the power down sequence Input: enable onkey driver of max8925 Input: use ABS_CNT rather than (ABS_MAX + 1)
2010-05-26Input: usbtouchscreen - support bigger iNexio touchscreensOndrej Zary
Bigger Nexio touchscreens not only send more data but also the header values are modified somewhat. Fix the header (it's a guesswork but it works at least on one 46" touchscreen with 2.00SMS firmware) and also increase rept_size. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-05-20Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (229 commits) USB: remove unused usb_buffer_alloc and usb_buffer_free macros usb: musb: update gfp/slab.h includes USB: ftdi_sio: fix legacy SIO-device header USB: kl5usb105: reimplement using generic framework USB: kl5usb105: minor clean ups USB: kl5usb105: fix memory leak USB: io_ti: use kfifo to implement write buffering USB: io_ti: remove unsused private counter USB: ti_usb: use kfifo to implement write buffering USB: ir-usb: fix incorrect write-buffer length USB: aircable: fix incorrect write-buffer length USB: safe_serial: straighten out read processing USB: safe_serial: reimplement read using generic framework USB: safe_serial: reimplement write using generic framework usb-storage: always print quirks USB: usb-storage: trivial debug improvements USB: oti6858: use port write fifo USB: oti6858: use kfifo to implement write buffering USB: cypress_m8: use kfifo to implement write buffering USB: cypress_m8: remove unused drain define ... Fix up conflicts (due to usb_buffer_alloc/free renaming) in drivers/input/tablet/acecad.c drivers/input/tablet/kbtab.c drivers/input/tablet/wacom_sys.c drivers/media/video/gspca/gspca.c sound/usb/usbaudio.c
2010-05-20USB: rename usb_buffer_alloc() and usb_buffer_free() usersDaniel Mack
For more clearance what the functions actually do, usb_buffer_alloc() is renamed to usb_alloc_coherent() usb_buffer_free() is renamed to usb_free_coherent() They should only be used in code which really needs DMA coherency. All call sites have been changed accordingly, except for staging drivers. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Pedro Ribeiro <pedrib@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-19Input: usbtouchscreen - switch to using kmemdup()Julia Lawall
Use kmemdup when some other buffer is immediately copied into the allocated region. Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-28Merge branch 'next' into for-linusDmitry Torokhov
2010-02-21Input: usbtouchscreen - extend coordinate range for Generaltouch devicesRoy Yin
Generaltouch protocol allows for coordinates in [0, 0xffff] range and there are devices reporting coordinates as high as 0x7fff so let's update the driver to reflect that. Signed-off-by: Roy Yin <yhch@generaltouch.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-04Input: usbtouchscreen - fix leaks and check return value of usb_submit_urb()Ondrej Zary
Fix urb leak in error path of initialization and make sure we handle errors from initial usb_submit_urb(). Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-04Input: usbtouchscreen - add NEXIO (or iNexio) supportOndrej Zary
Add support for NEXIO (or iNexio) USB touchscreens to usbtouchscreen driver. Tested with NEX170MRT 17" LCD monitor with integrated touchscreen (with xserver-xorg-input-evtouch 0.8.8-1): T:  Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 54 Spd=12  MxCh= 0 D:  Ver= 1.10 Cls=02(comm.) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1 P:  Vendor=1870 ProdID=0001 Rev= 1.00 S:  Manufacturer=iNexio S:  Product=iNexio USB C:* #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=00 Driver=(none) E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=255ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none) E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms No datasheet is available, this was written by capturing some data with SniffUSB in Windows: http://www.rainbow-software.org/linux_files/nexio/ Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-04Input: usbtouchscreen - find input endpoint automaticallyOndrej Zary
Find input enpoint automatically instead of assuming that the first one is OK. This is needed for devices with multiple endpoints such as iNexio where the first endpoint might be output. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-04Input: usbtouchscreen - convert from usb_device to usb_interfaceOndrej Zary
Convert usbtouchscreen from storing usb_device to usb_interface. This is needed for multi-interface touchscreen devices such as iNexio. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-11Input: make USB device ids constantMárton Németh
The id_table field of the struct usb_device_id is constant in <linux/usb.h> so it makes sense to mark the initialization data also constant. Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-11-29Input: usbtouchscreen - add support for ET&T TC5UH touchscreen controllerPetr Štetiar
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>
2009-11-23Input: usbtouchscreen - add support for Zytronic capacitive touchscreenDaniel Silverstone
Zytronic USB-attached capacitive touchscreen support within the generic USB touchscreen driver. Signed-off-by: Daniel Silverstone <dsilvers@simtec.co.uk> Signed-off-by: Vincent Sanders <vince@simtec.co.uk> Signed-off-by: Simtec Linux Team <linux@simtec.co.uk> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-11-23Input: usbtouchscreen - remove unneeded usb_kill_urbOliver Neukum
usb_kill_urb() in disconnect is not needed as unregistering will cause close() to be called. Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-07-27Input: usbtouchscreen - add support for e2i touchscreen controllerFlorian Echtler
This patch adds support for the e2i touchscreen controller used in the Mimo 740 (and probably in other e2i touchscreen products). Tested on Mimo 740. Signed-off-by: Florian Echtler <floe@butterbrot.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-07-07Input: usbtouchscreen - support for JASTEC/DigiTech DTR-02U USB touch ↵Jim Persson
controllers Add support for the JASTEC/DigiTech DTR-02U USB touch screen controllers. Signed-off-by: Jim Persson <jim-linux@nurd.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-02-28Input: usbtouchscreen - fix eGalax HID ignoringDaniel Ritz
Commit ec42d4481e36cbdb5b2801f957e678211a9e5ae2 broke usbtouchscreen for some eGalax/EETI devices that claim to be HID, but are not. Devices confirmed to be real HID have the class set to HID and the protocol set to 'mouse'. Some have HID class but protocol set to 'none'. Those are not HID and should be driven by usbtouchscreen. Fix the device ignoring macro by adding match for the protocol too. Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>