History log of /linux-master/drivers/input/touchscreen/usbtouchscreen.c
Revision Date Author Comments
# e50389f2 12-Dec-2023 ye xingchen <ye.xingchen@zte.com.cn>

Input: touchscreen - use sysfs_emit[_at]() instead of scnprintf()

Follow the advice of the Documentation/filesystems/sysfs.rst and show()
should only use sysfs_emit() or sysfs_emit_at() when formatting the
value to be returned to user space.

Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Oliver Graute <oliver.graute@kococonnector.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# a9f08ad7 18-Aug-2022 Wolfram Sang <wsa+renesas@sang-engineering.com>

Input: move from strlcpy with unused retval to strscpy

Follow the advice of the below link and prefer 'strscpy' in this
subsystem. Conversion is 1:1 because the return value is not used.
Generated by a coccinelle script.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20220818210022.6865-1-wsa+renesas@sang-engineering.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 039d4ed3 27-Jun-2022 Johan Hovold <johan@kernel.org>

Input: usbtouchscreen - add driver_info sanity check

Add a sanity check on the device id-table driver_info field to make sure
we never access a type structure (and function pointers) outside of the
device info array (e.g. if someone fails to ifdef a device-id entry).

Note that this also suppresses a compiler warning with -Warray-bounds
(gcc-11.3.0) when compile-testing the driver without enabling any of
the device type Kconfig options:

drivers/input/touchscreen/usbtouchscreen.c: In function 'usbtouch_probe':
drivers/input/touchscreen/usbtouchscreen.c:1668:16:warning: array subscript <unknown> is outside array bounds of 'struct usbtouch_device_info[0]' [-Warray-bounds]
1668 | type = &usbtouch_dev_info[id->driver_info];

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20220623062446.16944-1-johan@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 41e81022 24-May-2021 Johan Hovold <johan@kernel.org>

Input: usbtouchscreen - fix control-request directions

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>


# 33f93726 19-Jan-2021 Lee Jones <lee.jones@linaro.org>

Input: usbtouchscreen - actually check return value of usb_submit_urb()

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>


# e3b4f94e 18-Apr-2020 James Hilliard <james.hilliard1@gmail.com>

Input: usbtouchscreen - add support for BonXeon TP

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>


# b55d996f 01-Aug-2019 Oliver Neukum <oneukum@suse.com>

Input: usbtouchscreen - initialize PM mutex before using it

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>


# 74ba9207 20-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61

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>


# 89f84b84 15-May-2018 Nick Dyer <nick@shmanahar.org>

Input: usbtouchscreen - add sysfs attribute for 3M MTouch firmware rev

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>


# 85f46fbf 17-Mar-2018 Marcus Folkesson <marcus.folkesson@gmail.com>

Input: usbtouchscreen - do not rely on input_dev->users

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>


# 12e510db 17-Mar-2018 Marcus Folkesson <marcus.folkesson@gmail.com>

Input: usbtouchscreen - fix deadlock in autosuspend

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>


# 698c03b4 16-Jan-2018 Julia Lawall <Julia.Lawall@lip6.fr>

Input: inline macros for MODULE_LICENSE, etc

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>


# 96849170 23-Jul-2015 Bernhard Bender <bernhard.bender@bytecmed.com>

Input: usbtouchscreen - avoid unresponsive TSC-30 touch screen

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>


# dbea4032 24-Mar-2015 Lars Poeschel <poeschel@lemonage.de>

Input: usbtouchscreen - add new model from IRTOUCHSYSTEMS

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>


# bf9a9f8e 06-Jan-2014 Paul Gortmaker <paul.gortmaker@windriver.com>

Input: delete non-required instances of include <linux/init.h>

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>


# 4ef38351 26-Nov-2013 Christian Engelmayer <christian.engelmayer@frequentis.com>

Input: usbtouchscreen - separate report and transmit buffer size handling

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>


# ae2aa3a5 20-Oct-2013 Forest Bond <forest.bond@rapidrollout.com>

Input: usbtouchscreen: ignore eGalax/D-Wav/EETI HIDs

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>


# 037a833e 04-Sep-2012 Forest Bond <forest.bond@rapidrollout.com>

Input: usbtouchscreen - initialize eGalax devices

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>


# 0a5ebc88 04-May-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: input: usbtouchscreen.c: fix up dev_* messages

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>


# b741ab9d 01-May-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: usbtouchscreen.c: remove dbg() usage

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>


# f864b60a 01-May-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: input: usbtouchscreen.c: fix up dev_err() usage

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>


# e27ad0fe 25-Apr-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: usbtouchscreen.c: remove err() usage

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>


# aa87512f 04-Mar-2012 Armando Visconti <armando.visconti@st.com>

Input: usbtouchscreen - add support for Data Modul EasyTouch TP 72037

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>


# 90ab5ee9 12-Jan-2012 Rusty Russell <rusty@rustcorp.com.au>

module_param: make bool parameters really bool (drivers & misc)

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>


# 08642e7c 18-Nov-2011 Greg Kroah-Hartman <gregkh@suse.de>

USB: convert drivers/input/* to use module_usb_driver()

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>


# d2cc817a 05-Nov-2011 Michael Gebetsroither <michael@mgeb.org>

Input: usbtouchscreen - add ELO IntelliTouch 2700 support

Signed-off-by: Michael Gebetsroither <michael@mgeb.org>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 09910509 22-Nov-2010 Glenn Sommer <gsommer@datanordisk.dk>

Input: usbtouchscreen - add support for LG Flatron T1710B

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>


# a8aef622 15-Jul-2010 Oliver Neukum <oneukum@suse.de>

Input: usbtouchscreen - implement reset_resume

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>


# 5d9efc59 15-Jul-2010 Oliver Neukum <oneukum@suse.de>

Input: usbtouchscreen - implement runtime power management

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>


# ed4299e1 15-Jul-2010 Oliver Neukum <oneukum@suse.de>

Input: usbtouchscreen - implement basic suspend/resume

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>


# 38771bb4 28-Jun-2010 Petr Štetiar <ynezz@true.cz>

Input: usbtouchscreen - add support for ET&T TC4UM touchscreen controller

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>


# 4aa5bbec 08-Jun-2010 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: usbtouchscreen - reduce number fo be16_to_cpu conversions

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>


# 388bbcad 27-May-2010 Ondrej Zary <linux@rainbow-software.org>

Input: usbtouchscreen - support bigger iNexio touchscreens

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>


# 997ea58e 12-Apr-2010 Daniel Mack <daniel@caiaq.de>

USB: rename usb_buffer_alloc() and usb_buffer_free() users

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>


# 641d446f 19-May-2010 Julia Lawall <julia@diku.dk>

Input: usbtouchscreen - switch to using kmemdup()

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>


# eb083ba2 21-Feb-2010 Roy Yin <yhch@generaltouch.com>

Input: usbtouchscreen - extend coordinate range for Generaltouch devices

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>


# 1e87a430 04-Feb-2010 Ondrej Zary <linux@rainbow-software.org>

Input: usbtouchscreen - fix leaks and check return value of usb_submit_urb()

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>


# 5197424c 04-Feb-2010 Ondrej Zary <linux@rainbow-software.org>

Input: usbtouchscreen - add NEXIO (or iNexio) support

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>


# f4a5e359 04-Feb-2010 Ondrej Zary <linux@rainbow-software.org>

Input: usbtouchscreen - find input endpoint automatically

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>


# fea4d14b 04-Feb-2010 Ondrej Zary <linux@rainbow-software.org>

Input: usbtouchscreen - convert from usb_device to usb_interface

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>


# 9cb3ce52 11-Jan-2010 Márton Németh <nm127@freemail.hu>

Input: make USB device ids constant

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>


# dbe1420b 30-Nov-2009 Petr Štetiar <ynezz@true.cz>

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>


# 2330ed18 23-Nov-2009 Daniel Silverstone <dsilvers@simtec.co.uk>

Input: usbtouchscreen - add support for Zytronic capacitive touchscreen

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>


# 722232bc 23-Nov-2009 Oliver Neukum <oliver@neukum.org>

Input: usbtouchscreen - remove unneeded usb_kill_urb

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>


# 9e3b2583 27-Jul-2009 Florian Echtler <floe@butterbrot.org>

Input: usbtouchscreen - add support for e2i touchscreen controller

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>


# f7370699 07-Jul-2009 Jim Persson <jim-linux@nurd.se>

Input: usbtouchscreen - support for JASTEC/DigiTech DTR-02U USB touch 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>


# 139ebe8d 28-Feb-2009 Daniel Ritz <daniel.ritz-ml@swissonline.ch>

Input: usbtouchscreen - fix eGalax HID ignoring

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>


# c9cbf3d3 11-Jan-2009 Dan Streetman <ddstreet@ieee.org>

Input: usbtouchscreen - allow reporting calibrated data

This patch adds a module parameter to report either the raw
coordinate data or the hardware-calibrated coordinate data for
MicroTouch/3M touchscreens. The default is set to the raw
coordinates for backwards compatibilty.

Signed-off-by: Dan Streetman <ddstreet@ieee.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 2ec6f246 11-Nov-2008 Nuno Lucas <ntlucas@gmail.com>

Input: usbtouchscreen - fix TSC-10 DM USB controllers without EEPROM

The usbtouchscreen module implements a driver for the TSC-10 DM USB
touchscreen controllers, but assumes a 2-byte response for the
CMD_RESET and CMD_RATE commands, when they can be only a single byte
when no EEPROM is connected.

The driver worked with an earlier controller revision, but new
revisions of the controller fail.

It seems the problem is that the early controller had the
SEL4/EEPROM-CS pin high, but the new controller has it down, making
the response different.

Without the fix, the controller would answer the single byte 0x06
(ACK), making the init fail with -ENODEV because buf[1] is 0xFF (as
initialized before).

As the single byte is the only thing we need to check it was ok, there
is no need to verify the second byte.

The [0x15 0x01] case is the NAK [0x15] response for when there is no
data in the EEPROM [bit-0 of second byte set], so I let that be, as I
don't have any controller with an EEPROM.

With this patch, both the earlier and latest controller work the same.

Note: This was previously submited as BUG #11961 [1] on the bugzilla
tracker, but rebased to version 2.6.27.4 and with unnecessary comments
and printk's removed.

[1] http://bugzilla.kernel.org/show_bug.cgi?id=11961

Signed-off-by: Nuno Lucas <ntlucas@gmail.com>
Acked-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# ec42d448 03-Jul-2008 Daniel Ritz <daniel.ritz@gmx.ch>

Input: usbtouchscreen - ignore eGalax screens supporting HID protocol

The newer versions of the eGalax/EETI screen implement the HID protocol.
The device IDs are still the same, but the USB interface descriptor shows
the device being of HID class. Change usbtouchscreen to ignore the HID
models as they are handled properly by usbhid.

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# ea3e6c59 05-May-2008 Harvey Harrison <harvey.harrison@gmail.com>

Input: replace remaining __FUNCTION__ occurrences

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 76d057ce 04-Apr-2008 Oliver Neukum <oliver@neukum.org>

Input: usbtouchscreen - don't use DMA on stack

DMA on the stack is not allowed. The buffer must be kmalloced.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 62aa366d 16-Jan-2008 Daniel Ritz <daniel.ritz-ml@swissonline.ch>

Input: usbtouchscreen - fix buffer overflow, make more egalax work

Fix a buffer overflow in mutli-packet handling code. The overflow can
only happen with eGalax devices and is even there very unlikely (only
non-report packet are affected any only when truncated after the first
byte).

Also changes the mutli-packet handling code not to drop unknown packets,
but rather just drop one byte. This allows synchronizing on report packets
in the data stream. It's required for some egalax devices to work at all.

Also remove the pointless 'flags' member of the device struct and set the
version number to 0.6, plus some minor cleanups.

[akpm@linux-foundation.org: coding-style fixes]

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 14e40206 21-Oct-2007 Jerrold Jones <digireco@gmail.com>

Input: usbtouchscreen - add support for GoTop tablet devices

Add support for GoTop Super_Q2/GogoPen/PenPower tablets to usbtouchscreen.
Protocol discovery was done by Yick Yan Lam.

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 7b19ada2 19-Oct-2007 Jiri Slaby <jirislaby@kernel.org>

get rid of input BIT* duplicate defines

get rid of input BIT* duplicate defines

use newly global defined macros for input layer. Also remove includes of
input.h from non-input sources only for BIT macro definiton. Define the
macro temporarily in local manner, all those local definitons will be
removed further in this patchset (to not break bisecting).
BIT macro will be globally defined (1<<x)

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: <dtor@mail.ru>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Cc: <lenb@kernel.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Cc: <perex@suse.cz>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: <vernux@us.ibm.com>
Cc: <malattia@linux.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 9d5657db 12-Oct-2007 Ilya Frolov <zeylie@gmail.com>

Input: usbtouchscreen - add support for GeneralTouch devices

Signed-off-by: Ilya Frolov <zeylie@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 2a8281d7 09-Sep-2007 Daniel Ritz <daniel.ritz-ml@swissonline.ch>

Input: usbtouchscreen - support DMC devices with empty EEPROM

A reply of 0x0600 means all OK, 0x1501 means OK, but EEPROM empty.
The behavior with an empty EEPROM is the same as without one at all
so do not fail loading the driver.

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 7b6dff98 06-Sep-2007 Vladimir Shebordaev <vladimir.shebordaev@gmail.com>

Input: usbtouchscreen - correctly set 'phys'

This patch fixes a nasty typo in usbtouchscreen driver. The typo
is inherited from the original mtouchusb. It used to make the input
subsytem to incorrectly report the physical device ids to userspace
that in turn is very confusing for, e.g. XInput hotplug facilities
in setups with multiple identical touchscreens.

Signed-off-by: Vladimir Shebordaev <vshebordaev@mail.ru>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# a14a8401 04-Sep-2007 Ondrej Zary <linux@rainbow-software.org>

Input: usbtouchscreen - add support for IdealTEK URTC1000

This patch adds support for IdealTEK URTC1000 touchscreen controllers.

Documentation can be downloaded at:

http://projects.tbmn.org/cgi-bin/trac.cgi/wiki/urtc-1000

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# df561fcd 02-Jul-2007 Ondrej Zary <linux@rainbow-software.org>

Input: usbtouchscreen - add support for IRTOUCHSYSTEMS touchscreens

This patch adds support for IRTOUCHSYSTEMS (or UNITOP) infrared touchscreens.

The touchscreen sends data in 8-byte packets.
BYTE 0 - unknown meaning, seen only one value: 0x54
BYTE 1 - unknown meaning, 3 lowest bits indicate touch state
values seen: 0x81, 0x82 or 0x83
bit 0 = set if the screen is touched and was not touched before (touch
bit 1 = set if the screen is touched and was touched (dragging)
bit 2 = set if the touch was ended (release)
BYTES 2 and 3 - X position, high-order-byte first, range = 0 to 0x0FFF
BYTES 4 and 5 - Y position, high-order-byte first, range = 0 to 0x0FFF
BYTE 6 - unknown meaning, seen only one value: 0xFF
BYTE 7 - unknown meaning, seen only one value: 0x00

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# c6f8d706 11-Jun-2007 Ondrej Zary <linux@rainbow-software.org>

Input: usbtouchscreen - fix fallout caused by move from drivers/usb

During the move from drivers/usb/input into drivers/input/touchscreen
Kconfig variables were shuffled a bit to use a new namespace
(CONFIG_TOUCHSCREEN) while usbtouchscreen was still using old ones.

Also noticed by Robert P. J. Day <rpjday@mindspring.com>

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# d05e84e6 07-May-2007 Dmitry Torokhov <dtor@insightbb.com>

Input: move USB touchscreens under drivers/input/touchscreen

This will allow concentrating all input devices in one place
in {menu|x|q}config.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>