Commit graph

1652 commits

Author SHA1 Message Date
Jason Childs
e33da8a548 Input: wacom - use per-device instance of wacom_features
Since we mangle data in wacom_features when dealing with certain devices let's
use a private (per-device) instance of wacom_features in wacom_wac. This way
same product ID can support more than one type of device, such as pen and touch,
and not interfere with each other.

Signed-off-by: Jason Childs <oblivian@users.sourceforge.net>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-19 01:25:16 -08:00
Magnus Damm
4e45ad5e89 Input: sh_keysc - enable building on SH-Mobile ARM
Update the Kconfig entry for the sh_keysc driver to
enable build on SH-Mobile ARM platforms.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-16 21:51:43 -08:00
Bastian Blank
b036f6fb3a Input: wacom - get features from driver info
Get the features information from the driver info of the usb device id
structure provided by the caller. The device ids and feature structs
are strong coupled using indices.

Signed-off-by: Bastian Blank <waldi@debian.org>
Tested-by: Jason Childs <oblivian@users.sourceforge.net>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-10 23:31:37 -08:00
Andrew Clayton
5deeac99fe Input: rotary-encoder - set gpio direction for each requested gpio
Even with the correct pin mux settings, you still need to explicitly
set the gpio direction. Call gpio_direction_input() after each
requested gpio.

Signed-off-by: Andrew Clayton <andrew@digital-domain.net>
Signed-off-by: Mark Somerville <mark@scottishclimbs.com>
Tested-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-10 23:19:48 -08:00
Magnus Damm
8f8be2439c Input: sh_keysc - update the driver with mode 6
Add mode 6 support to the sh_keysc driver. Also update the KYOUTDR mask
value to include all 16 register bits.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-10 23:04:18 -08:00
Magnus Damm
324e5ade15 Input: sh_keysc - switch to using bitmaps
Use bitmaps instead of using 32-bit integers to keep track of the key
states. With this change in place the driver supports key pads with
more than 32 keys.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-10 23:04:13 -08:00
Magnus Damm
2b14a808fb Input: sh_keysc - factor out hw access functions
Update the sh_keysc driver to factor out the register access functions
sh_keysc_read(), sh_keysc_write() together with sh_keysc_level_mode().
This makes the code a bit easier to follow.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-10 23:04:07 -08:00
Eric Miao
b63de38591 Input: schedule corgi_ssp and corgi_ts to be removed
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Acked-by: Richard Purdie <rpurdie@rpsys.net>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-10 23:01:14 -08:00
Eric Miao
74e7e725e4 Input: mark {corgi,spitz,tosa}kbd drivers deprecated
Provided that now keyboards on these devices are fully supported by
generic GPIO based matrix keypad driver, mark these hardcoded and
difficult to maintain drivers as deprecated.

Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-10 22:58:03 -08:00
Mika Westerberg
9e3af04f87 Input: gpio-keys - add support for disabling gpios through sysfs
Now gpio-keys input driver exports 4 new attributes to userland through
sysfs:
	/sys/devices/platform/gpio-keys/keys [ro]
	/sys/devices/platform/gpio-keys/switches [ro]
	/sys/devices/platform/gpio-keys/disabled_keys [rw]
	/sys/devices/platform/gpio-keys/disables_switches [rw]

With these attributes, userland program can read which keys and
switches can be disabled and then disable/enable them as needed.
Keys and switches are exported as stringified bitmap of codes
(keycodes or switch codes). For example keys 15, 89, 100, 101,
102 are exported as: '15,89,100-102'.

Description of the attributes:
	keys - bitmap of keys which can be disabled
	switches - bitmap of switches which can be disabled
	disabled_keys - bitmap of currently disabled keys
			(bit 1 means disabled, 0 enabled)
	disabled_switches - bitmap of currently disabled switches
			(bit 1 means disabled, 0 enabled)

Signed-off-by: Mika Westerberg <ext-mika.1.westerberg@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-04 00:50:44 -08:00
Dmitry Torokhov
3d7bbd4575 Input: mark input interfaces as non-seekable
Seeking does not make sense for input interfaces such as evdev and joydev
so let's use nonseekable_open to mark them non-seekable.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-04 00:31:44 -08:00
Dmitry Torokhov
daf8a96b2d Input: uinput - mark as non-seekable
Seeking does not make sense for uinput so let's use nonseekable_open
to mark the device non-seekable.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-04 00:31:10 -08:00
Dmitry Torokhov
0b7024ac4d Input: add match() method to input hanlders
Get rid of blacklist in input handler structure and instead allow
handlers to define their own match() method to perform fine-grained
filtering of supported devices.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-02-04 00:25:19 -08:00
Ondrej Zary
1e87a43080 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>
2010-02-04 00:22:01 -08:00
Ondrej Zary
5197424cdc 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>
2010-02-04 00:21:56 -08:00
Ondrej Zary
f4a5e359c4 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>
2010-02-04 00:21:52 -08:00
Ondrej Zary
fea4d14b69 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>
2010-02-04 00:21:45 -08:00
Alberto Panizzo
76cdc083f4 Input: add imx-keypad driver to support the IMX Keypad Port
The IMX family of Application Processors is shipped with a Keypad Port
supported by this driver.

The peripheral can control up to an 8x8 matrix key pad where all the
scanning is done via software.  The hardware provides two interrupts:
one for key presses (KDI) and one for all key releases (KRI). There is
also a simple circuit for glitch reduction (said for synchronization)
made by two series of 3 D-latches clocked by the keypad-clock that
stabilize the interrupts sources. KDI and KRI are fired only if the
respective conditions are maintained for at last 4 keypad-clock cycle.

Since those circuits are poor for a correct debounce process (the
keypad-clock frequency is 32K and bounces longer than 94us are not
masked) the driver, when an interrupt arrives, samples the matrix
with a period of 10ms until the readins are stable for
IMX_KEYPAD_SCANS_FOR_STABILITY times (currently set at 3). After
getting stable result appropriate events are sent through the input
stack.

If some keys are maintained pressed, the driver continues to scan
the matrix with a longer period (60ms) to catch possible multiple
key presses without overloading the cpu. This process ends when all
keys are released.

This driver is tested to build in kernel or as a module and follow
the specification of Freescale Application processors:
i.MX25 i.MX27 i.MX31 i.MX35 i.MX51 especially tested on i.MX31.

Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-31 17:52:57 -08:00
Dmitry Torokhov
ef7995f4e4 Input: implement input filters
Sometimes it is desirable to suppress certain events from reaching
input handlers and thus user space. One such example is Mac mouse
button emulation code which catches certain key presses and converts
them into button clicks as if they were emitted by a virtual mouse.
The original key press events should be completely suppressed,
otherwise user space will be confused, and while keyboard driver
does it on its own evdev is blissfully unaware of this arrangement.

This patch adds notion of 'filter' to the standard input handlers,
which may flag event as filtered thus preventing it from reaching
other input handlers. Filters don't (nor will they ever) have a
notion of priority relative to each other, input core will run all
of them first and any one of them may mark event as filtered.

This patch is inspired by similar patch by Matthew Garret but the
implementation and intended usage are quite different.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-30 01:47:41 -08:00
Thadeu Lima de Souza Cascardo
45cdba4d37 Input: uinput - remove BKL from uinput_open function
Commit 8702965848 pushed down the BKL
into uinput open function. However, there's nothing that needs locking
in there.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-29 23:55:18 -08:00
Mark Brown
dcfc32babb Input: wm97xx - provide coordinate logs for accelerated I/O
This aids debug of problematic systems.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-28 22:38:30 -08:00
Benjamin Valentin
121873059f Input: xpad - add rumble support for original xbox controller
Signed-off-by: Benjamin Valentin <benpicco@zedat.fu-berlin.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-24 22:42:10 -08:00
Tobias Klauser
ce841b945b Input: xilinx_ps2 - use resource_size
Use the resource_size inline function instead of manually calculating
the resource size.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: John Linn <john.linn@xilinx.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-24 22:41:49 -08:00
Dmitry Torokhov
7755726fe9 Merge commit 'v2.6.33-rc5' into next 2010-01-21 23:55:25 -08:00
Magnus Damm
3bf127637e Input: sh_keysc - add mode 4 and mode 5 support
Add Mode 4 and Mode 5 support to the SH_KEYSC driver. These modes allow
slightly larger key pad matrixes.

While at it, make use of resource_size().

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-21 00:03:56 -08:00
Michael Hennerich
5a9003db1f Input: ADP5588 - add support for ADP5587 devices
The ADP5587 is quite similar to the ADP5588 but features a greater I/O
voltage range and lacks the Dual Light Sensor Interface.  This new part
is also supported by this driver.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-19 00:32:17 -08:00
Linus Torvalds
3b3ef30833 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:
  Input: sentelic - fix left/right horizontal scroll mapping
  Input: pmouse - move Sentelic probe down the list
  Input: add compat support for sysfs and /proc capabilities output
  Input: i8042 - add Dritek quirk for Acer Aspire 5610.
  Input: xbox - do not use GFP_KERNEL under spinlock
  Input: psmouse - fix Synaptics detection when protocol is disabled
  Input: bcm5974 - report ABS_MT events
  Input: davinci_keyscan - add device_enable method to platform data
  Input: evdev - be less aggressive about sending SIGIO notifies
  Input: atkbd - fix canceling event_work in disconnect
  Input: serio - fix potential deadlock when unbinding drivers
  Input: gf2k - fix &&/|| confusion in gf2k_connect()
2010-01-15 14:51:57 -08:00
H Hartley Sweeten
a5abd95cc0 Input: ep93xx_keypad - cleanup and use matrix_keypad helpers
Use struct matrix_keymap_data to supply the keymap from the platform code
and matrix_keypad_build_keymap() to initialize the keymap.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-13 00:37:16 -08:00
Tai-hwa Liang
c332e9fcc5 Input: sentelic - fix left/right horizontal scroll mapping
Signed-off-by: Tai-hwa Liang <avatar@sentelic.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-13 00:28:18 -08:00
Tai-hwa Liang
4a18b3ab6e Input: pmouse - move Sentelic probe down the list
Sentelic probes confuse IBM trackpoints so they stop responding to
TP_READ_ID command. See:

	http://bugzilla.kernel.org/show_bug.cgi?id=14970

Let's move FSP detection lower so it is probed after trackpoint and
others, just before we strat probing for Intellimouse Explorer.

Signed-off-by: Tai-hwa Liang <avatar@sentelic.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-13 00:28:10 -08:00
Dmitry Torokhov
15e184afa8 Input: add compat support for sysfs and /proc capabilities output
Input core displays capabilities bitmasks in form of one or more longs printed
in hex form and separated by spaces. Unfortunately it does not work well
for 32-bit applications running on 64-bit kernels since applications expect
that number is "worth" only 32 bits when kernel advances by 64 bits.

Fix that by ensuring that output produced for compat tasks uses 32-bit units.

Reported-and-tested-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-12 09:30:24 -08:00
Márton Németh
9cb3ce52ca 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>
2010-01-11 00:08:19 -08:00
Elliott Sales de Andrade
e6edbdc52b Input: i8042 - add Dritek quirk for Acer Aspire 5610.
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-11 00:07:30 -08:00
Dmitry Torokhov
dd38d6889d Input: xbox - do not use GFP_KERNEL under spinlock
xbox_play_effect() is called while holding dev->event_lock with
interrupts disabled and thus may not use GFP_KERNEL when submitting
urbs.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-09 23:44:03 -08:00
Márton Németh
c6d5709384 Input: xen-kbdfront - make xenbus device ids constant
The ids field of the struct xenbus_device_id is constant in <linux/xen/xenbus.h>
so it makes sense to mark xenkbd_ids also constant.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-09 23:29:27 -08:00
Márton Németh
35c4b918a6 Input: ns558 - make pnp device ids constant
The id_table field of the struct pnp_driver is constant in <linux/pnp.h>
so it makes sense to mark pnp_devids also constant.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-09 23:29:13 -08:00
Márton Németh
a9844b1850 Input: make PCI device ids constant
The id_table field of the struct pci_driver is constant in <linux/pci.h>
so it makes sense to mark initialization data also constant.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-09 23:28:52 -08:00
Márton Németh
ef9a16f15d Input: xilinx_ps2 - make Open Firmware device ids constant
The match_table field of the struct of_device_id is constant
in <linux/of_platform.h> so it makes sense to mark xps2_of_match
also constant.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-09 23:28:41 -08:00
Márton Németh
ce7b39a181 Input: make i2c device ids constant
The id_table field of the struct i2c_driver is defined as constant
in <linux/i2c.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>
2010-01-09 23:28:33 -08:00
Daniel Drake
e4e6efd2df Input: psmouse - fix Synaptics detection when protocol is disabled
For configurations where Synaptics hardware is present but the Synaptics
extensions support is not compiled in, the mouse is reprobed and a new
device is allocated on every suspend/resume.

During probe, psmouse_switch_protocol() calls psmouse_extensions() with
set_properties=1. This calls the dummy synaptics_init() which returns an
error code, instructing us not to use the synaptics extensions.

During resume, psmouse_reconnect() calls psmouse_extensions() with
set_properties=0, in which case call to synaptics_init() is bypassed and
PSMOUSE_SYNAPTICS is returned. Since the result is different from previous
attempt psmouse_reconnect() fails and full re-probe happens.

Fix this by tweaking the set_properties=0 codepath in psmouse_extensions()
to be more careful about offering PSMOUSE_SYNAPTICS extensions.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-07 01:53:30 -08:00
Dmitry Torokhov
8cab9ba104 Input: elo - switch to using dev_xxx() when printing messages
Also fix formatting of "switch" statements.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-06 23:54:40 -08:00
Dmitry Torokhov
a9a1f9c315 Input: atkbd - switch to dev_err() and friends
dev_err(), dev_warn() and dev_dbg() ensure consistency in driver messages.
Also switch to using bool where appropriate and fix some formatting issues.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-06 23:54:32 -08:00
Henrik Rydberg
6f2701b79f Input: bcm5974 - report ABS_MT events
Make bcm5974 report raw multi-touch (MT) data in the form of ABS_MT events.

[dtor@mail.ru: get rid of module option, always report all events]
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-06 00:33:46 -08:00
Dmitry Torokhov
3032458e38 Input: psmouse - remove unused 'autocal' parameter from hgpk protocol
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-06 00:33:28 -08:00
Dmitry Torokhov
92a3a58788 Input: cleanse capabilities bits before registering device
To avoid showing garbage in capability bits, zero out bitmasks absent
from dev->evbit in case driver inadvertently leaves some garbage there.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-06 00:27:29 -08:00
Dmitry Torokhov
4f93df4085 Input: automatically reset KEY_RESERVED bit for all input devices
KEY_RESERVED is not supposed to be reported to userspace but rather to
mark unused entries in keymaps.

Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-06 00:26:20 -08:00
Dmitry Torokhov
fc99ec6f4b Input: gameport - switch to using pr_xxx() and dev_xxx()
pr_xxx() and dev_xxx() helpers ensure that all messages emitted by the
module have consistent prefixes, so let's use them. Also fix some
formatting issues.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-06 00:24:21 -08:00
Dmitry Torokhov
d621af4730 Input: gameport - make use of list_first_entry() helper
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-06 00:24:09 -08:00
Dmitry Torokhov
361b7b5b03 Input: gameport - let device core tell us if device was registered
No need to keep track of it by ourselves.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-06 00:23:51 -08:00
Dmitry Torokhov
cac9169bf7 Input: serio - use pr_xxx() and dev_xxx() helpers
pr_xxx() and dev_xxx() helpers ensure that all messages emitted by the
module have consistent prefixes, so let's use them. Also fix some
formatting issues.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-06 00:22:41 -08:00