platform/kernel/linux-starfive.git
13 years agoInput: wacom - fix error path in wacom_probe()
Alexander Strakh [Fri, 11 Feb 2011 08:44:41 +0000 (00:44 -0800)]
Input: wacom - fix error path in wacom_probe()

If we fail to retrieve HID descriptor we need to free allocated URB so
jump to proper label to do that.

Signed-off-by: Alexander Strakh <strakh@ispras.ru>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: ads7846 - check proper condition when freeing gpio
Dmitry Torokhov [Fri, 4 Feb 2011 08:37:26 +0000 (00:37 -0800)]
Input: ads7846 - check proper condition when freeing gpio

When driver uses custom pendown detection method gpio_pendown is not
set up and so we should not try to free it, otherwise we are presented
with:

------------[ cut here ]------------
WARNING: at drivers/gpio/gpiolib.c:1258 gpio_free+0x100/0x12c()
Modules linked in:
[<c0061208>] (unwind_backtrace+0x0/0xe4) from [<c0091f58>](warn_slowpath_common+0x4c/0x64)
[<c0091f58>] (warn_slowpath_common+0x4c/0x64) from [<c0091f88>](warn_slowpath_null+0x18/0x1c)
[<c0091f88>] (warn_slowpath_null+0x18/0x1c) from [<c024e610>](gpio_free+0x100/0x12c)
[<c024e610>] (gpio_free+0x100/0x12c) from [<c03e9fbc>](ads7846_probe+0xa38/0xc5c)
[<c03e9fbc>] (ads7846_probe+0xa38/0xc5c) from [<c02cff14>](spi_drv_probe+0x18/0x1c)
[<c02cff14>] (spi_drv_probe+0x18/0x1c) from [<c028bca4>](driver_probe_device+0xc8/0x184)
[<c028bca4>] (driver_probe_device+0xc8/0x184) from [<c028bdc8>](__driver_attach+0x68/0x8c)
[<c028bdc8>] (__driver_attach+0x68/0x8c) from [<c028b4c8>](bus_for_each_dev+0x48/0x74)
[<c028b4c8>] (bus_for_each_dev+0x48/0x74) from [<c028ae08>](bus_add_driver+0xa0/0x220)
[<c028ae08>] (bus_add_driver+0xa0/0x220) from [<c028c0c0>](driver_register+0xa8/0x134)
[<c028c0c0>] (driver_register+0xa8/0x134) from [<c0050550>](do_one_initcall+0xcc/0x1a4)
[<c0050550>] (do_one_initcall+0xcc/0x1a4) from [<c00084e4>](kernel_init+0x14c/0x214)
[<c00084e4>] (kernel_init+0x14c/0x214) from [<c005b494>](kernel_thread_exit+0x0/0x8)
---[ end trace 4053287f8a5ec18f ]---

Also rearrange ads7846_setup_pendown() to have only one exit point
returning success.

Reported-by: Sourav Poddar <sourav.poddar@ti.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Reviewed-by: Charulatha V <charu@ti.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoRevert "Input: do not pass injected events back to the originating handler"
Dmitry Torokhov [Thu, 3 Feb 2011 07:04:27 +0000 (23:04 -0800)]
Revert "Input: do not pass injected events back to the originating handler"

This reverts commit 5fdbe44d033d059cc56c2803e6b4dbd8cb4e5e39.

Apparently there exist userspace programs that expect to be able to
"loop back" and distribute to readers events written into
/dev/input/eventX and this change made for the benefit of SysRq
handler broke them. Now that SysRq uses alternative method to suppress
filtering of the events it re-injects we can safely revert this change.

Reported-by: Kristen Carlson Accardi <kristen@linux.intel.com>
Cc: stable@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
13 years agoInput: sysrq - rework re-inject logic
Dmitry Torokhov [Thu, 3 Feb 2011 06:59:54 +0000 (22:59 -0800)]
Input: sysrq - rework re-inject logic

Internally 'disable' the filter when re-injecting Alt-SysRq instead
of relying on input core to suppress delivery of injected events
to the originating handler.

This allows to revert commit 5fdbe44d033d059cc56c2803e6b4dbd8cb4e5e39
which causes problems with existing userspace programs trying to
loopback the events via evdev.

Reported-by: Kristen Carlson Accardi <kristen@linux.intel.com>
Cc: stable@kernel.org
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: serio - clear pending rescans after sysfs driver rebind
Duncan Laurie [Thu, 3 Feb 2011 06:59:54 +0000 (22:59 -0800)]
Input: serio - clear pending rescans after sysfs driver rebind

When rebinding a serio driver via sysfs drvctl interface it is
possible for an interrupt to trigger after the disconnect of the
existing driver and before the binding of the new driver.  This will
cause the serio interrupt handler to queue a rescan event which will
disconnect the new driver immediately after it is attached.

This change removes pending rescans from the serio event queue after
processing the drvctl request but before releasing the serio mutex.

Reproduction involves issuing a rebind of device port from psmouse
driver to serio_raw driver while generating input to trigger
interrupts.  Then checking to see if the corresponding
i8042/serio4/driver is correctly attached to the serio_raw driver
instead of psmouse.

Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: rotary_encoder - use proper irqflags
Alexander Stein [Thu, 3 Feb 2011 06:59:54 +0000 (22:59 -0800)]
Input: rotary_encoder - use proper irqflags

IORESOURCE_IRQ_* is wrong for irq_request, use the correct IRQF_* instead.

Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: wacom_w8001 - report resolution to userland
Ping Cheng [Tue, 1 Feb 2011 05:06:38 +0000 (21:06 -0800)]
Input: wacom_w8001 - report resolution to userland

Serial devices send both pen and touch data through the same logical
port. Since we scaled touch to pen maximum, we use pen resolution
for touch as well here.

This is under the assumption that pen and touch share the same physical
surface. In the case when a small physical dimensional difference occurs
between pen and touch, we assume the tolerance for touch point precision
is higher than pen and the difference is within touch point tolerance.

A per-MT tool based resolution mechanism should be introduced if the
above assumption does not hold true for the pen and touch devices any
more.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: synaptics - retry failed resets when reconnecting
Alexandre Peixoto Ferreira [Sat, 29 Jan 2011 06:05:14 +0000 (22:05 -0800)]
Input: synaptics - retry failed resets when reconnecting

On some machines, like Dell Studio XPS 16 (1640), touchpad fails to
respond to the standard query after first reset but may start
responding later, so let's repeat reset sequence several (3) times.

Signed-off-by: Alexandre Peixoto Ferreira <alexandref75@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: synaptics - fix reconnect logic on MT devices
Alexandre Peixoto Ferreira [Sat, 29 Jan 2011 06:05:14 +0000 (22:05 -0800)]
Input: synaptics - fix reconnect logic on MT devices

synaptics_set_advanced_gesture_mode() affect capabilities bits we should
perform comparison after calling this function, otherwise they will never
match and we will be forced to perform full reconnect.

Signed-off-by: Alexandre Peixoto Ferreira <alexandref75@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: tegra-kbc - fix keymap entry for LeftMeta key
Rakesh Iyer [Sat, 29 Jan 2011 06:05:14 +0000 (22:05 -0800)]
Input: tegra-kbc - fix keymap entry for LeftMeta key

Correct key mapping for Left Meta key.

Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: tegra-kbc - fix build error
Rakesh Iyer [Sat, 29 Jan 2011 06:05:14 +0000 (22:05 -0800)]
Input: tegra-kbc - fix build error

Fix build error introduced by variable name change.

Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: wacom - pass touch resolution to clients through input_absinfo
Ping Cheng [Wed, 26 Jan 2011 02:03:13 +0000 (18:03 -0800)]
Input: wacom - pass touch resolution to clients through input_absinfo

Also remove fake ABS_RX/ABS_RY "axes" that were used to report physical
dimensions now that we have better way.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: wacom - add 2 Bamboo Pen and touch models
Ping Cheng [Mon, 24 Jan 2011 17:32:50 +0000 (09:32 -0800)]
Input: wacom - add 2 Bamboo Pen and touch models

Reported-by: David Foley <favux.is@gmail.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: sysrq - ensure sysrq_enabled and __sysrq_enabled are consistent
Andy Whitcroft [Mon, 24 Jan 2011 17:31:38 +0000 (09:31 -0800)]
Input: sysrq - ensure sysrq_enabled and __sysrq_enabled are consistent

Currently sysrq_enabled and __sysrq_enabled are initialised separately
and inconsistently, leading to sysrq being actually enabled by reported
as not enabled in sysfs.  The first change to the sysfs configurable
synchronises these two:

    static int __read_mostly sysrq_enabled = 1;
    static int __sysrq_enabled;

Add a common define to carry the default for these preventing them becoming
out of sync again.  Default this to 1 to mirror previous behaviour.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Cc: stable@kernel.org
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: sparse-keymap - fix KEY_VSW handling in sparse_keymap_setup
Dmitry Torokhov [Fri, 21 Jan 2011 07:05:17 +0000 (23:05 -0800)]
Input: sparse-keymap - fix KEY_VSW handling in sparse_keymap_setup

We were forgetting to set up device capabilities for KEY_VSW entries.

Reported-by: Tapio Vihuri <tapio.vihuri@nokia.com>
Tested-by: Tapio Vihuri <tapio.vihuri@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: tegra-kbc - add tegra keyboard driver
Rakesh Iyer [Thu, 20 Jan 2011 07:38:47 +0000 (23:38 -0800)]
Input: tegra-kbc - add tegra keyboard driver

This patch adds support for the internal matrix keyboard controller for
Nvidia Tegra platforms.

Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Reviewed-by: Trilok Soni <tsoni@codeaurora.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: gpio_keys - switch to using request_any_context_irq
Philippe Langlais [Fri, 21 Jan 2011 07:09:30 +0000 (23:09 -0800)]
Input: gpio_keys - switch to using request_any_context_irq

The driver does not require hardirq context and can work with threaded
interrupts as well, so let's switch to request_any_context_irq which
will select the context that is available for us.

Signed-off-by: Philippe Langlais <philippe.langlais@stericsson.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: serio - allow registered drivers to get status flag
David Engraf [Fri, 21 Jan 2011 07:05:17 +0000 (23:05 -0800)]
Input: serio - allow registered drivers to get status flag

Parse and pass the status byte information to the registered serio
drivers as well as the data bytes.

Signed-off-by: David Engraf<david.engraf@sysgo.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: ct82710c - return proper error code for ct82c710_open
Davidlohr Bueso [Tue, 18 Jan 2011 04:48:18 +0000 (20:48 -0800)]
Input: ct82710c - return proper error code for ct82c710_open

If request_irq() fails we should return the proper error instead of -1.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: bu21013_ts - added regulator support
Naveen Kumar Gaddipati [Tue, 18 Jan 2011 04:47:31 +0000 (20:47 -0800)]
Input: bu21013_ts - added regulator support

Add regulator support in ROHM BU21013 touch panel driver.

Signed-off-by: Naveen Kumar Gaddipati <naveen.gaddipati@stericsson.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: bu21013_ts - remove duplicate resolution parameters
Naveen Kumar Gaddipati [Tue, 18 Jan 2011 04:40:58 +0000 (20:40 -0800)]
Input: bu21013_ts - remove duplicate resolution parameters

Remove duplicate display resolution parameters from platform data as
one pair is quite enough.

Signed-off-by: Naveen Kumar Gaddipati <naveen.gaddipati@stericsson.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: tnetv107x-ts - don't treat NULL clk as an error
Jamie Iles [Tue, 18 Jan 2011 04:40:55 +0000 (20:40 -0800)]
Input: tnetv107x-ts - don't treat NULL clk as an error

We should use IS_ERR() when checking whether clk_get() succeeded or
not since it returns errors by encoding error codes with ERR_PTR().

Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: tnetv107x-keypad - don't treat NULL clk as an error
Jamie Iles [Tue, 18 Jan 2011 04:40:32 +0000 (20:40 -0800)]
Input: tnetv107x-keypad - don't treat NULL clk as an error

We should use IS_ERR() when checking whether clk_get() succeeded or
not since it returns errors by encoding error codes with ERR_PTR().

Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoMerge branch 'next' into for-linus
Dmitry Torokhov [Wed, 12 Jan 2011 06:01:45 +0000 (22:01 -0800)]
Merge branch 'next' into for-linus

13 years agoInput: add SW_ROTATE_LOCK switch type
Jekyll Lai [Wed, 12 Jan 2011 05:53:55 +0000 (21:53 -0800)]
Input: add SW_ROTATE_LOCK switch type

This switch is used to signal that user want to disable screen
transitions from portrait to landscape mode and back.

Signed-off-by: Jekyll Lai <jekyll_lai@wistron.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: fix force feedback capability query example
Alexander Stein [Tue, 11 Jan 2011 09:07:09 +0000 (01:07 -0800)]
Input: fix force feedback capability query example

'features' is a bit array, not byte array

Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Acked-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: wacom_w8001 - add single-touch support
Ping Cheng [Tue, 11 Jan 2011 09:06:58 +0000 (01:06 -0800)]
Input: wacom_w8001 - add single-touch support

Emulate single-touch compatible events for the 2-finger panels
so that they can be used with single-touch legacy clients.

Assign device ids as Wacom USB vendor ID and product ID.
Name the device to reflect its specific features.

Scale touch coordinates to pen maximum if pen supported.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: add Austria Microsystem AS5011 joystick driver
Fabien Marteau [Mon, 10 Jan 2011 19:01:13 +0000 (11:01 -0800)]
Input: add Austria Microsystem AS5011 joystick driver

This is driver for EasyPoint AS5011 2 axis joystick chip. This chip is
plugged on an I2C bus.

Tested on ARM processor (i.MX27).

Signed-off-by: Fabien Marteau <fabien.marteau@armadeus.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: remove aaed2000 keyboard driver
Jamie Iles [Sat, 8 Jan 2011 09:37:42 +0000 (01:37 -0800)]
Input: remove aaed2000 keyboard driver

The only platform using this driver (mach-aaec2000) is no longer in
the kernel so remove the driver.

Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: i8042 - introduce 'notimeout' blacklist for Dell Vostro V13
Jiri Kosina [Sat, 8 Jan 2011 09:37:26 +0000 (01:37 -0800)]
Input: i8042 - introduce 'notimeout' blacklist for Dell Vostro V13

i8042 controller present in Dell Vostro V13 errorneously signals spurious
timeouts.

Introduce i8042.notimeout parameter for ignoring i8042-signalled timeouts
and apply this quirk automatically for Dell Vostro V13, based on DMI match.

In addition to that, this machine also needs to be added to nomux blacklist.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: cy8ctmg110_ts - Convert to dev_pm_ops
Mark Brown [Fri, 7 Jan 2011 07:01:03 +0000 (23:01 -0800)]
Input: cy8ctmg110_ts - Convert to dev_pm_ops

There is a general move towards the use of dev_pm_ops rather than
bus specific suspend APIs as this simplifies both the bus and PM core
implementations. Convert the cy8ctmg110_ts driver over.

Compile tested only.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: migor_ts - convert to dev_pm_ops
Mark Brown [Fri, 7 Jan 2011 07:01:03 +0000 (23:01 -0800)]
Input: migor_ts - convert to dev_pm_ops

There is a general move towards the use of dev_pm_ops rather than
bus specific suspend APIs as this simplifies both the bus and PM core
implementations. Convert the migor_ts driver over.

Compile tested only.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: mcs5000_ts - convert to dev_pm_ops
Mark Brown [Fri, 7 Jan 2011 07:01:03 +0000 (23:01 -0800)]
Input: mcs5000_ts - convert to dev_pm_ops

There is a general move towards the use of dev_pm_ops rather than
bus specific suspend APIs as this simplifies both the bus and PM core
implementations. Convert the mcs5000_ts driver over.

Compile tested only.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: eeti_ts - convert to dev_pm_ops
Mark Brown [Fri, 7 Jan 2011 07:01:02 +0000 (23:01 -0800)]
Input: eeti_ts - convert to dev_pm_ops

There is a general move towards the use of dev_pm_ops rather than
bus specific suspend APIs as this simplifies both the bus and PM core
implementations. Convert the eeti_ts driver over.

Compile tested only by me, but Sven Neumann reports that the new code
works.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Sven Neumann <s.neumann@raumfeld.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: ad7879 - convert I2C to dev_pm_ops
Mark Brown [Fri, 7 Jan 2011 07:01:02 +0000 (23:01 -0800)]
Input: ad7879 - convert I2C to dev_pm_ops

There is a general move towards the use of dev_pm_ops rather than
bus specific suspend APIs as this simplifies both the bus and PM core
implementations. Convert the ad7879-ts I2C support over.

Compile tested only.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoMerge branch 'next' into for-linus
Dmitry Torokhov [Fri, 7 Jan 2011 06:34:59 +0000 (22:34 -0800)]
Merge branch 'next' into for-linus

Conflicts:
include/linux/input.h

13 years agoInput: wacom_w8001 - support pen or touch only devices
Ping Cheng [Fri, 24 Dec 2010 21:16:53 +0000 (13:16 -0800)]
Input: wacom_w8001 - support pen or touch only devices

Not all penabled devices support touch. The same holds true for touch
devices, so we should be setting up devices according to the results
returned when we query the hardware.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: wacom_w8001 - use __set_bit to set keybits
Ping Cheng [Fri, 24 Dec 2010 21:13:25 +0000 (13:13 -0800)]
Input: wacom_w8001 - use __set_bit to set keybits

This makes code safer and easier to read.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rydberg/input...
Dmitry Torokhov [Tue, 28 Dec 2010 01:33:20 +0000 (17:33 -0800)]
Merge branch 'next' of git://git./linux/kernel/git/rydberg/input-mt into next

13 years agoInput: bu21013_ts - fix misuse of logical operation in place of bitop
David Sterba [Tue, 28 Dec 2010 01:20:01 +0000 (17:20 -0800)]
Input: bu21013_ts - fix misuse of logical operation in place of bitop

Signed-off-by: David Sterba <dsterba@suse.cz>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: i8042 - add Acer Aspire 5100 to the Dritek list
Pali Rohár [Tue, 28 Dec 2010 01:21:45 +0000 (17:21 -0800)]
Input: i8042 - add Acer Aspire 5100 to the Dritek list

This patch adds notebook Acer Aspire 5100 to the list of Dritek HW. Acer
Aspire 5100 needs Dritek keyboard extension to support all Fn keys.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Tested-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: wacom - add support for digitizer in Lenovo W700
Ajay Ramaswamy [Thu, 23 Dec 2010 09:19:39 +0000 (01:19 -0800)]
Input: wacom - add support for digitizer in Lenovo W700

Signed-off-by: Ajay Ramaswamy <ajay@ramaswamy.net>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: psmouse - disable the synaptics extension on OLPC machines
Andres Salomon [Thu, 23 Dec 2010 09:19:38 +0000 (01:19 -0800)]
Input: psmouse - disable the synaptics extension on OLPC machines

OLPC has switched to a Synaptics touchpad.  It turns out that it's
pretty useless in absolute mode.  This patch looks for an OLPC
system (via DMI tables), and refuses to init Synaptics mode in
that scenario (falling back to relative mode).

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: psmouse - fix up Synaptics comment
Andres Salomon [Thu, 23 Dec 2010 09:18:28 +0000 (01:18 -0800)]
Input: psmouse - fix up Synaptics comment

Minor comment fixup for typos and grammar. Noticed while adding a
separate workaround.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: synaptics - ignore bogus mt packet
Henrik Rydberg [Sat, 18 Dec 2010 14:42:30 +0000 (15:42 +0100)]
Input: synaptics - ignore bogus mt packet

In multitouch mode, at least one device (fw: 7.4 id: 0x1c0b1) sometimes
sends a final main packet with x == 1. Since the normal values are above
1472, this is clearly bogus. At the same time, a two-finger touch is
signaled, even though only one finger was on the pad to begin with. This
patch ignores the packet altogether, removing the problem.

Acked-by: Chris Bagwell <chris@cnpbagwell.com>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
13 years agoInput: synaptics - add multi-finger and semi-mt support
Henrik Rydberg [Tue, 21 Dec 2010 17:11:25 +0000 (18:11 +0100)]
Input: synaptics - add multi-finger and semi-mt support

The Synaptics 2.7 series of touchpads support a mode for reporting two
sets of X/Y/Pressure data (advanced gesture mode). By default, these
devices report only single finger data, depriving userspace of the
nowadays ubiquitous two-finger scroll gesture.

Enabling advanced gesture mode also enables the multi-finger report,
although the device does not claim that capability. Up to three
fingers can be reported this way.

While two or three fingers are touching, the normal packet is
prepended by a reduced finger packet of lower resolution. From the two
packets (which do not represent the actual fingers), the bounding
rectangle of the individual contacts can be extracted.  This
information is sufficient to perform scaling gestures and a limited
form of rotation gesture. The behavior has been coined semi-mt
capability, and is signaled to userspace via the INPUT_PROP_SEMI_MT
device property.

Work to decode the advanced gesture packet: Takashi Iwai.
Cleanup and testing of the original patch: Chase Douglas.
Minor cleanup and testing: Chris Bagwell.
Finalization and semi-mt support: Henrik Rydberg.

Reported-by: Tobyn Bertram
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
13 years agoInput: synaptics - report clickpad property
Henrik Rydberg [Thu, 16 Dec 2010 08:52:23 +0000 (09:52 +0100)]
Input: synaptics - report clickpad property

With the new input property interface, it is possible to report the
special quirks of a device using ioctl/sysfs. This patch sets up the
device as a pointer, and reports the clickpad functionality via the
INPUT_PROP_BUTTONPAD property.

Acked-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
13 years agoinput: mt: Document interface updates
Henrik Rydberg [Mon, 20 Dec 2010 14:09:27 +0000 (15:09 +0100)]
input: mt: Document interface updates

This patch documents the recent input-mt interface changes.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
13 years agoInput: fix double equality sign in uevent
Henrik Rydberg [Sat, 18 Dec 2010 19:28:26 +0000 (20:28 +0100)]
Input: fix double equality sign in uevent

Looking at the uevent stream for input devices, all properties are on
the form "A=B" except the bitmap values, which are on the form
"A==B". This bug has been around at least since 2007, and the input
uevent code has been untouched since. The recent addition of device
properties suggests this is a good time for a remedy.

Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
13 years agoInput: introduce device properties
Henrik Rydberg [Sat, 18 Dec 2010 19:51:13 +0000 (20:51 +0100)]
Input: introduce device properties

Today, userspace sets up an input device based on the data it emits.
This is not always enough; a tablet and a touchscreen may emit exactly
the same data, for instance, but the former should be set up with a
pointer whereas the latter does not need to. Recently, a new type of
touchpad has emerged where the buttons are under the pad, which
changes logic without changing the emitted data. This patch introduces
a new ioctl, EVIOCGPROP, which enables user access to a set of device
properties useful during setup. The properties are given as a bitmap
in the same fashion as the event types, and are also made available
via sysfs, uevent and /proc/bus/input/devices.

Acked-by: Ping Cheng <pingc@wacom.com>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
13 years agohid: egalax: Add support for Wetab (726b)
Andy Ross [Thu, 16 Dec 2010 23:53:19 +0000 (15:53 -0800)]
hid: egalax: Add support for Wetab (726b)

This patch adds support for another Wetab device (726b), and grabs it
accordingly in hid-core.

[rydberg@euromail.se: rename and log message changes]
Signed-off-by: Andy Ross <andy@plausible.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
13 years agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rydberg/input...
Dmitry Torokhov [Thu, 16 Dec 2010 17:17:48 +0000 (09:17 -0800)]
Merge branch 'next' of git://git./linux/kernel/git/rydberg/input-mt into next

Conflicts:
drivers/input/Makefile

13 years agoInput: include MT library as source for kerneldoc
Dmitry Torokhov [Thu, 9 Dec 2010 09:08:26 +0000 (01:08 -0800)]
Input: include MT library as source for kerneldoc

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
13 years agoMAINTAINERS: Update input-mt entry
Henrik Rydberg [Tue, 7 Dec 2010 08:18:28 +0000 (09:18 +0100)]
MAINTAINERS: Update input-mt entry

The input multitouch core is now located in its own file,
and maintained via a git tree. Update the maintainers entry
accordingly.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
13 years agohid: egalax: Add support for Samsung NB30 netbook
Richard Nauber [Tue, 14 Dec 2010 21:36:18 +0000 (22:36 +0100)]
hid: egalax: Add support for Samsung NB30 netbook

The Samsung NB30 touch has a DWAV dual-touch device. This patch adds
the NB30 to the list of supported devices, and grabs it accordingly in
hid-core.

[rydberg@euromail.se: rename and log message changes]
Signed-off-by: Richard Nauber <Richard.Nauber@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
13 years agohid: egalax: Document the new devices in Kconfig
Henrik Rydberg [Mon, 29 Nov 2010 13:40:11 +0000 (14:40 +0100)]
hid: egalax: Document the new devices in Kconfig

Add the new supported devices to the kernel menu config help text.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Cc: Stephane Chatty <chatty@enac.fr>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
13 years agohid: egalax: Add support for Wetab
Henrik Rydberg [Mon, 29 Nov 2010 06:27:49 +0000 (07:27 +0100)]
hid: egalax: Add support for Wetab

The Wetab tablet dual-touch controller works the same way as the one
in the Joojoo tablet. This patch adds the Wetab to the list of
supported devices, and grabs it accordingly in hid-core.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Cc: Stephane Chatty <chatty@enac.fr>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
13 years agohid: egalax: Convert to MT slots
Henrik Rydberg [Mon, 6 Dec 2010 13:04:21 +0000 (14:04 +0100)]
hid: egalax: Convert to MT slots

The firmware in the joojoo reports touches sequentially, one per
report, which confuses the current driver. A further complication is
the absense of any indication of a touch frame. This patch converts
the driver to the MT slots protocol, and outputs one full touch frame
per report. This way, proper handling for both firmwares is ensured.

Tested-by: Philipp Merkel <mail@philmerk.de>
Cc: Stephane Chatty <chatty@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
13 years agohid: egalax: Add event filtering
Henrik Rydberg [Mon, 11 Oct 2010 19:20:51 +0000 (21:20 +0200)]
hid: egalax: Add event filtering

Use estimated signal-to-noise ratios to reduce noise and limit the
amount of events emitted.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Cc: Stephane Chatty <chatty@enac.fr>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
13 years agohid: egalax: Report zero as minimum pressure
Henrik Rydberg [Mon, 11 Oct 2010 19:16:43 +0000 (21:16 +0200)]
hid: egalax: Report zero as minimum pressure

The firmware reports a logical minimum of one, but in order for
userspace applications to correctly map all reported values to
non-zero pressure, the driver needs to report a logical minimum of
zero.  Fixed with this patch.

Tested-by: Philipp Merkel <mail@philmerk.de>
Cc: Stephane Chatty <chatty@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
13 years agohid: egalax: Correct for device resolution report error
Henrik Rydberg [Wed, 13 Oct 2010 20:18:32 +0000 (22:18 +0200)]
hid: egalax: Correct for device resolution report error

The firmware of both supported devices report a X/Y maximum of 4095,
whereas in reality, it is eight times larger. Fixed with this patch.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Cc: Stephane Chatty <chatty@enac.fr>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
13 years agohid: egalax: Setup input device manually
Henrik Rydberg [Sat, 27 Nov 2010 16:56:17 +0000 (17:56 +0100)]
hid: egalax: Setup input device manually

The hid core does not yet handle input filtering. Take over the setup
of the input device, so that proper signal-to-noise ratios can be
used.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Cc: Stephane Chatty <chatty@enac.fr>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
13 years agoinput: mt: Add hovering distance axis
Henrik Rydberg [Mon, 6 Dec 2010 09:05:43 +0000 (10:05 +0100)]
input: mt: Add hovering distance axis

Touch devices capable of hovering, i.e., fingers detected a
distance from the surface, are not supported by the current
input MT protocol. This patch adds ABS_MT_DISTANCE, which may
be used to indicate the distance between the contact and the
surface.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
13 years agoinput: mt: Move tracking and pointer emulation to input-mt
Henrik Rydberg [Wed, 15 Dec 2010 12:50:34 +0000 (13:50 +0100)]
input: mt: Move tracking and pointer emulation to input-mt

The drivers using the type B protocol all report tracking information
the same way. The contact id is semantically equivalent to
ABS_MT_SLOT, and the handling of ABS_MT_TRACKING_ID only complicates
the driver. The situation can be improved upon by providing a common
pointer emulation code, thereby removing the need for the tracking id
in the driver.  This patch moves all tracking event handling over to
the input core, simplifying both the existing drivers and the ones
currently in preparation.

Acked-by: Ping Cheng <pingc@wacom.com>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
13 years agoinput: mt: Collect slots initialization code
Henrik Rydberg [Sat, 27 Nov 2010 09:50:54 +0000 (10:50 +0100)]
input: mt: Collect slots initialization code

The MT slots devices all follow the same initialization pattern
of creating slots and hinting about buffer size. Let drivers call
an initialization function instead, and make sure it can be called
repeatedly without side effects.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
13 years agoinput: mt: Break out slots handling
Henrik Rydberg [Sat, 27 Nov 2010 08:16:48 +0000 (09:16 +0100)]
input: mt: Break out slots handling

In preparation for common code to handle a larger set of MT slots
devices, move the slots handling over to a separate file.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
13 years agoInput: add ST1232 touchscreen controller driver
Tony SIM [Thu, 16 Dec 2010 07:39:25 +0000 (23:39 -0800)]
Input: add ST1232 touchscreen controller driver

This patch introduces support for Sitronix ST1232 integrated capacitive
touchscreen with LCD module. The touchscreen is multitouch capable and
can report coordinates of up to two contact points.

Signed-off-by: Tony SIM <chinyeow.sim.xt@renesas.com>
Reviewed-by: Trilok Soni <tsoni@codeaurora.org>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: define separate EVIOCGKEYCODE_V2/EVIOCSKEYCODE_V2
Dmitry Torokhov [Wed, 15 Dec 2010 07:53:21 +0000 (23:53 -0800)]
Input: define separate EVIOCGKEYCODE_V2/EVIOCSKEYCODE_V2

The desire to keep old names for the EVIOCGKEYCODE/EVIOCSKEYCODE while
extending them to support large scancodes was a mistake. While we tried
to keep ABI intact (and we succeeded in doing that, programs compiled
on older kernels will work on newer ones) there is still a problem with
recompiling existing software with newer kernel headers.

New kernel headers will supply updated ioctl numbers and kernel will
expect that userspace will use struct input_keymap_entry to set and
retrieve keymap data. But since the names of ioctls are still the same
userspace will happily compile even if not adjusted to make use of the
new structure and will start miraculously fail in the field.

To avoid this issue let's revert EVIOCGKEYCODE/EVIOCSKEYCODE definitions
and add EVIOCGKEYCODE_V2/EVIOCSKEYCODE_V2 so that userspace can explicitly
select the style of ioctls it wants to employ.

Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Acked-by: Jarod Wilson <jarod@redhat.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: wacom - add another Bamboo Pen ID (0xd4)
Kevin Granade [Sat, 11 Dec 2010 07:04:02 +0000 (23:04 -0800)]
Input: wacom - add another Bamboo Pen ID (0xd4)

Add the features struct and device table entry to enable yet another
version of Wacom Bamboo Pen (CTL460, Product ID 0xD4).

Signed-off-by: Kevin Granade <kevin.granade@gmail.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: cma3000_d0x_i2c - add MODULE_DEVICE_TABLE
Dmitry Torokhov [Wed, 8 Dec 2010 06:11:09 +0000 (22:11 -0800)]
Input: cma3000_d0x_i2c - add MODULE_DEVICE_TABLE

This should allow loading this module automatically on systems that
have such device.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: tca6416-keypad - add support for tca6408a
Tony SIM [Tue, 7 Dec 2010 10:54:00 +0000 (02:54 -0800)]
Input: tca6416-keypad - add support for tca6408a

Support 8-bit tca6408a I/O expander as a keypad.

Signed-off-by: Tony SIM <chinyeow.sim.xt@renesas.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: wacom - add new Bamboo PT (0xdb)
David Foley [Wed, 8 Dec 2010 05:05:59 +0000 (21:05 -0800)]
Input: wacom - add new Bamboo PT (0xdb)

Adds new Bamboo Pen & Touch model - Bamboo P & T Special Edition
Medium (CTH661/L; Product ID = 0xdb).

Tested-by: Tobias Verbeke <tobias.verbeke@gmail.com>
Signed-off-by: David Foley <favux.is@gmail.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: add input driver for polled GPIO buttons
Gabor Juhos [Tue, 7 Dec 2010 01:14:47 +0000 (17:14 -0800)]
Input: add input driver for polled GPIO buttons

The existing gpio-keys driver can be usable only for GPIO lines with
interrupt support. Several devices have buttons connected to a GPIO
line which is not capable to generate interrupts. This patch adds a
new input driver using the generic GPIO layer and the input-polldev
to support such buttons.

[Ben Gardiner <bengardiner@nanometrics.ca: fold code to use more
 of the original gpio_keys infrastructure; cleanups and other
 improvements.]

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Tested-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: turbografx - fix reference counting
Namhyung Kim [Wed, 1 Dec 2010 17:19:45 +0000 (09:19 -0800)]
Input: turbografx - fix reference counting

The ref-count of parport gained from parport_find_number()
was not released in normal path.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: synaptics - fix handling of 2-button ClickPads
Yan Li [Wed, 1 Dec 2010 07:51:03 +0000 (23:51 -0800)]
Input: synaptics - fix handling of 2-button ClickPads

Lenovo S10-3t's ClickPad is a 2-button ClickPad that reports BTN_LEFT
and BTN_RIGHT as normal touchpad, unlike the 1-button ClickPad used in
HP mini 210 that reports solely BTN_MIDDLE.

In 0xc0-cap response, the 1-button ClickPad has the 20-bit set while
2-button ClickPad has the 8-bit set.

This patch makes the kernel only handle 1-button ClickPad specially,
and treat 2-button ClickPad in the same fashion as regular touchpads.

This fixes kernel bug #18122 and MeeGo bug #4807.

Signed-off-by: Yan Li <yan.i.li@intel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: wacom - add IDs for two new Bamboo PTs
David Foley [Wed, 1 Dec 2010 07:45:46 +0000 (23:45 -0800)]
Input: wacom - add IDs for two new Bamboo PTs

Add two new Bamboo Pen & Touch models:

Bamboo Comic Medium (CTH661/S1; Product ID = 0xd8)
Bamboo P & T Special Edition Small (CTH461/L;  Product ID = 0xdA)

Tested-by: IRIE Shinsuke <irieshinsuke@yahoo.co.jp>
Tested-by: Andrea Cadeddu <mrernia@gmail.com>
Signed-off-by: David Foley <favux.is@gmail.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: document struct input_absinfo
Dmitry Torokhov [Tue, 30 Nov 2010 07:33:04 +0000 (23:33 -0800)]
Input: document struct input_absinfo

Add documentation for struct input_absinfo that is used in EVIOCGABS
and EVIOCSABS ioctl and specify units of measure used for reporting
resolution for an axis.

Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: add keycodes for touchpad on/off keys
Bastien Nocera [Tue, 30 Nov 2010 07:33:05 +0000 (23:33 -0800)]
Input: add keycodes for touchpad on/off keys

Some laptops will have a "touchpad toggle" soft button, which expects
user-space to turn off the touchpad themselves, some other devices will
do this in hardware, but send key events telling us that the touchpad
has been turned off/on.

KEY_TOUCHPAD_ON/KEY_TOUCHPAD_OFF will be used by user-space to show a
popup with the status of the touchpad.

Signed-off-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: use pr_fmt and pr_<level>
Joe Perches [Tue, 30 Nov 2010 07:33:07 +0000 (23:33 -0800)]
Input: use pr_fmt and pr_<level>

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: i8042 - use pr_<level>, pr_fmt, fix dbg and __FILE__ use
Joe Perches [Tue, 30 Nov 2010 07:33:07 +0000 (23:33 -0800)]
Input: i8042 - use pr_<level>, pr_fmt, fix dbg and __FILE__ use

Standardized message logging prefixes.
Removed \n from dbg macro, added \n to each dbg call site.
Removed direct use of __FILE__ from dbg, converted to pr_fmt(fmt)
Added non-debug printf argument verification of dbg calls
Removed "i8042.c" from printks, converted to pr_<level>

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: add CMA3000 accelerometer driver
Hemanth V [Wed, 1 Dec 2010 07:03:54 +0000 (23:03 -0800)]
Input: add CMA3000 accelerometer driver

Add support for CMA3000 Tri-axis accelerometer, which supports Motion
detect, Measurement and Free fall modes. CMA3000 supports both I2C/SPI
bus for communication, currently the driver supports I2C based
communication.

Signed-off-by: Hemanth V <hemanthv@ti.com>
Reviewed-by: Jonathan Cameron <jic23@cam.ac.uk>
Reviewed-by: Sergio Aguirre <saaguirre@ti.com>
Reviewed-by: Shubhrajyoti <Shubhrajyoti@ti.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: iforce - clean up Makefile
Dmitry Torokhov [Mon, 22 Nov 2010 20:53:23 +0000 (12:53 -0800)]
Input: iforce - clean up Makefile

Use <module>-y notation to specify list of objects comprising iforce
module and conditionally pull in USB and RS232 support.

Also remove custom compiler flags and rely on general makefile rules
for enabling warnings.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: clean up Makefile (use input-core-y)
Dmitry Torokhov [Mon, 22 Nov 2010 20:39:28 +0000 (12:39 -0800)]
Input: clean up Makefile (use input-core-y)

The proper way to specify multi-source object is to use <name>-y instead
of <name>-obj (which is deprecated) as it allows conditional inclusion
of modules in the list.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: usbtouchscreen - add support for LG Flatron T1710B
Glenn Sommer [Mon, 22 Nov 2010 20:00:05 +0000 (12:00 -0800)]
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>
13 years agoInput: ct82c710 - remove a redundant serio_register_port()
Axel Lin [Mon, 22 Nov 2010 06:27:13 +0000 (22:27 -0800)]
Input: ct82c710 - remove a redundant serio_register_port()

We already call serio_register_port() in ct82c710_probe(),
thus remove a redundant serio_register_port() in ct82c710_init().

Looks like this bug is introduced by
916d83cfe5da1cda454d8b0ae233f06b58bd7f91
"Input: ct82c710 - convert to the new platform device interface"

[dtor@mail.ru: also move printk to where we register port]
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: ams_delta_serio - fix wrong kfree in ams_delta_serio_exit
Axel Lin [Mon, 22 Nov 2010 06:27:09 +0000 (22:27 -0800)]
Input: ams_delta_serio - fix wrong kfree in ams_delta_serio_exit

serio_unregister_port() will call put_device() to free the memory.
Thus remove kfree(ams_delta_serio) after
serio_unregister_port(ams_delta_serio).

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: ps2mult - fix wrong kfree in ps2mult_connect error path
Axel Lin [Mon, 22 Nov 2010 06:23:06 +0000 (22:23 -0800)]
Input: ps2mult - fix wrong kfree in ps2mult_connect error path

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: serio HIL MLC - don't deref null, don't leak and return proper error
Jesper Juhl [Sat, 20 Nov 2010 21:36:49 +0000 (13:36 -0800)]
Input: serio HIL MLC - don't deref null, don't leak and return proper error

While reviewing various users of kernel memory allocation functions I came
across drivers/input/serio/hil_mlc.c::hil_mlc_register() and noticed that:

 - it calls kzalloc() but fails to check for a NULL return before use.
 - it makes several allocations and if one fails it doesn't free the
   previous ones.
 - It doesn't return -ENOMEM in the failed memory allocation case (it just
   crashes).

This patch corrects all of the above and also reworks the only caller of
this function that I could find
(drivers/input/serio/hp_sdc_mlc.c::hp_sdc_mlc_out()) so that it now checks
the return value of hil_mlc_register() and properly propagates it on
failure and I also restructured the code to remove some labels and goto's
to make it, IMHO nicer to read.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Tested-by: Helge Deller <deller@gmx.de>
Acked-by: Helge Deller <deller@gmx.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: add support for keyboards on ST SPEAr platform
Rajeev Kumar [Fri, 19 Nov 2010 20:41:19 +0000 (12:41 -0800)]
Input: add support for keyboards on ST SPEAr platform

Signed-off-by: Rajeev Kumar <rajeev-dlh.kumar@st.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: fix typo in keycode validation supporting large scancodes
Mattia Dongili [Thu, 18 Nov 2010 17:06:43 +0000 (09:06 -0800)]
Input: fix typo in keycode validation supporting large scancodes

Check the input_keymap_entry keycode size (u32) instead of the device's
(void*) when validating that keycode value can be stored in the keymap.

Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=22722

Signed-off-by: Mattia Dongili <malattia@linux.it>
Tested-by: Norbert Preining <preining@logic.at>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: gameport - convert to use common workqueue instead of a thread
Dmitry Torokhov [Mon, 15 Nov 2010 09:39:57 +0000 (01:39 -0800)]
Input: gameport - convert to use common workqueue instead of a thread

Instead of creating an exclusive thread to handle gameport events (which
happen rarely), let's switch to common workqueue. With the arrival
of concurrency-managed workqueue infrastructure we are not concerned
that our callers or callees also using workqueue (no deadlocks anymore)
and it should reduce total number of threads in the system.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: serio - convert to common workqueue instead of a thread
Dmitry Torokhov [Mon, 15 Nov 2010 09:39:57 +0000 (01:39 -0800)]
Input: serio - convert to common workqueue instead of a thread

Instead of creating an exclusive thread to handle serio events (which
happen rarely), let's switch to using common workqueue. With the arrival
of concurrency-managed workqueue infrastructure we are not concerned
that our callers or callees also using workqueue (no deadlocks anymore)
and it should reduce total number of threads in the system.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: qt602240_ts - fix wrong sizeof in object table allocation
Chris Leech [Thu, 18 Nov 2010 07:59:54 +0000 (23:59 -0800)]
Input: qt602240_ts - fix wrong sizeof in object table allocation

The kcalloc call for the object table is using sizeof(struct qt602240_data)
when it should be using sizeof(struct qt6602240_object), resulting in a larger
allocation than is required.

Signed-off-by: Chris Leech <christopher.leech@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: qt602240_ts - convert to using dev_pm_ops
Dmitry Torokhov [Thu, 18 Nov 2010 08:14:03 +0000 (00:14 -0800)]
Input: qt602240_ts - convert to using dev_pm_ops

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: xpad - ensure xpad->bulk_out is initialized before submitting urb
Axel Lin [Thu, 18 Nov 2010 07:59:34 +0000 (23:59 -0800)]
Input: xpad - ensure xpad->bulk_out is initialized before submitting urb

As pointed out by Oliver Neukum:
xpad->irq_in is currently submitted before xpad->bulk_out is allocated.
That however is a race, because the callback for irq_in can call
xpad360w_process_packet(), which will in turn submit the bulk URB.

This patch moves initialization for xpad->bulk_out earlier, so we can
ensure xpad->bulk_out is initialized before submitting urb.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: aiptek - tighten up permissions on sysfs attributes
Dmitry Torokhov [Mon, 15 Nov 2010 21:33:25 +0000 (13:33 -0800)]
Input: aiptek - tighten up permissions on sysfs attributes

Sysfs attributes affecting device behavior should not be, by default,
world-writeable. If distributions want to allow console users access
these attributes they need to employ udev and friends to adjust
permissions as needed.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: hgpk - fix powersave mode
Paul Fox [Mon, 15 Nov 2010 09:33:24 +0000 (01:33 -0800)]
Input: hgpk - fix powersave mode

Recent testing of this codepath showed that it wasn't working,
perhaps due to changes within the input layer. This fixes it.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: hgpk - recalibration tweaks
Daniel Drake [Mon, 15 Nov 2010 09:33:22 +0000 (01:33 -0800)]
Input: hgpk - recalibration tweaks

Disable the recalibration guard where new recalibrations are triggered
if we detect a packet too soon after calibrating - we found that this
results in erroneous recalibrations, and if the recalibration failed
then the rest of our badness-detection code will request another.

Add a module option disabling all of the recalibration code, in case
an OLPC deployment thinks all of the workarounds we have are doing
more damage than good and wants to experiment with them all disabled.

Based on work by Paul Fox.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: hgpk - detect simple mode overflows
Daniel Drake [Mon, 15 Nov 2010 09:28:54 +0000 (01:28 -0800)]
Input: hgpk - detect simple mode overflows

Based on work by Paul Fox.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoInput: sysrq - pass along lone Alt + SysRq
Dmitry Torokhov [Mon, 15 Nov 2010 08:23:42 +0000 (00:23 -0800)]
Input: sysrq - pass along lone Alt + SysRq

When user presses and releases Alt + SysRq without pressing any of the
hot keys re-inject the combination and pass it on to userspace instead
of suppressing it - maybe he or she wanted to take print screen
instead of invoking SysRq handler.

Also pass along release events for keys that have been pressed before
SysRq mode has been invoked so that keys do not appear to be "stuck".

Acked-by: Jason Wessel <jason.wessel@windriver.com>
Tested-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>