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 <[email protected]>
CC: Henrik Rydberg <[email protected]>
CC: Rusty Russell <[email protected]>
CC: Viresh Kumar <[email protected]>
CC: Armando Visconti <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
Signed-off-by: Daniel Ritz <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
* '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
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Tested-by: Petr Štetiar <[email protected]>
Tested-by: Ondrej Zary <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Tested-by: Petr Štetiar <[email protected]>
Tested-by: Ondrej Zary <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Petr Štetiar <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
* '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)
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Pedro Ribeiro <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Use kmemdup when some other buffer is immediately copied into the
allocated region.
Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Fix urb leak in error path of initialization and make sure we handle
errors from initial usb_submit_urb().
Signed-off-by: Ondrej Zary <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Zytronic USB-attached capacitive touchscreen support within the generic
USB touchscreen driver.
Signed-off-by: Daniel Silverstone <[email protected]>
Signed-off-by: Vincent Sanders <[email protected]>
Signed-off-by: Simtec Linux Team <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
usb_kill_urb() in disconnect is not needed as unregistering will cause
close() to be called.
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Add support for the JASTEC/DigiTech DTR-02U USB touch screen
controllers.
Signed-off-by: Jim Persson <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Commit ec42d4481e 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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Acked-by: Daniel Ritz <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
DMA on the stack is not allowed. The buffer must be kmalloced.
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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.
[[email protected]: coding-style fixes]
Signed-off-by: Daniel Ritz <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Add support for GoTop Super_Q2/GogoPen/PenPower tablets to usbtouchscreen.
Protocol discovery was done by Yick Yan Lam.
Signed-off-by: Daniel Ritz <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Cc: <[email protected]>
Acked-by: Jiri Kosina <[email protected]>
Cc: <[email protected]>
Acked-by: Marcel Holtmann <[email protected]>
Cc: <[email protected]>
Acked-by: Mauro Carvalho Chehab <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Daniel Ritz <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Ondrej Zary <[email protected]>
Signed-off-by: Daniel Ritz <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>