Commit graph

2563 commits

Author SHA1 Message Date
Dmitry Torokhov a66413fbc3 Input: synaptics - set minimum coordinates as reported by firmware
Newer Synaptics firmware allows to query minimum coordinates reported by
the device, let's use this data.

Acked-by: Chase Douglas <chase.douglas@canonical.com>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-09 12:33:35 -07:00
Peter Ujfalusi 625cbe46bc input: twl6040-vibra: Do not use wrapper for irq request
The twl6040_request_irq/free_irq inline functions are going
to be removed, so replace them with direct calls.
The irq number is provided by the core driver via resource.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-07 14:23:21 +03:00
Daniel Kurtz 28d5fd860f Input: synaptics - process button bits in AGM packets
AGM packets contain valid button bits, too.
This patch refactors packet processing to parse button bits in AGM packets.
However, they aren't actually used or reported.

The point is to more completely process AGM packets,
and prepare for future patches that may actually use AGM packet button bits.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06 23:01:17 -07:00
Daniel Kurtz bea9f0ff26 Input: synaptics - rename set_slot to be more descriptive
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06 23:01:13 -07:00
Daniel Kurtz a9f0b79edf Input: synaptics - fuzz position for touchpad with reduced filtering
Synaptics touchpads indicate via a capability bit when they perform reduced
filtering on position data. In such a case, use a non-zero fuzz value.
Fuzz = 8 was chosen empirically by observing the raw position data
reported by a clickpad indicating it had reduced filtering.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06 23:01:09 -07:00
Daniel Kurtz 8be3c650f5 Input: synaptics - set resolution for MT_POSITION_X/Y axes
Set resolution for MT_POSITION_X and MT_POSITION_Y to match ABS_X and
ABS_Y, respectively.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06 23:01:00 -07:00
Ping Cheng 8446001450 Input: wacom - cleanup a return value for the old Bamboo
The old code may call input_sync() without sending any other events.
While it will be suppressed by the input core not calling it at all
is still cheaper.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06 21:24:35 -07:00
Ping Cheng 0bd10ef8f8 Input: wacom - update Graphire4 and old Bamboo tablet buttons
Bamboo touch sets BTN_BACK, BTN_FORWARD, BTN_LEFT, and BTN_RIGHT
as the default button events for tablet buttons. Change Graphire4
and old Bamboo to the same settings.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06 21:24:25 -07:00
Ping Cheng 998c454e1c Input: wacom - add serial number for Graphire4 and old Bamboo
With the removal of BTN_TOOL_FINGER for tablet buttons and
expresskeys, serial number is needed to distingush if the
events were from a regular tool (stylus, eraser, or mouse)
or the attribures (buttons, strips, or wheels) on the tablet
since there are overlapped events between the tools and the
tablet attributes.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06 21:24:15 -07:00
Ping Cheng 358ea22ee3 Input: wacom - remove BTN_TOOL_FINGER for pad
BTN_TOOL_FINGER was designed to indicate a single finger touch.
Remove the lines that borrowed this type for expresskeys and
tablet buttons.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06 21:24:06 -07:00
Chris Hudson e8e70d8391 Input: add support for Kionix KXTJ9 accelerometer
Signed-off-by: Chris Hudson <chudson@kionix.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06 21:23:54 -07:00
Samuel Ortiz 63ef1124f1 input: pmic8xxx-pwrkey: Do not use mfd_get_data()
mfd_get_data() has been removed from the MFD API.

Cc: Anirudh Ghayal <aghayal@codeaurora.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-07-05 10:38:43 +02:00
Samuel Ortiz 1d08382a0e input: pmic8xxx-keypad: Do not use mfd_get_data()
mfd_get_data() has been removed from the MFD API.

Cc: Anirudh Ghayal <aghayal@codeaurora.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-07-05 10:38:43 +02:00
Wolfram Sang 77da38387e Input: wm97xx - mark channels which need pen_down
Currently, battery drivers also use poll_sample() provided by the
wm97xx-core but this code always checks if the pen is down. Mark the
channels which really need this (i.e. for the touchscreen) with the
PEN_DOWN bit, and skip the checks otherwise. Now, the battery channels
can always be read.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-04 19:31:47 -07:00
Wolfram Sang c8f205258b Input: wm97xx - refactor channel selection in poll_sample()
The current implementation of poll_sample() has the problem that one of
its arguments, the channel to be selected, differs from wm9713 to other
variants. This parameter gets passed to the (currently unused)
mach-specific functions pre_sample() and post_sample() which thus have
to deal with codec-specific differences. Refactor the routine so that
the argument to poll_sample() is generic for all codecs and do necessary
conversions only in the codec-specific driver. The outcome even uses
less code and removes the non-standard use of the PEN_DOWN bit to mark
the AUX-channels.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-04 19:31:38 -07:00
Wolfram Sang 2456689b3b Input: wm97xx - remove redundant define
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-04 19:31:28 -07:00
Stefano Stabellini 5f098ecd42 Input: xen-kbdfront - enable driver for HVM guests
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-04 19:31:19 -07:00
Chris Moeller b514d4f7c6 Input: xpad - enable rumble support for XBox360 Wireless Controllers
This patch implements rumble support for XBox360 Wireless Controllers.

Signed-off-by: Chris Moeller <kode54@gmail.c>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-04 19:31:06 -07:00
Misael Lopez Cruz cc697d3839 input: Add initial support for TWL6040 vibrator
Add twl6040_vibra as a child of MFD device twl6040_codec. This
implementation covers the PCM-to-PWM mode of TWL6040 vibrator
module.

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
CC: Tejun Heo <tj@kernel.org>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-04 19:36:18 +03:00
Peter Ujfalusi 4ae6df5e10 MFD: twl4030-audio: Rename platform data
Allign the platform data names for twl4030 audio submodule:
twl4030_audio_data: for the core MFD driver
twl4030_codec_data: for ASoC codec driver
twl4030_vibra_data: for the input/ForceFeedback driver

To avoid breakage, change all depending drivers, files
to use the new types.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-07-04 18:44:02 +03:00
Peter Ujfalusi 57fe7251f5 MFD: twl4030-codec -> twl4030-audio: Rename the driver
Rename the driver, and header file from twl4030-codec to
twl4030-audio.
To avoid breakage change depending drivers at the same time.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
CC: Misael Lopez Cruz <misael.lopez@ti.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-07-04 18:43:56 +03:00
Dmitry Torokhov cca8edfd2e Input: sh_keysc - fix compile warning
The "#if" above should really be an "#ifdef" to avoid this warning:

  CC      drivers/input/keyboard/sh_keysc.o
drivers/input/keyboard/sh_keysc.c:294:5: warning: "CONFIG_PM_SLEEP" is
not defined

Reported-by: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-04 07:12:26 -07:00
Iiro Valkonen a93d4f2d02 Input: atmel_mxt_ts - handle objects with multiple instances correctly
Handle the objects with multiple instances correctly when the configuration
data is loaded.

Signed-off-by: Iiro Valkonen <iiro.valkonen@atmel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-04 03:19:20 -07:00
Iiro Valkonen 81c88a711a Input: atmel_mxt_ts - update object list
Update the object list to include new objects, and add unique identifiers
so we can distinguish between old & new generation of the same object.

Signed-off-by: Iiro Valkonen <iiro.valkonen@atmel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-04 03:19:11 -07:00
Jiejing Zhang c7b4a5d58b Input: mpr121 - improve sensibility of touch key
The Quick Charge bit in Electrode conf register should be set in init
function. This bit was missed in chip's document, which may cause touch
controller charge too slow to generate an interrupt.

Also, adjust the default vlaue of touch and release threshold
to make touch key more sensitive, this fix touch may not sensitive
after setup with plastic case.

Signed-off-by: Jiejing Zhang <jiejing.zhang@freescale.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-29 01:32:49 -07:00
Joseph Lai 631b16e81e Input: add a driver to support InvenSense mpu3050 gyroscope chip
This driver is registered as an input device. An IRQ is required in this
basic driver configuration.

Signed-off-by: Joseph Lai <joseph_lai@wistron.com>
[Cleaned up PM_RUNTIME defines]
Signed-off-by: Alan Cox <alan@linux.intel.com>
[dtor@mail.ru: consolidated PM methods, some code rearrangement]
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-29 00:26:17 -07:00
Hans-Christian Egtvedt 7c40952295 Input: update author email for gpio_mouse, at32psif, and atmel-wm97xx
This patch updates the email address of the gpio_mouse, at32psif, and
atmel-wm97xx drivers supported by me to an email account I will use on a more
regular basis in the future.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-29 00:26:02 -07:00
Axel Lin 1638207910 Input: gpio_keys - fix a memory leak
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-29 00:22:47 -07:00
Igor Grinberg 58c244009e Input: ads7846 - cleanup GPIO initialization
Use gpio_request_one() instead of multiple gpiolib calls.
This also simplifies error handling a bit.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-27 13:08:05 -07:00
Ping Cheng 11d0cf8859 Input: wacom - add 3 new models - 6A, 6B, and 97
Tested-by: Alex Tervoort <alex.tervoort@gmail.com> for 6A
Signed-off-by: David Foley <favux.is@gmail.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-27 13:07:55 -07:00
Ping Cheng a001a8f3ce Input: wacom - Wacom Bamboo Pen D4 has 1024 pressure levels
D4 has 1024, not 512, pressure levels.

Reported-by: David Foley <favux.is@gmail.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-27 13:07:45 -07:00
David Jander b23302052d Input: gpio_keys - move to late_initcall
Initialize gpio_keys driver at late_initcall level, to give it a chance to
work with GPIO expanders that might not be ready yet if we initialize the
driver at module_init time.

This is strictly a band-aid until there is a better way to specify
inter-device dependencies.

Signed-off-by: David Jander <david@protonic.nl>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-27 12:44:05 -07:00
Axel Lin 6a592a7f45 Input: tnetv107x-ts - fix MODULE_ALIAS
Remove the space between "platform:" prefix and the driver name.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-27 12:43:34 -07:00
Axel Lin 51a3db41e1 Input: tnetv107x-keypad - fix MODULE_ALIAS
Remove the space between "platform:" prefix and the driver name.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-27 12:43:23 -07:00
Jesper Juhl 5993548725 Input: remove unneeded version.h includes
It was pointed out by 'make versioncheck' that some includes of
linux/version.h are not needed in drivers/input/.
This patch removes them.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-27 12:42:54 -07:00
Justin P. Mattock 83ae417b85 Input: libps2.c: fix comment typo arrrives.
Fix a typo in a comment.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-06-27 12:28:56 +02:00
Eric Miao 3ead8b5ddb Input: add support for mma8450 accelerometer
Signed-off-by: Sammy He <r62914@freescale.com>
Signed-off-by: Eric Miao <eric.miao@linaro.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-22 01:27:25 -07:00
Aristeu Rozanski 1483f5513b Input: wacom - use only one interface with DTU-2231
The Wacom DTU-2231 tablet has two interfaces on its default configuration
and both have HID class, leading to the creation of two input devices
instead of one. Only the first one is used, so filter out the second.

Signed-off-by: Aristeu Rozanski <aris@redhat.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-22 01:26:09 -07:00
Ping Cheng 71c86ce597 Input: wacom - Cintiq 21UX2 does not have menu strips
So don't set ABS_RX/ABS_RY for them.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-22 01:25:59 -07:00
Magnus Hörlin fabadbc754 Input: xpad - add support for two more dance pads and a guitar
Signed-off-by: Magnus Hörlin <magnus@alefors.se>
Reviewed-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-21 14:41:09 -07:00
David Jander 7e2ecdf438 Input: gpio_keys - switch to using threaded IRQs
Use a threaded interrupt handler in order to permit the handler to use
a GPIO driver that causes things like I2C transactions being done inside
the handler context.

Signed-off-by: David Jander <david@protonic.nl>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-21 14:33:34 -07:00
Leigh Brown eaa499aebf Input: lm8323 - use oneshot level triggered interrupts
According to the data sheet the interrupt should be level rather than
edge triggered.  This fixes the issue of the Nokia N810 keypad stopping
responding if multiple key events occur in quick succession.

Signed-off-by: Leigh Brown <leigh@solinno.co.uk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-21 05:08:40 -07:00
Felipe Balbi 61cf3813d3 Input: lm8323 - convert to threaded IRQ
There's no need for that workqueue anymore. Get rid of it and move to
threaded IRQs instead.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Tested-by: Leigh Brown <leigh@solinno.co.uk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-21 05:08:30 -07:00
Wolfram Sang fef95faeae Input: qt1070 - remove obsolete cleanup for clientdata
A few new i2c-drivers came into the kernel which clear the clientdata
pointer on exit or error. This is not required anymore since the core
will do it for us.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-21 04:31:53 -07:00
Linus Torvalds c01ad40819 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: sh_keysc - 8x8 MODE_6 fix
  Input: omap-keypad - add missing input_sync()
  Input: evdev - try to wake up readers only if we have full packet
  Input: properly assign return value of clamp() macro.
2011-06-20 08:59:46 -07:00
Magnus Damm cca23d0b53 Input: sh_keysc - 8x8 MODE_6 fix
According to the data sheet for G4, AP4 and AG5 KEYSC MODE_6 is 8x8 keys.
Bump up MAXKEYS to 64 too.

Signed-off-by: Magnus Damm <damm@opensource.se>
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-18 02:55:01 -07:00
Janusz Krzysztofik b27af563be Input: omap-keypad - add missing input_sync()
Otherwise the updated evdev driver (commit cdda911c34,
"Input: evdev - only signal polls on full packets") no longer works on
top of omap-keypad.

Tested on Amstrad Delta.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-18 02:54:42 -07:00
Dmitry Torokhov da40b0b6b4 Input: evdev - try to wake up readers only if we have full packet
We should only wake waiters on the event device when we actually post
an EV_SYN/SYN_REPORT to the queue. Otherwise we end up making waiting
threads runnable only to go right back to sleep because the device
still isn't readable.

Reported-by: Jeffrey Brown <jeffbrown@android.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-18 02:54:02 -07:00
Joe Perches 28f65c11f2 treewide: Convert uses of struct resource to resource_size(ptr)
Several fixes as well where the +1 was missing.

Done via coccinelle scripts like:

@@
struct resource *ptr;
@@

- ptr->end - ptr->start + 1
+ resource_size(ptr)

and some grep and typing.

Mostly uncompiled, no cross-compilers.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-06-10 14:55:36 +02:00
Ralf Baechle 16ba9b0612 i8253: Make pcspkr input driver use the shared i8253_lock
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
Link: http://lkml.kernel.org/r/20110601180610.453577265@duck.linux-mips.net
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-06-09 15:01:38 +02:00
Ralf Baechle 334955ef96 i8253: Create linux/i8253.h and use it in all 8253 related files
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Link: http://lkml.kernel.org/r/20110601180610.054254048@duck.linux-mips.net
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

 arch/arm/mach-footbridge/isa-timer.c |    2 +-
 arch/mips/cobalt/time.c              |    2 +-
 arch/mips/jazz/irq.c                 |    2 +-
 arch/mips/kernel/i8253.c             |    2 +-
 arch/mips/mti-malta/malta-time.c     |    2 +-
 arch/mips/sgi-ip22/ip22-time.c       |    2 +-
 arch/mips/sni/time.c                 |    2 +-
 arch/x86/kernel/apic/apic.c          |    2 +-
 arch/x86/kernel/apm_32.c             |    2 +-
 arch/x86/kernel/hpet.c               |    2 +-
 arch/x86/kernel/i8253.c              |    2 +-
 arch/x86/kernel/time.c               |    2 +-
 drivers/block/hd.c                   |    2 +-
 drivers/clocksource/i8253.c          |    2 +-
 drivers/input/gameport/gameport.c    |    2 +-
 drivers/input/joystick/analog.c      |    2 +-
 drivers/input/misc/pcspkr.c          |    2 +-
 include/linux/i8253.h                |   11 +++++++++++
 sound/drivers/pcsp/pcsp.h            |    2 +-
 19 files changed, 29 insertions(+), 18 deletions(-)
2011-06-09 15:01:37 +02:00
Linus Torvalds 55db4c64ed Revert "tty: make receive_buf() return the amout of bytes received"
This reverts commit b1c43f82c5.

It was broken in so many ways, and results in random odd pty issues.

It re-introduced the buggy schedule_work() in flush_to_ldisc() that can
cause endless work-loops (see commit a5660b41af: "tty: fix endless
work loop when the buffer fills up").

It also used an "unsigned int" return value fo the ->receive_buf()
function, but then made multiple functions return a negative error code,
and didn't actually check for the error in the caller.

And it didn't actually work at all.  BenH bisected down odd tty behavior
to it:
  "It looks like the patch is causing some major malfunctions of the X
   server for me, possibly related to PTYs.  For example, cat'ing a
   large file in a gnome terminal hangs the kernel for -minutes- in a
   loop of what looks like flush_to_ldisc/workqueue code, (some ftrace
   data in the quoted bits further down).

   ...

   Some more data: It -looks- like what happens is that the
   flush_to_ldisc work queue entry constantly re-queues itself (because
   the PTY is full ?) and the workqueue thread will basically loop
   forver calling it without ever scheduling, thus starving the consumer
   process that could have emptied the PTY."

which is pretty much exactly the problem we fixed in a5660b41af.

Milton Miller pointed out the 'unsigned int' issue.

Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reported-by: Milton Miller <miltonm@bga.com>
Cc: Stefan Bigler <stefan.bigler@keymile.com>
Cc: Toby Gray <toby.gray@realvnc.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-06-04 06:33:24 +09:00
Trilok Soni 92d57a73e4 input: Add support for Qualcomm PMIC8XXX power key
Add support for PMIC8XXX power key driven over dedicated
KYPD_PWR_N pin.

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-05-26 19:45:54 +02:00
Trilok Soni 39325b59d8 input: Add Qualcomm pm8xxx keypad controller driver
Add Qualcomm PMIC8XXX based keypad controller driver
supporting upto 18x8 matrix configuration.

Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-05-26 19:45:53 +02:00
Samuel Ortiz a4579ad2bb mfd: Use mfd cell platform_data for twl4030 codec cells platform bits
With the addition of a platform device mfd_cell pointer, MFD drivers
can go back to passing platform data back to their sub drivers.
This allows for an mfd_cell->mfd_data removal and thus keep the
sub drivers MFD agnostic. This is mostly needed for non MFD aware
sub drivers.

Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-05-26 19:45:09 +02:00
Linus Torvalds 0798b1dbfb Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
* git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: (26 commits)
  arch/tile: prefer "tilepro" as the name of the 32-bit architecture
  compat: include aio_abi.h for aio_context_t
  arch/tile: cleanups for tilegx compat mode
  arch/tile: allocate PCI IRQs later in boot
  arch/tile: support signal "exception-trace" hook
  arch/tile: use better definitions of xchg() and cmpxchg()
  include/linux/compat.h: coding-style fixes
  tile: add an RTC driver for the Tilera hypervisor
  arch/tile: finish enabling support for TILE-Gx 64-bit chip
  compat: fixes to allow working with tile arch
  arch/tile: update defconfig file to something more useful
  tile: do_hardwall_trap: do not play with task->sighand
  tile: replace mm->cpu_vm_mask with mm_cpumask()
  tile,mn10300: add device parameter to dma_cache_sync()
  audit: support the "standard" <asm-generic/unistd.h>
  arch/tile: clarify flush_buffer()/finv_buffer() function names
  arch/tile: kernel-related cleanups from removing static page size
  arch/tile: various header improvements for building drivers
  arch/tile: disable GX prefetcher during cache flush
  arch/tile: tolerate disabling CONFIG_BLK_DEV_INITRD
  ...
2011-05-25 15:35:32 -07:00
Hans Petter Selasky 8c127f0717 Input: properly assign return value of clamp() macro.
[dtor@mail.ru: added mousedev changes]
Signed-off-by: Hans Petter Selasky <hselasky@c2i.net>
Cc: stable@kernel.org
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-25 09:24:58 -07:00
Linus Torvalds 4637f40f20 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: (40 commits)
  Input: ADP5589 - new driver for I2C Keypad Decoder and I/O Expander
  Input: tsc2007 - add X, Y and Z fuzz factors to platform data
  Input: tsc2007 - add poll_period parameter to platform data
  Input: tsc2007 - add poll_delay parameter to platform data
  Input: tsc2007 - add max_rt parameter to platform data
  Input: tsc2007 - debounce pressure measurement
  Input: ad714x - fix captouch wheel option algorithm
  Input: ad714x - allow platform code to specify irqflags
  Input: ad714x - fix threshold and completion interrupt masks
  Input: ad714x - fix up input configuration
  Input: elantech - remove support for proprietary X driver
  Input: elantech - report multitouch with proper ABS_MT messages
  Input: elantech - export pressure and width when supported
  Input: elantech - describe further the protocol
  Input: atmel_tsadcc - correct call to input_free_device
  Input: add driver FSL MPR121 capacitive touch sensor
  Input: remove useless synchronize_rcu() calls
  Input: ads7846 - fix gpio_pendown configuration
  Input: ads7846 - add possibility to use external vref on ads7846
  Input: rotary-encoder - add support for half-period encoders
  ...
2011-05-24 11:58:49 -07:00
Dmitry Torokhov b73077eb03 Merge branch 'next' into for-linus 2011-05-24 00:06:26 -07:00
Linus Torvalds 99dff58562 Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
* 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (48 commits)
  serial: 8250_pci: add support for Cronyx Omega PCI multiserial board.
  tty/serial: Fix break handling for PORT_TEGRA
  tty/serial: Add explicit PORT_TEGRA type
  n_tracerouter and n_tracesink ldisc additions.
  Intel PTI implementaiton of MIPI 1149.7.
  Kernel documentation for the PTI feature.
  export kernel call get_task_comm().
  tty: Remove to support serial for S5P6442
  pch_phub: Support new device ML7223
  8250_pci: Add support for the Digi/IBM PCIe 2-port Adapter
  ASoC: Update cx20442 for TTY API change
  pch_uart: Support new device ML7223 IOH
  parport: Use request_muxed_region for IT87 probe and lock
  tty/serial: add support for Xilinx PS UART
  n_gsm: Use print_hex_dump_bytes
  drivers/tty/moxa.c: Put correct tty value
  TTY: tty_io, annotate locking functions
  TTY: serial_core, remove superfluous set_task_state
  TTY: serial_core, remove invalid test
  Char: moxa, fix locking in moxa_write
  ...

Fix up trivial conflicts in drivers/bluetooth/hci_ldisc.c and
drivers/tty/serial/Makefile.

I did the hci_ldisc thing as an evil merge, cleaning things up.
2011-05-23 12:23:20 -07:00
Geert Uytterhoeven 659e6ed55f input/atari: Fix mouse movement and button mapping
Up and down movements were reversed, left and right buttons were swapped.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-05-19 18:19:12 +02:00
Michael Schmitz 186f200a95 input/atari: Fix atarimouse init
Atarimouse fails to load as a module (with ENODEV), due to a brown paper
bag bug, misinterpreting the semantics of atari_keyb_init().

[geert] Propagate the return value of atari_keyb_init() everywhere

Signed-off-by: Michael Schmitz <schmitz@debian.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-05-19 18:19:11 +02:00
Michael Schmitz 7786908c3c input/atari: Use the correct mouse interrupt hook
The Atari keyboard driver calls atari_mouse_interrupt_hook if it's set, not
atari_input_mouse_interrupt_hook. Fix below.

[geert] Killed off atari_mouse_interrupt_hook completely, after fixing another
incorrect assignment in atarimouse.c.

Signed-off-by: Michael Schmitz <schmitz@debian.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-05-19 18:19:11 +02:00
Michael Hennerich 9d2e173644 Input: ADP5589 - new driver for I2C Keypad Decoder and I/O Expander
From http://www.analog.com/ADP5589:
The ADP5589 is an I/O port expander and keypad matrix decoder designed
for QWERTY type phones that require a large keypad matrix and expanded
I/O lines.

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>
2011-05-19 00:59:55 -07:00
Thierry Reding 891e376b1e Input: tsc2007 - add X, Y and Z fuzz factors to platform data
These new platform-specific values can be used to set the fuzz parameter
passed to the input_set_abs_params() function for the ABS_X, ABS_Y and
ABS_PRESSURE axes.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-17 09:38:53 -07:00
Thierry Reding 1af38eac8c Input: tsc2007 - add poll_period parameter to platform data
This new parameter allows the polling frequency to be configured while
keeping the default of once every millisecond.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-17 09:38:49 -07:00
Thierry Reding 2d137c7ed2 Input: tsc2007 - add poll_delay parameter to platform data
Depending on the quality of the touch panel, the time for the X-, X+, Y-
and Y+ inputs to settle may vary. The poll_delay parameter can be used
to override the default of 1 millisecond.

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Kwangwoo Lee <kwangwoo.lee@gmail.com>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-17 09:38:43 -07:00
Thierry Reding 84005eb5ea Input: tsc2007 - add max_rt parameter to platform data
Finger touch events or very quick stylus events on low-quality panels
can cause the tsc2007 to read bogus values. Looking at oscilloscope
snapshots, this seems to be caused by the touch event disappearing
during the measurements. These bogus values result in misclicks, where
the X and Y values deviate from the real position.

Most of these misclicks can be filtered out by setting a low enough
threshold for the maximum resistance (which is loosely the inverse of
the pressure) allowed to consider a set of values valid. Since this
behaviour is largely dependent on the type and quality of the panel,
this commit introduces the max_rt parameter. The default value is kept
at MAX_12BIT.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-17 09:38:39 -07:00
Thierry Reding 4a1a42af0a Input: tsc2007 - debounce pressure measurement
When the controller signals a pen-down event via the platform-specific
GPIO, while the sample values indicate an invalid measurement, the
measurement needs to be repeated.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-17 09:38:34 -07:00
Michael Hennerich f1e430e636 Input: ad714x - fix captouch wheel option algorithm
As reported by Jean-Francois Dagenais, the wheel algorithm caused a
divide by zero exception due to missing variable pre-initialization.
In fact it turned out that the whole algorithm had several problems.
It is therefore replaced with something that is known working.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Tested-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-16 23:20:17 -07:00
Michael Hennerich 3532cb0ca2 Input: ad714x - allow platform code to specify irqflags
Add option to specify irqflags in platfrom data.
Also update copyright notice.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Tested-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-16 23:20:13 -07:00
Michael Hennerich e223cc7e96 Input: ad714x - fix threshold and completion interrupt masks
Fix two issues in the threshold and completion interrupt mask and unmask
functions. According to the AD714x datasheets the highest stage completion
interrupt should be enabled. Fix mask computation.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Tested-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-16 23:20:09 -07:00
Michael Hennerich dc5f4f5e9a Input: ad714x - fix up input configuration
Add missing input name and set up parent devices so input devices will
show in proper places in sysfs tree.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Tested-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-16 23:20:04 -07:00
Éric Piel 9cb6cfae4e Input: elantech - remove support for proprietary X driver
Apparently somewhere someone had a proprietary X driver. To get the
multitouch info, it uses some hack on the normal API instead of using
the multitouch protocol. Now that the multitouch info is transmitted
correctly it makes not much sense to keep it. Especially because it's
impossible to find this proprietary X driver anywhere, so the number of
users must be very low.

Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-16 22:48:43 -07:00
Éric Piel 89eec4d71e Input: elantech - report multitouch with proper ABS_MT messages
Multitouch info was reported only via a old protocol used by the
proprietary X driver from elantech. Let's report the multitouch info
also following the official MT protocol. It's semi-mt because the device
only reports the lowest/highest coordinates.

This was done following the multi-touch-protocol.txt documentation, and
inspired by the bcm5974 and elantech implementations. Testing was light
as there is not many applications using this protocol yet, but the X
synaptics driver didn't complain and the X multitouch driver behaved
correctly.

Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-16 22:48:39 -07:00
Éric Piel f941c705f6 Input: elantech - export pressure and width when supported
Using the info of the Dell/Ubuntu driver, described in the protocol
document, report both width and pressure when pressing 1 and 3
fingers, for the versions of the touchpad which support it.

Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-16 22:48:36 -07:00
Julia Lawall 215ef98677 Input: atmel_tsadcc - correct call to input_free_device
This error handling code can be reached before ts_dev->input is
initialized, so it is safer to always use the original name,
input_dev.

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-14 23:42:41 -07:00
Chris Metcalf 18aecc2b64 arch/tile: finish enabling support for TILE-Gx 64-bit chip
This support was partially present in the existing code (look for
"__tilegx__" ifdefs) but with this change you can build a working
kernel using the TILE-Gx toolchain and ARCH=tilegx.

Most of these files are new, generally adding a foo_64.c file
where previously there was just a foo_32.c file.

The ARCH=tilegx directive redirects to arch/tile, not arch/tilegx,
using the existing SRCARCH mechanism in the top-level Makefile.

Changes to existing files:

- <asm/bitops.h> and <asm/bitops_32.h> changed to factor the
  include of <asm-generic/bitops/non-atomic.h> in the common header.

- <asm/compat.h> and arch/tile/kernel/compat.c changed to remove
  the "const" markers I had put on compat_sys_execve() when trying
  to match some recent similar changes to the non-compat execve.
  It turns out the compat version wasn't "upgraded" to use const.

- <asm/opcode-tile_64.h> and <asm/opcode_constants_64.h> were
  previously included accidentally, with the 32-bit contents.  Now
  they have the proper 64-bit contents.

Finally, I had to hack the existing hacky drivers/input/input-compat.h
to add yet another "#ifdef" for INPUT_COMPAT_TEST (same as x86_64).

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> [drivers/input]
2011-05-12 15:52:12 -04:00
Linus Torvalds 49f019c188 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: ads7846 - remove unused variable from struct ads7845_ser_req
  Input: ads7846 - make transfer buffers DMA safe
2011-05-12 10:41:31 -07:00
Zhang Jiejing 36682b81de Input: add driver FSL MPR121 capacitive touch sensor
This patch adds basic support for Freescale MPR121 capacitive touch
sensor.  It's an i2c controller with up to 12 capacitance sensing inputs.

Product information (data sheet, application notes) can be found here:
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MPR121

Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-12 08:28:58 -07:00
Eric Dumazet 7cbbb758d3 Input: remove useless synchronize_rcu() calls
There is no need to call synchronize_rcu() after a list insertion,
or a NULL->ptr assignment.

However, the reverse operations do need this call.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-12 08:28:57 -07:00
Igor Grinberg 1201e7e676 Input: ads7846 - fix gpio_pendown configuration
The pendown gpio was requested but not configured for input.
Configure it for input.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-12 08:28:57 -07:00
Alexander Stein ebcaaad9d5 Input: ads7846 - add possibility to use external vref on ads7846
Just set vref_mv in your platform config to use external vref. Otherwise
the internal one is used.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-12 08:28:56 -07:00
Johan Hovold e70bdd41bd Input: rotary-encoder - add support for half-period encoders
Add support for encoders that have two detents per input signal period.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Acked-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-12 08:28:47 -07:00
Johan Hovold 521a8f5cb7 Input: rotary-encoder - refactor and clean up
Refactor state retrieval and event reporting in interrupt handler.
Remove a few empty lines.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-11 16:54:57 -07:00
Rakesh Iyer baafb43537 Input: tegra-kbc - change wakeup logic to be all or nothing
Tegra hardware design cannot reliably support an arbitrary set of keys
waking up the system. Modify wakeup logic so either any key wakes the
system up or none will do.

Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-11 14:31:09 -07:00
Alexander Stein 28350e330c Input: ads7846 - remove unused variable from struct ads7845_ser_req
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-05 08:50:53 -07:00
Alexander Stein 1dbe7dada2 Input: ads7846 - make transfer buffers DMA safe
req.sample needs its own cacheline otherwise accessing req.msg fetches
it in again.

Note: This effect doesn't occur if the underlying SPI driver doesn't use
DMA at all.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-05 08:50:47 -07:00
Ville Syrjala 7388754e03 Input: ati_remote2 - return the error code from sysfs channel_mask store
If the channel_mask setup fails when configuring it through sysfs,
return the error code to the caller instead of claiming success.

Signed-off-by: Ville Syrjala <syrjala@sci.fi>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-05 08:49:38 -07:00
Dmitry Torokhov 9cc7c80b57 Input: sh_keysc - only compile PM code if PM is enabled
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-05 08:49:18 -07:00
Axel Lin 4296f1ad5a Input: h3600_ts_input - fix a leak of the IRQ during init failure
Make sure we are passing the same cookie in all calls to request_irq() and
free_irq().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-03 09:02:13 -07:00
Dmitry Torokhov 12d0cef701 Input: sh_keysc - make sh_keysc_device_driver static
This variable is not used outside of the module so we should mark it
as static.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-05-03 09:02:01 -07:00
Linus Torvalds 497ff03444 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: wm831x-ts - move BTN_TOUCH reporting to data transfer
  Input: wm831x-ts - allow IRQ flags to be specified
  Input: wm831x-ts - fix races with IRQ management
2011-05-02 20:26:32 -07:00
Magnus Damm 2dfb9a85ec Input: sh_keysc - switch to threaded IRQ handler
Update the KEYSC driver to make use of threaded IRQs with IRQF_ONESHOT
to improve interrupt latency. The driver is using udelay() in the ISR
to make sure the hardware has stabilized. Without using interrupt threads
this delay may affect the latency of the rest of the system.

Also pass dev_name() as string for /proc/interrupts.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-28 09:36:48 -07:00
Magnus Damm b6d2a3e6ff Input: sh_keysc - implement runtime PM support
Convert the KEYSC driver from MSTP bit control through a magic clock
string to making use of Runtime PM.

Also, update the system suspend/resume callbacks to drop the Runtime
PM reference in the case of wakeup disabled.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-28 09:36:43 -07:00
Dmitry Torokhov e490ebdc3c Input: input-polldev - use system-wide freezable workqueue
With introduction of concurrency-managed work queues there is rarely
a point in creating private workqueues.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-27 23:22:01 -07:00
Rakesh Iyer 34abeeb235 Input: tegra-kbc - add ghost key filter
Add ghost key filtering support for the Nvidia Tegra matrix keyboard.

Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-27 23:19:14 -07:00
Mark Brown bf283707d5 Input: wm831x-ts - move BTN_TOUCH reporting to data transfer
Don't report BTN_TOUCH until we've got data as some less robust applications
can be confused by getting a touch event by itself and it doesn't seem
unreasonable for them to expect coordinates along with a touch.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-27 23:12:22 -07:00
Mark Brown acad9853b9 Input: wm831x-ts - allow IRQ flags to be specified
This allows maximum flexibility for configuring the direct GPIO based
interrupts.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-27 23:12:16 -07:00
Mark Brown f534666815 Input: wm831x-ts - fix races with IRQ management
If the WM831x pen down and data IRQs run in parallel it is possible for the
data and pen down IRQs to deadlock themselves as one is part way through
disabling its operation while the other is part way through enabling. Fix
this by always disabling the pen down interrupt while data is active and
vice versa.  When a changeover is required we disable the IRQ that is to
be stopped then schedule work that will enable the new IRQ.

We need to handle the data flow in the data IRQ as the readback from the
device needs to be ordered correctly with the IRQ for robust operation.

This also fixes an issue when using the built in IRQs due to enable_irq()
not being valid from interrupt context on an interrupt controller with bus
operations like the built in IRQ controller - this issue may also have
affected other interrupt controllers.  We can't rely on having the data
and pen down IRQs available via GPIOs on the CPU on every system.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-27 23:12:12 -07:00
Axel Lin 5c9db64888 Input: twl4030-pwrbutton - fix a leak of the IRQ during init failure
In twl4030_pwrbutton_probe error path, free_irq() was using NULL rather than
the driver data as the data pointer so free_irq() wouldn't have matched.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-27 23:11:33 -07:00
Axel Lin 60c8ba6478 Input: omap-keypad - fix a wrong free_irq() parameter
In current implementation, free_irq() was using NULL rather than the
driver data as the data pointer so free_irq() wouldn't have matched.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-27 23:11:26 -07:00
Axel Lin 94bb530c24 Input: qt1070 - add MODULE_DEVICE_TABLE
Adding the necessary MODULE_DEVICE_TABLE() information allows the
driver to be automatically loaded by udev

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-27 23:11:13 -07:00
Jeff Brown cdda911c34 Input: evdev - only signal polls on full packets
This patch modifies evdev so that it only becomes readable when
the buffer contains an EV_SYN/SYN_REPORT event.

On SMP systems, it is possible for an evdev client blocked on poll()
to wake up and read events from the evdev ring buffer at the same
rate as they are enqueued.  This can result in high CPU usage,
particularly for MT devices, because the client ends up reading
events one at a time instead of reading complete packets.

We eliminate this problem by making the device readable only when
the buffer contains at least one complete packet.  This causes
clients to block until the entire packet is available.

Signed-off-by: Jeff Brown <jeffbrown@android.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-26 22:16:38 -07:00
Dmitry Torokhov 03351ff4d8 Merge commit 'v2.6.39-rc4' into next 2011-04-22 23:35:25 -07:00
Felipe Balbi b1c43f82c5 tty: make receive_buf() return the amout of bytes received
it makes it simpler to keep track of the amount of
bytes received and simplifies how flush_to_ldisc counts
the remaining bytes. It also fixes a bug of lost bytes
on n_tty when flushing too many bytes via the USB
serial gadget driver.

Tested-by: Stefan Bigler <stefan.bigler@keymile.com>
Tested-by: Toby Gray <toby.gray@realvnc.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-22 17:31:53 -07:00
Linus Torvalds 96fd2d57b8 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: xen-kbdfront - fix mouse getting stuck after save/restore
  Input: estimate number of events per packet
  Input: evdev - indicate buffer overrun with SYN_DROPPED
  Input: document event types and codes and their intended use
  Input: add KEY_IMAGES specifically for AL Image Browser
  Input: twl4030_keypad - fix potential NULL dereference in twl4030_kp_probe()
  Input: h3600_ts - fix error handling at connect
  Input: twl4030_keypad - avoid potential NULL-pointer dereference
2011-04-18 13:29:03 -07:00
Igor Mammedov c36b58e8a9 Input: xen-kbdfront - fix mouse getting stuck after save/restore
Mouse gets "stuck" after restore of PV guest but buttons are in working
condition.

If driver has been configured for ABS coordinates at start it will get
XENKBD_TYPE_POS events and then suddenly after restore it'll start getting
XENKBD_TYPE_MOTION events, that will be dropped later and they won't get
into user-space.

Regression was introduced by hunk 5 and 6 of
5ea5254aa0ad269cfbd2875c973ef25ab5b5e9db
("Input: xen-kbdfront - advertise either absolute or relative
coordinates").

Driver on restore should ask xen for request-abs-pointer again if it is
available. So restore parts that did it before 5ea5254.

Acked-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
[v1: Expanded the commit description]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-18 10:17:45 -07:00
Jeff Brown 80b4895aa4 Input: estimate number of events per packet
Calculate a default based on the number of ABS axes, REL axes,
and MT slots for the device during input device registration.

Signed-off-by: Jeff Brown <jeffbrown@android.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-18 10:15:43 -07:00
Jeff Brown 9fb0f14e31 Input: evdev - indicate buffer overrun with SYN_DROPPED
Add a new EV_SYN code, SYN_DROPPED, to inform the client when input
events have been dropped from the evdev input buffer due to a
buffer overrun.  The client should use this event as a hint to
reset its state or ignore all following events until the next
packet begins.

Signed-off-by: Jeff Brown <jeffbrown@android.com>
[dtor@mail.ru: Implement Henrik's suggestion and drop old events in
 case of overflow.]
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-12 23:35:24 -07:00
Joonyoung Shim 8b86c1c28f Input: atmel_mxt_ts - convert to MT protocol B
Atmel touchscreen chips can use MT protocol B because they can assign
unique id to ABS_MT_TRACKING_ID from finger id provided by hardware.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-12 23:34:21 -07:00
Iiro Valkonen 08960a070a Input: atmel_mxt_ts - make CHG line high after enabling interrupts
Make the CHG line (interrupt line) go high after the interrupts have been
enabled to make sure we don't miss the falling edge.

Signed-off-by: Iiro Valkonen <iiro.valkonen@atmel.com>
Acked-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-12 23:34:16 -07:00
Joonyoung Shim 910d805130 Input: atmel_mxt_ts - support 12bit resolution
Atmel touchscreen chip can support 12bit resolution and this patch
modifies to get maximum x and y size from platform data.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Acked-by: Iiro Valkonen <iiro.valkonen@atmel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-12 23:34:11 -07:00
Zhang Jiejing 4203306506 Input: add driver for Maxim max11801 touchscreen controller
Add MAXI max11801 resistive touchscreen controller driver. This driver
uses Auto Mode and Aperture Mode.

Support for other max1180x devices can be added to this driver as well,
as they use almost the same register addresses and codes.

You can find data sheet here:
http://www.maxim-ic.com/datasheet/index.mvp/id/5943

Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-11 23:53:51 -07:00
Alexander Stein 467112777c Input: gpio-keys - add support for setting device name
This patch allows to set a device name which helps distinguishing several
gpio-keys devices.

Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-11 23:53:19 -07:00
Alexander Stein 92a47674f5 Input: gpio_keys - add support for EV_ABS
With this patch you can setup a group of GPIOs representing a specific
position on an EV_ABS axis.

Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-11 23:53:09 -07:00
Axel Lin c68b208125 Input: twl4030_keypad - fix potential NULL dereference in twl4030_kp_probe()
We should first check whether platform data is NULL or not, before
dereferencing it to get the keymap.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-11 23:51:18 -07:00
Linus Torvalds 42933bac11 Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6
* 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6:
  Fix common misspellings
2011-04-07 11:14:49 -07:00
Christoph Fritz 908433833c Input: h3600_ts - fix error handling at connect
In case of an error in h3600ts_connect(), deconstruct in correct order
and with the right calls.

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-06 15:34:32 -07:00
Shubhrajyoti D 8f74c0661c Input: twl4030_keypad - avoid potential NULL-pointer dereference
Signed-off-by: Shubhrajyoti D <a0393217@india.ti.com>
Acked-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-06 15:32:10 -07:00
Linus Torvalds 899631c791 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: rpckbd - fix a leak of the IRQ during init failure
  Input: wacom - add support for Lenovo tablet ID (0xE6)
  Input: i8042 - downgrade selftest error message to dbg()
  Input: synaptics - fix crash in synaptics_module_init()
  Input: spear-keyboard - fix inverted condition in interrupt handler
  Input: uinput - allow for 0/0 min/max on absolute axes.
  Input: sparse-keymap - report KEY_UNKNOWN for unknown scan codes
  Input: sparse-keymap - report scancodes with key events
  Input: h3600_ts_input - fix a spelling error
  Input: wacom - report resolution for pen devices
  Input: wacom - constify wacom_features for a new missed Bamboo models
2011-04-05 12:35:29 -07:00
Axel Lin e28e1d93e9 Input: rpckbd - fix a leak of the IRQ during init failure
In rpckbd_open prror path, free_irq() was using NULL rather than the
driver data as the data pointer so free_irq() wouldn't have matched.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-02 21:47:53 -07:00
Manoj Iyer 26fcd2a761 Input: wacom - add support for Lenovo tablet ID (0xE6)
Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-31 22:41:24 -07:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Paul Bolle a2a94e7323 Input: i8042 - downgrade selftest error message to dbg()
On a "really fragile" laptop I noticed a single
    i8042.c: i8042 controller selftest failed. (0x1 != 0x55)

error in the log. But there's no reason to print this message at
KERN_ERR level each time that loop fails, especially since the message
telling about the overall selftest failure is printed at KERN_INFO level
(on X86).

Add an actual error message for non-X86 systems, where a selftest
failure is (apparently) more serious. Remove a space in an another error
message.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-31 00:12:40 -07:00
Jan Beulich 708748670c Input: synaptics - fix crash in synaptics_module_init()
'struct dmi_system_id' arrays must always have a terminator to keep
dmi_check_system() from looking at data (and possibly crashing) it
isn't supposed to look at.

The issue went unnoticed until ef8313bb1a,
but was introduced about a year earlier with
7705d548cb (which also similarly changed
lifebook.c, but the problem there got eliminated shortly afterwards).

The first hunk therefore is a stable candidate back to 2.6.33, while
the full change is needed only on 2.6.38.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: stable@kernel.org
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-31 00:04:52 -07:00
Rajeev Kumar 799a2a215e Input: spear-keyboard - fix inverted condition in interrupt handler
We should return IRQ_NONE from interrupt handler in case keyboard
does not report DATA_AVAIL condition.

Signed-off-by: Rajeev Kumar <rajeev-dlh.kumar@st.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-31 00:03:11 -07:00
Peter Hutterer a718d79cc0 Input: uinput - allow for 0/0 min/max on absolute axes.
Some devices provide absolute axes with min/max of 0/0 (e.g. wacom's
ABS_MISC axis). Current uinput restrictions do not allow duplication of
these devices and require hacks in userspace to work around this.

If the kernel accepts physical devices with a min/max of 0/0, uinput
shouldn't disallow the same range.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-31 00:02:39 -07:00
Thomas Gleixner dced35aeb0 drivers: Final irq namespace conversion
Scripted with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:48:19 +02:00
Seth Forshee 170531bae6 Input: sparse-keymap - report KEY_UNKNOWN for unknown scan codes
This allows for debugging non-functional keys easily from
userspace.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-28 23:34:52 -07:00
Seth Forshee f3cf5c4fed Input: sparse-keymap - report scancodes with key events
Scancodes are useful debugging aids when incorrect keycodes
are being sent, as is common with laptop hotkeys.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-28 23:34:48 -07:00
Sylvestre Ledru d51ca07634 Input: h3600_ts_input - fix a spelling error
Signed-off-by: Sylvestre Ledru <sylvestre.ledru@scilab.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-26 22:53:08 -07:00
Ping Cheng e35fb8c1db Input: wacom - report resolution for pen devices
Touch resolution is reported to the userland by retrieving the value
from the HID descriptor. But pen resolution is not since it can not
be retrieved. The current Wacom X driver has a resolution table.
To centralize the source of these values, the resolution entries are
added in the wacom_features struct for x and y coordinates respectively.
The values are then reported to the userland.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-26 22:31:06 -07:00
Ping Cheng 7b824bbdd6 Input: wacom - constify wacom_features for a new missed Bamboo models
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-26 22:30:59 -07:00
Linus Torvalds 24c6d02fe8 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: tsc2005 - fix locking issue
  Input: tsc2005 - use relative jiffies to schedule the watchdog
  Input: tsc2005 - driver should depend on GENERIC_HARDIRQS
2011-03-25 20:50:12 -07:00
Aaro Koskinen a0fa2206f5 Input: tsc2005 - fix locking issue
Commit 0b950d3 (Input: tsc2005 - add open/close) introduced a
locking issue with the ESD watchdog: __tsc2005_disable() is calling
cancel_delayed_work_sync() with mutex held, and the work also needs the
same mutex.

Fix the problem by using mutex_trylock() in tsc2005_esd_work(). If the
mutex is taken, we know we are in the middle of disable or enable and
the watchdog check can be skipped.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-23 23:50:36 -07:00
Aaro Koskinen 903427955b Input: tsc2005 - use relative jiffies to schedule the watchdog
Use relative jiffies to schedule the watchdog. Otherwise it will run
like a mad one.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-23 23:50:31 -07:00
Geert Uytterhoeven ddca6a3134 Input: tsc2005 - driver should depend on GENERIC_HARDIRQS
drivers/input/touchscreen/tsc2005.c: In function ‘tsc2005_probe’:
drivers/input/touchscreen/tsc2005.c:666: error: implicit declaration of function ‘set_irq_wake’

In addition, migrate from set_irq_wake() (marked "do not use" as of commit
a0cd9ca2b9 ("genirq: Namespace cleanup")) to
irq_set_irq_wake().

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-23 23:49:17 -07:00
Haojian Zhuang c9f560b3d0 mfd: Adopt mfd_data in 88pm860x input driver
Copy 88pm860x platform data into different mfd_data structure for
onkey/touch/codec/power driver. So move the identification of
device node from those drivers to mfd driver.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-03-23 10:42:06 +01:00
Andres Salomon 0638d56fbb mfd: mfd_cell is now implicitly available to twl4030 drivers
The cell's platform_data is now accessed with a helper function;
change clients to use that, and remove the now-unused data_size.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-03-23 10:41:54 +01:00
Linus Torvalds a952baa034 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: (64 commits)
  Input: tsc2005 - remove 'disable' sysfs attribute
  Input: tsc2005 - add open/close
  Input: tsc2005 - handle read errors from SPI layer
  Input: tsc2005 - do not rearm timer in hardirq handler
  Input: tsc2005 - don't use work for 'pen up' handling
  Input: tsc2005 - do not use 0 in place of NULL
  Input: tsc2005 - use true/false for boolean variables
  Input: tsc2005 - hide selftest attribute if we can't reset
  Input: tsc2005 - rework driver initialization code
  Input: tsc2005 - set up bus type in input device
  Input: tsc2005 - set up parent device
  Input: tsc2005 - clear driver data after unbinding
  Input: tsc2005 - add module description
  Input: tsc2005 - remove driver banner message
  Input: tsc2005 - remove incorrect module alias
  Input: tsc2005 - convert to using dev_pm_ops
  Input: tsc2005 - use spi_get/set_drvdata()
  Input: introduce tsc2005 driver
  Input: xen-kbdfront - move to drivers/input/misc
  Input: xen-kbdfront - add grant reference for shared page
  ...
2011-03-19 22:27:06 -07:00
Dmitry Torokhov 97eb3f2435 Merge branch 'next' into for-linus 2011-03-18 23:38:50 -07:00
Linus Torvalds 6d7ed21d17 Merge branches 'defcfg', 'drivers' and 'cyberpro-next' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'defcfg' of master.kernel.org:/home/rmk/linux-2.6-arm:
  ARM: 6647/1: add Versatile Express defconfig
  ARM: 6644/1: mach-ux500: update the U8500 defconfig

* 'drivers' of master.kernel.org:/home/rmk/linux-2.6-arm:
  ARM: 6764/1: pl011: factor out FIFO to TTY code
  ARM: 6763/1: pl011: add optional RX DMA to PL011 v2
  ARM: 6758/1: amba: support pm ops
  ARM: amba: make amba_driver id_table const
  ARM: amba: make internal ID table handling const
  ARM: amba: make probe() functions take const id tables
  ARM: 6662/1: amba: make amba_bustype non-static
  ARM: mmci: add dmaengine-based DMA support
  ARM: mmci: no need for separate host->data_xfered
  ARM: mmci: avoid unnecessary switch to data available PIO interrupts
  ARM: mmci: no need to call flush_dcache_page() with sg_miter API
  ARM: mmci: avoid reporting too many completed bytes on fifo overrun
  ALSA: AACI: make fifo variables more explanitory
  ALSA: AACI: no need to call snd_pcm_period_elapsed() for each period
  ALSA: AACI: use snd_pcm_lib_period_bytes()
  ALSA: AACI: clean up AACI announcement printk
  ALSA: AACI: fix channel mask selection
  ALSA: AACI: fix number of channels for record
  ALSA: AACI: fix multiple IRQ claiming

* 'cyberpro-next' of master.kernel.org:/home/rmk/linux-2.6-arm:
  VIDEO: cyberpro: remove unused cyber2000fb_get_fb_var()
  VIDEO: cyberpro: remove useless function extreg pointers
  VIDEO: cyberpro: update handling of device structures
  VIDEO: cyberpro: add support for video capture I2C
  VIDEO: cyberpro: make 'reg_b0_lock' always present
  VIDEO: cyberpro: add I2C support
  VIDEO: cyberpro: select lowest multipler/divisor for PLL
2011-03-17 18:48:35 -07:00
Linus Torvalds 7b7adc4a01 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/epip/linux-2.6-unicore32
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/epip/linux-2.6-unicore32: (40 commits)
  unicore32: rewrite arch-specific tlb.h to use asm-generic version
  unicore32: modify io_p2v and io_v2p macros, and adjust PKUNITY_mmio_BASEs
  unicore32: replace unicore32-specific iomap functions with generic lib implementation
  unicore32 machine related: add frame buffer driver for pkunity-v3 soc
  unicore32 machine related files: add i2c bus drivers for pkunity-v3 soc
  unicore32 io: redefine __REG(x) and re-use readl/writel funcs
  unicore32 i8042 upgrade and bugfix: adjust resource request region type
  unicore32 upgrade to v2.6.38-rc5: add one more paramter for pte_alloc_map call
  unicore32 i8042: adjust io funcs of i8042-unicore32io.h
  unicore32: rename PKUNITY_IOSPACE_BASE to PKUNITY_MMIO_BASE
  unicore32: modify function names and parameters for irq_chips
  unicore32: remove unused lines in arch/unicore32/include/asm/irq.h
  unicore32 time.c: change calculate method for clock_event_device
  unicore32: ADD MAINTAINER for unicore32 architecture
  unicore32 machine related files: ps2 driver
  unicore32 machine related files: pci bus handling
  unicore32 machine related files: hardware registers
  unicore32 machine related files: core files
  unicore32 additional architecture files: boot process
  unicore32 additional architecture files: low-level lib: misc
  ...

Acked-by: Arnd Bergmann <arnd@arndb.de>
2011-03-17 10:11:25 -07:00
Russell King 9c9585e0e9 Merge branches 'aaci', 'mmci-dma', 'pl' and 'pl011' into drivers 2011-03-17 11:04:51 +00:00
Dmitry Torokhov def179c271 Merge branch 'tsc2005' into next 2011-03-16 23:29:56 -07:00
Dmitry Torokhov 5cb81d19ba Input: tsc2005 - remove 'disable' sysfs attribute
I believe that enable/disable functionality should not be implemented on
the individual driver level but rather in device core, potentially
reusing parts of PM framework. Therefore the driver-specific "disable"
attribute is removed from the mainline driver.

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:29:33 -07:00
Dmitry Torokhov 0b950d3d7c Input: tsc2005 - add open/close
Introduce open and close methods for the input device to keep the device
powered down when it is not in use. Also rework interaction between
interrupt thread and starting/shutting off/resetting the device: instead
of taking a mutex in the intterrupt thread and elsewhere disable interrupts
before transitioning the device in a new state.

The ESD handling is also separated from the IRQ thread; we poll regularly
at a given interval and simply skip reads if we see that valid interrupt
happened not so long ago. This allows us not cancel and reschedule ESD
work from interrupt context all the time.

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:29:29 -07:00
Dmitry Torokhov 71f80045d4 Input: tsc2005 - handle read errors from SPI layer
Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:29:22 -07:00
Dmitry Torokhov dacb650f12 Input: tsc2005 - do not rearm timer in hardirq handler
We will most likely rearm it yet again the IRQ thread so doing it here
is pointless.

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:29:16 -07:00
Dmitry Torokhov 80cc2f0c92 Input: tsc2005 - don't use work for 'pen up' handling
We do not need process context to send input events so let's switch to
a regular timer. I am going to get rid of taking ts->mutex in
tsc2005_irq_thread() later.

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:29:12 -07:00
Dmitry Torokhov 9a6e180af7 Input: tsc2005 - do not use 0 in place of NULL
Sparse in unhappy when people use 0 instead of NULL for pointers so
let's rework the way we initialize spi_transfer structure in
tsc2005_cmd() and tsc2005_write().

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:29:08 -07:00
Dmitry Torokhov c8b6846a75 Input: tsc2005 - use true/false for boolean variables
Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:29:04 -07:00
Dmitry Torokhov 8dbcc432c2 Input: tsc2005 - hide selftest attribute if we can't reset
If implementation to perform self-test/reset has not been provided by the
platform code hide 'selftest' sysfs attribute instead of returning error
when someone tries to use it.

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:29:00 -07:00
Dmitry Torokhov 99bb892d8a Input: tsc2005 - rework driver initialization code
We need to make sure we have time/work initialized before requesting and
enabling interrupts, otherwise we might start using them way too early.

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:28:55 -07:00
Dmitry Torokhov f8a67139c6 Input: tsc2005 - set up bus type in input device
We know what bus we are residing on (SPI) so let's make this data
available to the users.

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:28:40 -07:00
Dmitry Torokhov b4b480a8d6 Input: tsc2005 - set up parent device
Set up SPI device as parent of the input device so it gets placed into
proper place in sysfs tree.

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:28:30 -07:00
Dmitry Torokhov 2721a89ac4 Input: tsc2005 - clear driver data after unbinding
We should not leave garbage pointers in driver structure after we unbind
it from the device or if bind fails.

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:28:23 -07:00
Dmitry Torokhov b88aa494c2 Input: tsc2005 - add module description
Add proper module description so that it would show in 'modinfo'
output.

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:28:18 -07:00
Dmitry Torokhov bcd11879fb Input: tsc2005 - remove driver banner message
The boot process is noisy as it is and input core already announces
all new device so let's get rid of the banner message in the driver.

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:28:12 -07:00
Dmitry Torokhov ef5a672f8d Input: tsc2005 - remove incorrect module alias
TSC2005 is not a platform driver so it should not define "platform:tsc2005"
module alias.

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:28:08 -07:00
Dmitry Torokhov 3ff8ff53aa Input: tsc2005 - convert to using dev_pm_ops
Newer code should not be using legacy suspend/resume methods but
rather supply dev_pm_ops structure as it allows better control
over power management.

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:28:04 -07:00
Dmitry Torokhov 6b007d62fa Input: tsc2005 - use spi_get/set_drvdata()
Instead of peeking into underlying device and using dev_get/set_drvdata(),
let's use SPI layer's implementation to access driver-private data
(which may be different from driver-core private data).

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:27:57 -07:00
Lauri Leukkunen 37bd44694c Input: introduce tsc2005 driver
Discussions:

http://www.mail-archive.com/linux-omap@vger.kernel.org/msg26748.html

Introduce a driver for the Texas Instruments TSC2005 touchscreen
controller (http://focus.ti.com/docs/prod/folders/print/tsc2005.html).

The patch is based on a driver by Lauri Leukkunen, with modifications
by David Brownell, Phil Carmody, Imre Deak, Hiroshi DOYU, Ari Kauppi,
Tony Lindgren, Jarkko Nikula, Eero Nurkkala and Roman Tereshonkov.

Signed-off-by: Lauri Leukkunen <lauri.leukkunen@nokia.com>
[aaro.koskinen@nokia.com: patch description, rebasing & cleanup]
Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
[ext-srikar.1.bhavanarayana@nokia.com: various fixes]
Signed-off-by: Srikar <ext-srikar.1.bhavanarayana@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:27:39 -07:00
Dmitry Torokhov 49851ca04c Input: xen-kbdfront - move to drivers/input/misc
drivers/input is reserved for input core code and input handlers with
drivers belonging to one of the sub-directories.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:26:01 -07:00
Daniel De Graaf 0a4dfa5ddb Input: xen-kbdfront - add grant reference for shared page
Without a grant reference, full access to the domain's memory is
required to use the shared page. Add an additional parameter in
xenstore to allow grant mapping to be used.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ian Campbell <Ian.Campbell@eu.citrix.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:24:07 -07:00
Olaf Hering 8c3c283e6b Input: xen-kbdfront - advertise either absolute or relative coordinates
A virtualized display device is usually viewed with the vncviewer
application, either by 'xm vnc domU' or with vncviewer localhost:port.
vncviewer and the RFB protocol provides absolute coordinates to the
virtual display. These coordinates are either passed through to a PV
guest or converted to relative coordinates for a HVM guest.

A PV guest receives these coordinates and passes them to the kernels
evdev driver. There it can be picked up by applications such as the
xorg-input drivers. Using absolute coordinates avoids issues such as
guest mouse pointer not tracking host mouse pointer due to wrong mouse
acceleration settings in the guests X display.

Advertise either absolute or relative coordinates to the input system
and the evdev driver, depending on what dom0 provides. The xorg-input
driver prefers relative coordinates even if a devices provides both.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-16 23:24:02 -07:00
GuanXuetao e5abf78b57 unicore32 io: redefine __REG(x) and re-use readl/writel funcs
-- by advice of Arnd Bergmann

Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
2011-03-17 09:19:19 +08:00
GuanXuetao 4517366d87 unicore32 i8042 upgrade and bugfix: adjust resource request region type
Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
2011-03-17 09:19:19 +08:00
GuanXuetao 3838b82c0a unicore32 i8042: adjust io funcs of i8042-unicore32io.h
replace inb/outb with readb/writeb in i8042-unicore32io.h
and correct typecasting of register and region macros
  -- by advice with Arnd Bergmann

Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
2011-03-17 09:19:18 +08:00
GuanXuetao 425ad52b86 unicore32 machine related files: ps2 driver
This patch implements arch-specific ps2 driver.

By reviewed with Dmitry Torokhov:
     1. move i8042-ucio.h to drivers/input/serio/i8042-unicore32io.h
     2. move puv3_ps2_init() to arch/unicore32/kernel/puv3-core.c
     3. remove unused comments.

Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-17 09:19:15 +08:00
Linus Torvalds 4c5811bf46 Merge branch 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6
* 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6: (21 commits)
  tty: serial: altera_jtaguart: Add device tree support
  tty: serial: altera_uart: Add devicetree support
  dt: eliminate of_platform_driver shim code
  dt: Eliminate of_platform_{,un}register_driver
  dt/serial: Eliminate users of of_platform_{,un}register_driver
  dt/usb: Eliminate users of of_platform_{,un}register_driver
  dt/video: Eliminate users of of_platform_{,un}register_driver
  dt/net: Eliminate users of of_platform_{,un}register_driver
  dt/sound: Eliminate users of of_platform_{,un}register_driver
  dt/spi: Eliminate users of of_platform_{,un}register_driver
  dt: uartlite: merge platform and of_platform driver bindings
  dt: xilinx_hwicap: merge platform and of_platform driver bindings
  ipmi: convert OF driver to platform driver
  leds/leds-gpio: merge platform_driver with of_platform_driver
  dt/sparc: Eliminate users of of_platform_{,un}register_driver
  dt/powerpc: Eliminate users of of_platform_{,un}register_driver
  dt/powerpc: move of_bus_type infrastructure to ibmebus
  drivercore/dt: add a match table pointer to struct device
  dt: Typo fix.
  altera_ps2: Add devicetree support
  ...
2011-03-16 17:28:10 -07:00
Linus Torvalds bd2895eead Merge branch 'for-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
* 'for-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
  workqueue: fix build failure introduced by s/freezeable/freezable/
  workqueue: add system_freezeable_wq
  rds/ib: use system_wq instead of rds_ib_fmr_wq
  net/9p: replace p9_poll_task with a work
  net/9p: use system_wq instead of p9_mux_wq
  xfs: convert to alloc_workqueue()
  reiserfs: make commit_wq use the default concurrency level
  ocfs2: use system_wq instead of ocfs2_quota_wq
  ext4: convert to alloc_workqueue()
  scsi/scsi_tgt_lib: scsi_tgtd isn't used in memory reclaim path
  scsi/be2iscsi,qla2xxx: convert to alloc_workqueue()
  misc/iwmc3200top: use system_wq instead of dedicated workqueues
  i2o: use alloc_workqueue() instead of create_workqueue()
  acpi: kacpi*_wq don't need WQ_MEM_RECLAIM
  fs/aio: aio_wq isn't used in memory reclaim path
  input/tps6507x-ts: use system_wq instead of dedicated workqueue
  cpufreq: use system_wq instead of dedicated workqueues
  wireless/ipw2x00: use system_wq instead of dedicated workqueues
  arm/omap: use system_wq in mailbox
  workqueue: use WQ_MEM_RECLAIM instead of WQ_RESCUER
2011-03-16 08:20:19 -07:00
Dmitry Torokhov 53a2b81c4e Input: tc3589x-keypad - fix 'double const' warning
Also rearrange driver structure initializer a bit.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-15 23:18:34 -07:00
Magnus Damm 64dcddd888 Input: tca6416-keypad - suspend/resume wakeup support
Extend the tca6416 driver to use enable_irq_wake() and disable_irq_wake()
in the suspend/resume hooks.

This makes it possible to wake up from suspend-to-ram using a tca6416 key
on the sh7372 mackerel board.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-15 23:18:28 -07:00
Joonyoung Shim 4c75de32eb Input: atmel_mxt_ts - add objects of mXT1386 chip
Atmel mXT1386 chip is operated by atmel_mxt_ts driver and it has some
different objects.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-14 21:42:46 -07:00
Joonyoung Shim 979a72dad9 Input: atmel_mxt_ts - remove firmware version check
Atmel touchscreen chips have different firmware version with each chip,
so we cannot distinguish attribute of chip by firmware version.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-14 21:42:06 -07:00
Mark Brown e7cbb90ad2 Input: wm831x-ts - ensure the controller is in a known state on open
Explicitly set all the enable bits when opening the device just in case
something left the device in an unexpected state.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-14 21:41:29 -07:00
Bo Shen bd7e4e85f3 Input: add Atmel AT42QT1070 keypad driver
The AT42QT1070 QTouch sensor supports up to 7 keys.

The driver has been tested on Atmel AT91SAM9M10-G45-EK board, and it
 should work fine on other platforms.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-13 23:35:45 -07:00
Mark Brown 23c483d29f Input: wm831x-ts - default pressure measurements on
tslib expects pressure measurements so enable them by default for better
compatibility.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-12 20:49:07 -08:00
Andy Botting 47340bd9fe Input: bcm5974 - add support for MacBookPro8
This patch add multitouch support for the MacBookPro8,1 and
MacBookPro8,2 models.

Cc: stable@kernel.org
Signed-off-by: Andy Botting <andy@andybotting.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-12 20:37:30 -08:00
Ping Cheng 84eb5aa6cc Input: wacom - support 2FGT in MT format
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-12 20:37:25 -08:00
Ping Cheng a43c7c5383 Input: wacom - support one finger touch the touchscreen way
There are two types of 1FGT devices supported in wacom_wac.c.
Changing them to follow the existing touchscreen format, i.e.,
only report BTN_TOUCH as a valid tool type.

Touch data will be ignored if pen is in proximity. This requires
a touch up event sent if touch was down when pen comes in. The
touch up event should be sent before any pen events are emitted.
Otherwise, two pointers would race for the cursor.

However, we can not send a touch up inside wacom_tpc_pen since
pen and touch are on different logical port. That is why we
have to check if touch is up before sending pen events.

Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-12 20:37:20 -08:00
Ping Cheng 8aa9a9ac89 Input: wacom - process pen data in its own routine
So it would be easier for patch reviewers to follow the data path.

Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-12 20:37:16 -08:00
Ping Cheng 4fc193814b Input: wacom - do not send 2FGT Tablet PC events in TAP format
2FGT Tablet PC touch events were processed in _TAP_ format. Remove
them so we can change to _MT_ format.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-12 20:37:12 -08:00
Grant Likely 1c48a5c93d dt: Eliminate of_platform_{,un}register_driver
Final step to eliminate of_platform_bus_type.  They're all just
platform drivers now.

v2: fix type in pasemi_nand.c (thanks to Stephen Rothwell)

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-02-28 13:22:46 -07:00
Grant Likely 4ebb24f707 dt/sparc: Eliminate users of of_platform_{,un}register_driver
Get rid of old users of of_platform_driver in arch/sparc.  Most
of_platform_driver users can be converted to use the platform_bus
directly.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-02-28 01:36:39 -07:00
Grant Likely 38a5d6736e Merge commit 'v2.6.38-rc6' into devicetree/next
Conflicts:
	drivers/spi/pxa2xx_spi_pci.c
2011-02-28 01:36:21 -07:00
Peter Korsgaard 439581ec07 Input: evdev - fix evdev_write return value on partial writes
As was recently brought up on the busybox list
(http://lists.busybox.net/pipermail/busybox/2011-January/074565.html),
evdev_write doesn't properly check the count argument, which will
lead to a return value > count on partial writes if the remaining bytes
are accessible - causing userspace confusion.

Fix it by only handling each full input_event structure and return -EINVAL
if less than 1 struct was written, similar to how it is done in evdev_read.

Reported-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-02-27 01:52:53 -08:00
Henrik Rydberg 5063511539 Input: bcm5974 - Report button also for zero fingers
With the current code, pressing the integrated button with an
isolating tool does not result in any button report. Fixed
with this this patch.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-02-27 01:48:30 -08:00
Iiro Valkonen 0d3c07378b Input: atmel_mxt_ts - remove matrix size check
The mxt_check_matrix_size() is currently setting the CTE mode to match
xline/yline information that is in the platform data, but it does not
take into account for example the fact that we could have a key array
in use too (key array would use some x/y lines as well).

It would be better to simply rely on the configuration data, and make
sure that the CTE mode set in there matches the touch object (touchscreen,
key array, proximity) configuration (which are set in the config data too).

Signed-off-by: Iiro Valkonen <iiro.valkonen@atmel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-02-25 09:27:00 -08:00
HeungJun Kim 5f62615ef5 Input: mcs_touchkey - add shutdown handler
The MCS50XX series has a HW bug that requires explicit chip power down.
If chip is not powered down before shutting the system down the control
pins (powerup, interrupt) are pulled up and residue current continues
flowing into the chips making them continue consuming power.

Signed-off-by: Heungjun Kim <riverful.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-02-23 21:43:38 -08:00
Heungjun Kim adf779c1ee Input: mcs_touchkey - add support for suspend/resume
This adds support for system-level suspend/resume to the driver.

Signed-off-by: Heungjun Kim <riverful.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-02-23 21:43:31 -08:00
Abraham Arce 5ad567ffba Input: omap4-keypad - wire up runtime PM handling
Enable Runtime PM functionality in OMAP4 driver based on the following
assumptions:

- keyboard controller in wakeup domain so it is always on and power
  impact is minimal;
- in OMAP4 the device control is at module/device level and ick/fclk
  level control is difficult so cutting of clocks will prevent
  interrupts.

Signed-off-by: Abraham Arce <x0066660@ti.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-02-23 21:05:35 -08:00
Linus Torvalds 57949e8006 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: serio/gameport - use 'long' system workqueue
  Input: synaptics - document 0x0c query
  Input: tegra-kbc - add function keymap
2011-02-23 14:44:25 -08:00
Dmitry Torokhov 1d64b655dc Input: serio/gameport - use 'long' system workqueue
Commit 8ee294cd9d converted serio
subsystem event handling from using a dedicated thread to using
common workqueue. Unfortunately, this regressed our boot times,
due to the fact that serio jobs take long time to execute. While
the new concurrency managed workqueue code manages long-playing
works just fine and schedules additional workers as needed, such
works wreck havoc among remaining users of flush_scheduled_work().

To solve this problem let's move serio/gameport works from system_wq
to system_long_wq which nobody tries to flush.

Reported-and-tested-by: Hernando Torque <pantherchen@versanet.de>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-02-23 08:53:07 -08:00
Dmitry Torokhov 9bb794ae05 Input: synaptics - document 0x0c query
Since Synaptics technical writers department is a bit slow releasing updated
Synaptics interface guide, let's add some new bits (with their blessing)
to the code so that they don't get lost.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-02-23 08:53:01 -08:00
Russell King aa25afad2c ARM: amba: make probe() functions take const id tables
Make Primecell driver probe functions take a const pointer to their
ID tables.  Drivers should never modify their ID tables in their
probe handler.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-02-23 16:24:14 +00:00
Dan Carpenter 163d27706b Input: uinput - reversed test in uinput_setup_device()
The test here is reversed. It should be if (IS_ERR()) instead of
if (!IS_ERR()).

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-02-21 01:02:34 -08:00
Iiro Valkonen 919ed895f0 Input: atmel_mxt_ts - allow board code to specify IRQ flags
Different board have different requirements/setups so let's be more
flexible.

Signed-off-by: Iiro Valkonen <iiro.valkonen@atmel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-02-21 01:02:34 -08:00