GitHub/moto-9609/android_kernel_motorola_exynos9610.git
11 years agoInput: tc3589x-keypad - fix keymap size
Rabin Vincent [Sun, 10 Mar 2013 00:17:20 +0000 (16:17 -0800)]
Input: tc3589x-keypad - fix keymap size

The keymap size used by tc3589x is too low, leading to the driver
overwriting other people's memory.  Fix this by making the driver
use the automatically allocated keymap provided by
matrix_keypad_build_keymap() instead of allocating one on its own.

Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: wacom - add support for 0x10d
Stephan Frank [Thu, 7 Mar 2013 22:08:50 +0000 (14:08 -0800)]
Input: wacom - add support for 0x10d

It is a Wacom device found in Fujitsu Lifebook T902.

Signed-off-by: Stephan Frank <sfrank@cs.tu-berlin.de>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: ALPS - update documentation for recent touchpad driver mods
dave turvene [Sun, 24 Feb 2013 04:06:34 +0000 (20:06 -0800)]
Input: ALPS - update documentation for recent touchpad driver mods

Updated documentation for the new ALPS touchpad support submitted in two
patchsets by Kevin Cernekee.  My understanding is the most recent
patchset '"Dolphin V2" touchpad support' may still need some work but
Future work on the ALPS driver should not impact these documentation changes.

See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/606238

Signed-off-by: David Turvene <dturvene@dahetral.com>
Acked-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: ALPS - add "Dolphin V1" touchpad support
Dave Turvene [Fri, 22 Feb 2013 06:58:28 +0000 (22:58 -0800)]
Input: ALPS - add "Dolphin V1" touchpad support

These touchpads use a different protocol; they have been seen on Dell
N5110, Dell 17R SE, and others.

The official ALPS driver identifies them by looking for an exact match
on the E7 report: 73 03 50.  Dolphin V1 returns an EC report of
73 01 xx (02 and 0d have been seen); Dolphin V2 returns an EC report of
73 02 xx (02 has been seen).

Dolphin V2 probably needs a different initialization sequence and/or
report parser, so it is left for a future commit.

Signed-off-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: ALPS - remove unused argument to alps_enter_command_mode()
Kevin Cernekee [Fri, 22 Feb 2013 06:58:20 +0000 (22:58 -0800)]
Input: ALPS - remove unused argument to alps_enter_command_mode()

Now that alps_identify() explicitly issues an EC report using
alps_rpt_cmd(), we no longer need to look at the magic numbers returned
by alps_enter_command_mode().

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: cypress_ps2 - fix trackpadi found in Dell XPS12
Kamal Mostafa [Thu, 21 Feb 2013 19:55:05 +0000 (11:55 -0800)]
Input: cypress_ps2 - fix trackpadi found in Dell XPS12

Avoid firmware glitch in Cypress PS/2 Trackpad firmware version 11
(as observed in Dell XPS12) which prevents driver from recognizing
the trackpad.

BugLink: http://launchpad.net/bugs/1103594
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Cc: Dudley Du <dudl@cypress.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoMerge branch 'next' into for-linus
Dmitry Torokhov [Wed, 20 Feb 2013 06:05:39 +0000 (22:05 -0800)]
Merge branch 'next' into for-linus

Prepare first set of updates for 3.9 merge window.

11 years agoInput: cyttsp-spi - remove duplicate MODULE_ALIAS()
Dmitry Torokhov [Sun, 17 Feb 2013 06:07:41 +0000 (22:07 -0800)]
Input: cyttsp-spi - remove duplicate MODULE_ALIAS()

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: tsc2005 - add MODULE_ALIAS
Pali Rohár [Sun, 17 Feb 2013 06:01:44 +0000 (22:01 -0800)]
Input: tsc2005 - add MODULE_ALIAS

This enables autoloading of tsc2005 driver when is compiled as a module.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: tegra-kbc - require CONFIG_OF, remove platform data
Stephen Warren [Sat, 16 Feb 2013 01:04:12 +0000 (17:04 -0800)]
Input: tegra-kbc - require CONFIG_OF, remove platform data

Tegra only supports, and always enables, device tree. Remove all ifdefs
and runtime checks for DT support from the driver. Platform data is
therefore no longer required. Delete the header that defines it, and
rework the driver to parse the device tree directly into struct
tegra_kbc.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: synaptics - initialize pointer emulation usage
Henrik Rydberg [Sat, 16 Feb 2013 01:04:03 +0000 (17:04 -0800)]
Input: synaptics - initialize pointer emulation usage

To properly setup event parameters for emulated events, pass
the appropriate flag to the slot initialization function. Also,
all MT-related events should be setup before initialization.

Incidentally, this solves the issue of doubly filtered pointer
events.

Reported-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: MT - do not apply filtering on emulated events
Henrik Rydberg [Sat, 16 Feb 2013 01:03:57 +0000 (17:03 -0800)]
Input: MT - do not apply filtering on emulated events

The pointer emulation events are derived from contact values that
have already been filtered, so send the emulated events as is.

Reported-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: bma150 - make some defines public and fix some comments
Michael Trimarchi [Fri, 15 Feb 2013 22:43:38 +0000 (14:43 -0800)]
Input: bma150 - make some defines public and fix some comments

Make the constants referring to range and bandwidth public so they can
be used when initializing the platform data fields in the platform code.

Fix also some comments regarding the unit of measurement to use for the
range and bandwidth fields, the values are not actually expected to be
in G or HZ, the code in bma150.c just uses the BMA150_RANGE_xxx and
BMA150_BW_xxx constants like they are with no translation from actual
values in G or HZ.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: bma150 - fix checking pm_runtime_get_sync() return value
Michael Trimarchi [Fri, 15 Feb 2013 22:42:51 +0000 (14:42 -0800)]
Input: bma150 - fix checking pm_runtime_get_sync() return value

When PM_RUNTIME is not defined, pm_runtime_get_sync() returns 1, see
include/linux/pm_runtime.c::__pm_runtime_resume(), and the check of the
return value was overlooking this, in this case bma150_open() would
return 1 which is not expected by upper layers.

Maybe the check for != -ENOSYS (Function not implemented) was meant to
cover this, but pm_runtime_get_sync() does not return this value.

For now fix the issue locally by checking explicitly for negative return
values.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: ALPS - enable trackstick on Rushmore touchpads
Kevin Cernekee [Thu, 14 Feb 2013 06:28:07 +0000 (22:28 -0800)]
Input: ALPS - enable trackstick on Rushmore touchpads

Separate out the common trackstick probe/setup sequences, then call them
from each of the v3 init functions.

Credits: Emmanual Thome furnished the information on the trackstick init
and how it affected the report format.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: ALPS - add support for "Rushmore" touchpads
Kevin Cernekee [Thu, 14 Feb 2013 06:27:08 +0000 (22:27 -0800)]
Input: ALPS - add support for "Rushmore" touchpads

Rushmore touchpads are found on Dell E6230/E6430/E6530.  They use the V3
protocol with slightly tweaked init sequences and report formats.

The E7 report is 73 03 0a, and the EC report is 88 08 1d

Credits: Emmanuel Thome reported the MT bitmap changes.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: ALPS - make the V3 packet field decoder "pluggable"
Kevin Cernekee [Thu, 14 Feb 2013 06:26:11 +0000 (22:26 -0800)]
Input: ALPS - make the V3 packet field decoder "pluggable"

A number of different ALPS touchpad protocols can reuse
alps_process_touchpad_packet_v3() with small tweaks to the bitfield
decoding.  Create a new priv->decode_fields() callback that handles the
per-model differences.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: ALPS - move pixel and bitmap info into alps_data struct
Kevin Cernekee [Thu, 14 Feb 2013 06:24:55 +0000 (22:24 -0800)]
Input: ALPS - move pixel and bitmap info into alps_data struct

Newer touchpads use different constants, so make them runtime-
configurable.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: ALPS - fix command mode check
Kevin Cernekee [Thu, 14 Feb 2013 06:24:22 +0000 (22:24 -0800)]
Input: ALPS - fix command mode check

Pinnacle class devices should return "88 07 xx" or "88 08 xx" when
entering command mode.  If either the first byte or the second byte is
invalid, return an error.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: ALPS - rework detection of Pinnacle AGx touchpads
Kevin Cernekee [Thu, 14 Feb 2013 06:23:34 +0000 (22:23 -0800)]
Input: ALPS - rework detection of Pinnacle AGx touchpads

The official ALPS driver uses the EC report, not the E7 report, to detect
these devices.  Also, they check for a range of values; the original
table-based code only checked for two specific ones.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: ALPS - move {addr,nibble}_command settings into alps_set_defaults()
Kevin Cernekee [Thu, 14 Feb 2013 06:23:04 +0000 (22:23 -0800)]
Input: ALPS - move {addr,nibble}_command settings into alps_set_defaults()

This allows alps_identify() to override these settings based on the
device characteristics, if it is ever necessary.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: ALPS - use function pointers for different protocol handlers
Kevin Cernekee [Thu, 14 Feb 2013 06:22:08 +0000 (22:22 -0800)]
Input: ALPS - use function pointers for different protocol handlers

In anticipation of adding more ALPS protocols and more per-device quirks,
use function pointers instead of switch statements to call functions that
differ from one device to the next.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: ALPS - rework detection sequence
Kevin Cernekee [Thu, 14 Feb 2013 06:19:59 +0000 (22:19 -0800)]
Input: ALPS - rework detection sequence

If the E6 report test passes, get the E7 and EC reports right away and
then try to match an entry in the table.

Pass in the alps_data struct, so that the detection code will be able to
set operating parameters based on information found during detection.

Change the version (psmouse->model) to report the protocol version only,
in preparation for supporting models that do not show up in the ID table.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: ALPS - introduce helper function for repeated commands
Kevin Cernekee [Thu, 14 Feb 2013 06:19:01 +0000 (22:19 -0800)]
Input: ALPS - introduce helper function for repeated commands

Several ALPS driver init sequences repeat a command three times, then
issue PSMOUSE_CMD_GETINFO to read the result.  Move this into a helper
function to simplify the code.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: ALPS - move alps_get_model() down below hw_init code
Kevin Cernekee [Thu, 14 Feb 2013 04:57:04 +0000 (20:57 -0800)]
Input: ALPS - move alps_get_model() down below hw_init code

This will minimize the number of forward declarations needed when
alps_get_model() starts assigning function pointers.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: ALPS - copy "model" info into alps_data struct
Kevin Cernekee [Thu, 14 Feb 2013 04:56:33 +0000 (20:56 -0800)]
Input: ALPS - copy "model" info into alps_data struct

Not every type of ALPS touchpad is well-suited to table-based detection.
Start moving the various alps_model_data attributes into the alps_data
struct so that we don't need a unique table entry for every possible
permutation of protocol version, flags, byte0/mask0, etc.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: ALPS - document the alps.h data structures
Kevin Cernekee [Thu, 14 Feb 2013 04:55:19 +0000 (20:55 -0800)]
Input: ALPS - document the alps.h data structures

Add kernel-doc markup.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: wacom - add support for DTH-2242
Ping Cheng [Thu, 14 Feb 2013 04:20:01 +0000 (20:20 -0800)]
Input: wacom - add support for DTH-2242

It is a pen with 10 finger touch device.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: cyapa - add support for smbus protocol
Benson Leung [Wed, 13 Feb 2013 21:56:03 +0000 (13:56 -0800)]
Input: cyapa - add support for smbus protocol

This patch adds support for the Cypress APA Smbus Trackpad type,
which uses a modified register map that fits within the
limitations of the smbus protocol.

Devices that use this protocol include:
CYTRA-116001-00 - Samsung Series 5 550 Chromebook trackpad
CYTRA-103002-00 - Acer C7 Chromebook trackpad
CYTRA-101003-00 - HP Pavilion 14 Chromebook trackpad

Signed-off-by: Dudley Du <dudl@cypress.com>
Signed-off-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: synaptics - fix 1->3 contact transition reporting
Daniel Kurtz [Wed, 13 Feb 2013 21:53:07 +0000 (13:53 -0800)]
Input: synaptics - fix 1->3 contact transition reporting

Investigating the following gesture highlighted two slight implementation
errors with choosing which slots to report in which slot when multiple
contacts are present:

Action                 SGM  AGM (MTB slot:Contact)
1. Touch contact 0    (0:0)
2. Touch contact 1    (0:0, 1:1)
3. Lift  contact 0    (1:1)
4. Touch contacts 2,3 (0:2, 1:3)

In step 4, slot 1 was not being cleared first, which means the same
tracking ID was being used for reporting both the old contact 1 and the
new contact 3.  This could result in "drumroll", where the old contact 1
would appear to suddenly jump to new finger 3 position.

Similarly, if contacts 2 & 3 are not detected at the same sample, step 4
is split into two:

Action                SGM  AGM  (MTB slot:contact)
1. Touch contact 0   (0:0)
2. Touch contact 1   (0:0, 1:1)
3. Lift  contact 0   (1:1)
4. Touch contact 2   (0:2, 1:1)
5. Touch contact 3   (0:2, 1:3)

In this case, there was also a bug.  In step 4, when contact 1 moves from
SGM to AGM and contact 2 is first reported in SGM, slot 0 was actually
empty.  So slot 0 can be used to report the new SGM (contact 0),
immediately.  Since it was empty, contact 2 in slot 0 will get a new
tracking ID.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: add couple of missing GENERIC_HARDIRQS dependencies
Heiko Carstens [Wed, 13 Feb 2013 21:29:01 +0000 (13:29 -0800)]
Input: add couple of missing GENERIC_HARDIRQS dependencies

When removing the !S390 dependency from drivers/input/Kconfig
a couple of drivers don't compile because they have a dependency
on GENERIC_HARDIRQS.  So add the missing dependencies.
Fixes e.g. this one:

drivers/input/keyboard/lm8323.c: In function ‘lm8323_suspend’:
drivers/input/keyboard/lm8323.c:801:2: error: implicit declaration of function ‘irq_set_irq_wake’
[-Werror=implicit-function-declaration]

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: twl6040-vibra - use system workqueue
Peter Ujfalusi [Fri, 25 Jan 2013 08:03:54 +0000 (00:03 -0800)]
Input: twl6040-vibra - use system workqueue

It is time to switch to system wq instead creating a queue for the driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: twl6040-vibra - code cleanup in probe with devm_* conversion
Peter Ujfalusi [Fri, 25 Jan 2013 08:03:50 +0000 (00:03 -0800)]
Input: twl6040-vibra - code cleanup in probe with devm_* conversion

Convert the probe to use devm_*. At the same time reorder the calls
so we will register the input device as the last step when the driver
is loaded.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: goldfish - virtual input event driver
Brian Swetland [Thu, 24 Jan 2013 03:45:00 +0000 (19:45 -0800)]
Input: goldfish - virtual input event driver

This device is a direct pipe from "hardware" to the input event subsystem,
allowing us to avoid having to route "keypad" style events through an
AT keyboard driver (gross!).

As with the other submissions this driver is cross architecture.

Signed-off-by: Mike A. Chan <mikechan@google.com>
[Tided up to work on x86]
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
[Ported to 3.4]
Signed-off-by: Tom Keel <thomas.keel@intel.com>
[Cleaned up for 3.7 and submission]
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: wacom - fix wacom_set_report retry logic
Chris Bagwell [Thu, 24 Jan 2013 03:37:34 +0000 (19:37 -0800)]
Input: wacom - fix wacom_set_report retry logic

Logic sets a value and then reads it back to make sure it worked
and retries write on failures.  Since read and write share a buffer,
it needs to be set back up before writing though.

Issue is not seen a lot because 1) it doesn't need to retry for
a lot of tablets and 2) a lot of failures that need a retry are
from an -ETIMEDOUT and hopefully buffer is not touched in this case.

At least one user has shown logs with buffer being modified during
-ETIMEDOUT case with linux 3.7 kernel.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: walkera0701 - claim parport when opening the device
Dmitry Torokhov [Mon, 17 Dec 2012 06:59:12 +0000 (22:59 -0800)]
Input: walkera0701 - claim parport when opening the device

Postpone claiming the port until the device is opened, instead of doing
that when the driver is loaded.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: walkera0701 - use proper error codes
Dmitry Torokhov [Mon, 17 Dec 2012 06:38:45 +0000 (22:38 -0800)]
Input: walkera0701 - use proper error codes

We have been using -EBUSY where we should have used -EIO or -ENOMEM,
so let's fix that and also add some diagnostic messages.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: walkera0701 - switch to using pr_xxx() for messages
Dmitry Torokhov [Sat, 15 Dec 2012 07:18:21 +0000 (23:18 -0800)]
Input: walkera0701 - switch to using pr_xxx() for messages

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: walkera0701 - set up input device's parent
Dmitry Torokhov [Sat, 15 Dec 2012 07:13:24 +0000 (23:13 -0800)]
Input: walkera0701 - set up input device's parent

This will place the joystick's input device into propoer place in sysfs
hierarchy as long as th port has device assigned to it (i.e. it is not
legacy port).

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: atkbd - fix multi-byte scancode handling on reconnect
Shawn Nematbakhsh [Mon, 31 Dec 2012 20:53:35 +0000 (12:53 -0800)]
Input: atkbd - fix multi-byte scancode handling on reconnect

On resume from suspend there is a possibility for multi-byte scancodes
to be handled incorrectly. atkbd_reconnect disables the processing of
scancodes in software by calling atkbd_disable, but the keyboard may
still be active because no disconnect command was sent. Later, software
handling is re-enabled. If a multi-byte scancode sent from the keyboard
straddles the re-enable, only the latter byte(s) will be handled.

In practice, this leads to cases where multi-byte break codes (ex. "e0
4d" - break code for right-arrow) are misread as make codes ("4d" - make
code for numeric 6), leading to one or more unwanted, untyped characters
being interpreted.

The solution implemented here involves sending command f5 (reset
disable) to the keyboard prior to disabling software handling of codes.
Later, the command to re-enable the keyboard is sent only after we are
prepared to handle scancodes.

Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: twl4030-vibra - Use system workqueue
Peter Ujfalusi [Fri, 11 Jan 2013 17:05:47 +0000 (09:05 -0800)]
Input: twl4030-vibra - Use system workqueue

It is time to switch to system wq instead creating a queue for the driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: twl4030-vibra - switch to using managed resources
Peter Ujfalusi [Fri, 11 Jan 2013 17:05:42 +0000 (09:05 -0800)]
Input: twl4030-vibra - switch to using managed resources

This simplifies error handling and eliminates the need for implementing
remove() method.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: add driver for Cypress APA I2C Trackpad
Benson Leung [Thu, 10 Jan 2013 00:25:11 +0000 (16:25 -0800)]
Input: add driver for Cypress APA I2C Trackpad

This patch introduces a driver for Cypress All Points Addressable
I2C Trackpad, including the ones in 2012 Samsung Chromebooks.

This device is compatible with MT protocol type B, providing identifiable
contacts.

Signed-off-by: Dudley Du <dudl@cypress.com>
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: atkbd - fix a typo in a message
Dmitry Torokhov [Mon, 31 Dec 2012 20:42:51 +0000 (12:42 -0800)]
Input: atkbd - fix a typo in a message

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: mms114 - switch to using managed resources
Sachin Kamat [Wed, 9 Jan 2013 17:03:27 +0000 (09:03 -0800)]
Input: mms114 - switch to using managed resources

devm_* APIs are device managed and make the exit and clean up code
simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Laxman Dewangan<ldewangan@nvidia.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: tegra-kbc - remove default keymap
Laxman Dewangan [Mon, 7 Jan 2013 02:34:48 +0000 (18:34 -0800)]
Input: tegra-kbc - remove default keymap

Tegra KBC driver have the default key mapping for 16x8 configuration.
The key mapping can be provided through platform data or through DT
and the mapping varies from platform to platform, hence this default
mapping is not so useful. Remove the default mapping to reduce the code
lines of the driver.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: tegra-kbc - add support for rows/columns configuration from dt
Laxman Dewangan [Mon, 7 Jan 2013 02:32:22 +0000 (18:32 -0800)]
Input: tegra-kbc - add support for rows/columns configuration from dt

The NVIDIA's Tegra KBC has maximum 24 pins to make matrix keypad.
Any pin can be configured as row or column. The maximum column pin
can be 8 and maximum row pin can be 16.

Remove the assumption that all first 16 pins will be used as row
and remaining as columns and Add the property for configuring pins
to either row or column from DT. Update the devicetree binding
document accordingly.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: tegra-kbc - use devm_* for resource allocation
Laxman Dewangan [Mon, 7 Jan 2013 02:31:20 +0000 (18:31 -0800)]
Input: tegra-kbc - use devm_* for resource allocation

Use devm_* for memory, clock, irq, input device allocation. This reduces
code for freeing these resources.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: tegra-kbc - fix build warning
Laxman Dewangan [Mon, 7 Jan 2013 02:30:21 +0000 (18:30 -0800)]
Input: tegra-kbc - fix build warning

Fix the following build warning when building driver with CONFIG_PM_SLEEP
not selected.

tegra-kbc.c:360:13: warning: 'tegra_kbc_set_keypress_interrupt' defined but not used [-Wunused-function]

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: sysrq - allow specifying alternate reset sequence
Mathieu Poirier [Mon, 7 Jan 2013 07:23:33 +0000 (23:23 -0800)]
Input: sysrq - allow specifying alternate reset sequence

This patch adds keyreset functionality to the sysrq driver. It allows
certain button/key combinations to be used in order to trigger emergency
reboots.

Redefining the '__weak platform_sysrq_reset_seq' variable is required
to trigger the feature.  Alternatively keys can be passed to the driver
via a module parameter.

This functionality comes from the keyreset driver submitted by
Arve Hjønnevåg in the Android kernel.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: add support for Cypress PS/2 Trackpads
Dudley Du [Sat, 5 Jan 2013 08:14:22 +0000 (00:14 -0800)]
Input: add support for Cypress PS/2 Trackpads

This driver, submitted on behalf of Cypress Semiconductor Corporation and
additional contributors, provides support for the Cypress PS/2 Trackpad.

Original code contributed by Dudley Du (Cypress Semiconductor Corporation),
modified by Kamal Mostafa and Kyle Fazzari.

BugLink: http://launchpad.net/bugs/978807
Signed-off-by: Dudley Du <dudl@cypress.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kyle Fazzari <git@status.e4ward.com>
Signed-off-by: Mario Limonciello <mario_limonciello@dell.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Herton Krzesinski <herton.krzesinski@canonical.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Reviewed-by: Dudley Du <dudl@cypress.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: document that unregistering managed devices is not necessary
Dmitry Torokhov [Tue, 8 Jan 2013 17:10:31 +0000 (09:10 -0800)]
Input: document that unregistering managed devices is not necessary

Apparently some users of managed input devices are confused whether
input_unregister_device() is needed when working with them. Clarify
this in the kernel doc for devm_input_allocate_device(): in most cases
there is no need to call neither input_unregister_device() nor
input_free_device() when working with managed devices.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: increase struct ps2dev cmdbuf[] to 8 bytes
Kamal Mostafa [Wed, 21 Nov 2012 07:04:35 +0000 (23:04 -0800)]
Input: increase struct ps2dev cmdbuf[] to 8 bytes

Cypress PS/2 Trackpad (drivers/input/mouse/cypress_ps2.c) needs
this larger cmdbuf[] to handle 8-byte packet responses.

Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: wacom - use new input-mt routines
Ping Cheng [Sat, 5 Jan 2013 07:56:00 +0000 (23:56 -0800)]
Input: wacom - use new input-mt routines

This patch brings wacom driver in-sync with input-mt changes
made in release 3.7.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: wacom - prepare for syncing with input-mt changes
Ping Cheng [Sat, 5 Jan 2013 07:53:52 +0000 (23:53 -0800)]
Input: wacom - prepare for syncing with input-mt changes

Henrik added new MT routines in release 3.7. This patch is to prepare
for the use of new MT routines.

In the newly added wacom_abs_set_axis() function, the first
if-statement assigns ABS_X/Y for number of contacts less or equal
to 2. So, it is single and 2 finger touch devices. Two finger touch
devices are processed here since they will not use the updated
input_mt_init_slots(), which does not offer benefit to those devices.

input_mt_init_slots() will take care of ABS_X/Y assignment when flags
are not zero. All touch devices with more than two contacts will use
input_mt_init_slots() with non-zero flags.

The second if-statement is for all MT devices, which include two
finger touch devices.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: lm8323 - fix checking PWM interrupt status
Nickolai Zeldovich [Sat, 5 Jan 2013 22:38:17 +0000 (14:38 -0800)]
Input: lm8323 - fix checking PWM interrupt status

INT_PWM1 is already a bitmask, not the bit number, so shifting by INT_PWM1 is
incorrect.

Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: qt2160 - add support for LEDs
Javier Martin [Sat, 5 Jan 2013 00:36:46 +0000 (16:36 -0800)]
Input: qt2160 - add support for LEDs

Outputs x8..x0 of the qt2160 can have leds attached to it.
This patch handles those outputs using the generic LED
framework.

The PWM controls available in the chip are used to achieve
different levels of brightness.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: imx_keypad - add device tree support
Liu Ying [Thu, 3 Jan 2013 20:25:46 +0000 (12:25 -0800)]
Input: imx_keypad - add device tree support

This patch adds device tree support for imx keypad driver.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: adxl34x - default platform_data should not use defines from driver
Wolfram Sang [Mon, 24 Dec 2012 17:50:13 +0000 (09:50 -0800)]
Input: adxl34x - default platform_data should not use defines from driver

Only use the defines which are defined in the platform_data include
file.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: adxl34x - make platform_data include self contained
Wolfram Sang [Mon, 24 Dec 2012 17:49:55 +0000 (09:49 -0800)]
Input: adxl34x - make platform_data include self contained

Since it suggests to use defines from input.h (ABS_X, ...), also include
the file to make them available.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: adxl34x - don't set THRESH_TAP twice
Wolfram Sang [Mon, 24 Dec 2012 17:49:36 +0000 (09:49 -0800)]
Input: adxl34x - don't set THRESH_TAP twice

The datasheet doesn't say anything about writing twice, so this was
probably overlooked.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: adxl34x - consistently use read/write encapsulation
Wolfram Sang [Mon, 24 Dec 2012 17:48:55 +0000 (09:48 -0800)]
Input: adxl34x - consistently use read/write encapsulation

Don't open code the AC_READ and AC_WRITE macros.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: wm831x-on - convert to devm_input_allocate_device()
Mark Brown [Mon, 24 Dec 2012 17:45:22 +0000 (09:45 -0800)]
Input: wm831x-on - convert to devm_input_allocate_device()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: wm831x-ts - convert to devm_input_allocate_device()
Mark Brown [Mon, 24 Dec 2012 17:44:43 +0000 (09:44 -0800)]
Input: wm831x-ts - convert to devm_input_allocate_device()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: gpio_keys - defer probing if GPIO probing is deferred
Dmitry Torokhov [Mon, 24 Dec 2012 17:32:46 +0000 (09:32 -0800)]
Input: gpio_keys - defer probing if GPIO probing is deferred

If of_get_gpio_flags() returns an error (as in case when GPIO probe is
deferred) the driver would attempt to claim invalid GPIO. It should
propagate the error code up the stack instead so that the probe either
fails or will be retried later (in case of -EPROBE_DEFER).

Cc: stable@vger.kernel.org
Reported-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: gpio_keys_polled - defer probing if GPIO probing is deferred
Gabor Juhos [Sun, 23 Dec 2012 09:54:58 +0000 (01:54 -0800)]
Input: gpio_keys_polled - defer probing if GPIO probing is deferred

If GPIO probing is deferred, the driver tries to claim an invalid GPIO line
which leads to an error message like this:

  gpio-keys-polled buttons.2: unable to claim gpio 4294966779, err=-22
  gpio-keys-polled: probe of buttons.2 failed with error -22

We should make sure that error code returned by of_get_gpio_flags (including
-EPROBE_DEFER) is propagated up the stack.

Cc: stable@vger.kernel.org
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: sentelic - only report position of first finger as ST coordinates
Christophe TORDEUX [Mon, 24 Dec 2012 17:20:40 +0000 (09:20 -0800)]
Input: sentelic - only report position of first finger as ST coordinates

Report only the position of the first finger as absolute non-MT coordinates,
instead of reporting both fingers alternatively. Actual MT events are
unaffected.

This fixes horizontal and improves vertical scrolling with the touchpad.

Cc: stable@vger.kernel.org
Signed-off-by: Christophe TORDEUX <christophe@tordeux.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: stmpe-ts - report BTN_TOUCH event
Vipul Kumar Samar [Mon, 17 Dec 2012 07:10:56 +0000 (23:10 -0800)]
Input: stmpe-ts - report BTN_TOUCH event

stmpe touchscreen supports BTN_TOUCH event but doesn't report it. Add
BTN_TOUCH reporting capability to the stmpe touchscreen driver.

Signed-off-by: Vipul Kumar Samar <vipulkumar.samar@st.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoMerge branch 'next' into for-linus
Dmitry Torokhov [Mon, 17 Dec 2012 06:04:14 +0000 (22:04 -0800)]
Merge branch 'next' into for-linus

Prepare first set of updates for 3.8 merge window.

11 years agoInput: walkera0701 - fix crash on startup
Peter Popovec [Sat, 15 Dec 2012 06:57:25 +0000 (22:57 -0800)]
Input: walkera0701 - fix crash on startup

The driver's timer must be set up before enabling IRQ handler, otherwise
bad things may happen.

Reported-and-tested-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Peter Popovec <popovec@fei.tuke.sk>
CC: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agoInput: matrix-keymap - provide a proper module license
Florian Fainelli [Mon, 10 Dec 2012 20:18:20 +0000 (12:18 -0800)]
Input: matrix-keymap - provide a proper module license

The matrix-keymap module is currently lacking a proper module license,
add one so we don't have this module tainting the entire kernel. This
issue has been present since commit 1932811f (Input: matrix-keymap -
uninline and prepare for device tree support)

Signed-off-by: Florian Fainelli <florian@openwrt.org>
CC: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: gpio_keys_polled - switch to using gpio_request_one()
Dmitry Torokhov [Thu, 29 Nov 2012 17:24:08 +0000 (09:24 -0800)]
Input: gpio_keys_polled - switch to using gpio_request_one()

This saves us a few lines of code.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: gpio_keys - switch to using gpio_request_one()
Dmitry Torokhov [Thu, 29 Nov 2012 17:00:19 +0000 (09:00 -0800)]
Input: gpio_keys - switch to using gpio_request_one()

This saves us a few lines of code.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: wacom - fix touch support for Bamboo Fun CTH-461
Diego Calleja [Tue, 4 Dec 2012 05:16:11 +0000 (21:16 -0800)]
Input: wacom - fix touch support for Bamboo Fun CTH-461

Commit f393ee2b814e3291c12565000210b3cf10aa5c1d forgot to add the
touch_max property for Wacom Bamboo Fun CTH-461/S, ID 056a:00d2.

This broke the touch functionality for that device. This patch,
(done with help of Ping Cheng), adds the correct value and makes
touch work again.

Signed-off-by: Diego Calleja <diegocg@gmail.com>
Reviewed-by: Ping Cheng <pinglinux@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: xpad - add a few new VID/PID combinations
Guillermo A. Amaral [Mon, 3 Dec 2012 07:26:18 +0000 (23:26 -0800)]
Input: xpad - add a few new VID/PID combinations

This adds VID/PID combinations for MadCatz, PDP and PowerA (new).

Removed Pelican 'TSZ' Wired Xbox 360 Controller since it's clashing with Edge
wireless Controller and I failed to confirm the PID.

Signed-off-by: "Guillermo A. Amaral B." <g@maral.me>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: xpad - minor formatting fixes
Guillermo A. Amaral [Mon, 3 Dec 2012 07:26:11 +0000 (23:26 -0800)]
Input: xpad - minor formatting fixes

Fixed a few minor coding style issues in xpad driver.

Signed-off-by: "Guillermo A. Amaral B." <g@maral.me>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: gpio-keys-polled - honor 'autorepeat' setting in platform data
Alexander Shiyan [Thu, 29 Nov 2012 16:57:17 +0000 (08:57 -0800)]
Input: gpio-keys-polled - honor 'autorepeat' setting in platform data

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: tca8418-keypad - switch to using managed resources
Dmitry Torokhov [Mon, 5 Nov 2012 19:13:11 +0000 (11:13 -0800)]
Input: tca8418-keypad - switch to using managed resources

Let's switch to using devm_*() interfaces to manage our resources,
thus will simplify error unwinding a bit.

Reviewed-by: Alban Bedel <alban.bedel@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: tca8418_keypad - increase severity of failures in probe()
Dmitry Torokhov [Wed, 14 Nov 2012 16:20:21 +0000 (08:20 -0800)]
Input: tca8418_keypad - increase severity of failures in probe()

Failures to build a keymap, request an IRQ, or register input device are
fatal for the driver, therefore the messages should have "error" severity
instead of "debug".

Reviewed-by: Alban Bedel <alban.bedel@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: tca8418_keypad - move device ID tables closer to where they are used
Dmitry Torokhov [Wed, 14 Nov 2012 16:16:15 +0000 (08:16 -0800)]
Input: tca8418_keypad - move device ID tables closer to where they are used

This matches structure of most other input drivers.

Reviewed-by: Alban Bedel <alban.bedel@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: tca8418_keypad - use dev_get_platdata() to retrieve platform data
Dmitry Torokhov [Wed, 14 Nov 2012 16:12:05 +0000 (08:12 -0800)]
Input: tca8418_keypad - use dev_get_platdata() to retrieve platform data

We need to use proper accessor functions instead of directly poking into
various structures.

Reviewed-by: Alban Bedel <alban.bedel@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: tca8418_keypad - use a temporary variable for parent device
Dmitry Torokhov [Wed, 14 Nov 2012 16:06:44 +0000 (08:06 -0800)]
Input: tca8418_keypad - use a temporary variable for parent device

Use a temporary variable for our parent device (coming from I2C client
structure); we'll be also using it during conversion to managed resources.

Reviewed-by: Alban Bedel <alban.bedel@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: tca8418_keypad - add support for shared interrupt
Alban Bedel [Thu, 8 Nov 2012 16:57:55 +0000 (08:57 -0800)]
Input: tca8418_keypad - add support for shared interrupt

Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: tca8418_keypad - add support for device tree bindings
Alban Bedel [Mon, 5 Nov 2012 18:55:25 +0000 (10:55 -0800)]
Input: tca8418_keypad - add support for device tree bindings

Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: remove Compaq iPAQ H3600 (Bitsy) touchscreen driver
Alexander Shiyan [Mon, 26 Nov 2012 08:06:36 +0000 (00:06 -0800)]
Input: remove Compaq iPAQ H3600 (Bitsy) touchscreen driver

The kernel does not contain the symbol SA1100_BITSY so the driver
is never compiled and can be removed safely.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: bu21013_ts - add support for Device Tree booting
Lee Jones [Fri, 28 Sep 2012 13:35:43 +0000 (14:35 +0100)]
Input: bu21013_ts - add support for Device Tree booting

Now we can register the BU21013_ts touch screen when booting with Device
Tree enabled. Here we parse all the necessary components previously
expected to be passed from platform data.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: bu21013_ts - move GPIO init and exit functions into the driver
Lee Jones [Fri, 28 Sep 2012 09:29:07 +0000 (10:29 +0100)]
Input: bu21013_ts - move GPIO init and exit functions into the driver

These GPIO init and exit functions have no place in platform data, they
should be part of the driver instead,

Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: bu21013_ts - request regulator that actually exists
Lee Jones [Thu, 22 Nov 2012 03:11:46 +0000 (19:11 -0800)]
Input: bu21013_ts - request regulator that actually exists

Currently the BU21013 Touch Screen driver requests a regulator by the
name of 'V-TOUCH', which doesn't exist anywhere in the kernel. The
correct name, as referenced in platform regulator code is 'avdd'. Here,
when we request a regulator, we use the correct name instead.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoARM: ux500: Strip out duplicate touch screen platform information
Lee Jones [Thu, 27 Sep 2012 10:47:43 +0000 (11:47 +0100)]
ARM: ux500: Strip out duplicate touch screen platform information

We're currently carrying two 'struct bu21013_platform_device's which
are identical for no apparent reason. Here we remove the extra burden
and apply the same information to the two different instances of the
bu21012_tp driver registration.

[Dmitry Torokhov: picked it up to (hopefully) reduce merge conflict with
 bu21013_ts update that follows.]

Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: gpio_keys - disable hardware on suspend
Jonas Aaberg [Sat, 24 Nov 2012 08:10:29 +0000 (00:10 -0800)]
Input: gpio_keys - disable hardware on suspend

Disable hardware if active when suspending if the hw can not
wake the system from suspend.

[Dmitry Torokhov: use input_dev->users instead of a separate flag]

Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Signed-off-by: Philippe Langlais <philippe.langlais@linaro.org>
Reviewed-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: gpio_keys - report initial state when opening the device
Dmitry Torokhov [Sat, 24 Nov 2012 09:22:43 +0000 (01:22 -0800)]
Input: gpio_keys - report initial state when opening the device

Instead of reporting the initial stage when the device is registered we
should do it when the device is opened (so there are users).

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: samsung-keypad - switch to using managed resources
Sachin Kamat [Wed, 28 Nov 2012 06:34:38 +0000 (22:34 -0800)]
Input: samsung-keypad - switch to using managed resources

devm_* functions are device managed and make error handling and code
simpler. While at it also fix error exit paths.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: spear-keyboard - add clk_{un}prepare() support
Vipul Kumar Samar [Mon, 26 Nov 2012 16:50:08 +0000 (08:50 -0800)]
Input: spear-keyboard - add clk_{un}prepare() support

clk_{un}prepare is mandatory for platforms using common clock framework.
Because for SPEAr we don't do anything in clk_{un}prepare() calls, just
call them once in probe/remove.

Signed-off-by: Vipul Kumar Samar <vipulkumar.samar@st.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: imx_keypad - only set enabled columns to open-drain
Andreas Pretzsch [Sun, 25 Nov 2012 07:31:38 +0000 (23:31 -0800)]
Input: imx_keypad - only set enabled columns to open-drain

In imx_keypad_inhibit(), all 8 columns were set to open-drain, in
contrast to the rest of the driver, where only the enabled columns
are modified/used.

Contrary to the normal expectation, this also affects column I/Os not
even mapped via IOMUX to the KPP hardware module but used as a GPIO.
Therefore only init enabled columns to open-drain and leave all others
with their default reset value of 0, i.e. totem-pole.

Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: HIL - do not call tasklet_disable right before tasklet_kill
Xiaotian Feng [Sun, 25 Nov 2012 07:08:54 +0000 (23:08 -0800)]
Input: HIL - do not call tasklet_disable right before tasklet_kill

We do not need to call tasklet_disable() before calling tasklet_kill() if
taskelt does not reschedult itself.

Signed-off-by: Xiaotian Feng <dannyfeng@tencent.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: twl4030-pwrbutton - switch to using TWL_MODULE_PM_MASTER define
Peter Ujfalusi [Wed, 14 Nov 2012 18:10:49 +0000 (10:10 -0800)]
Input: twl4030-pwrbutton - switch to using TWL_MODULE_PM_MASTER define

To facilitate upcoming cleanup in twl stack switch from using
TWL4030_MODULE_PM_MASTER define to usingTWL_MODULE_PM_MASTER.
There are no functional changes.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: stmpe-keypad - add support for Device Tree bindings
Dmitry Torokhov [Wed, 14 Nov 2012 16:55:21 +0000 (08:55 -0800)]
Input: stmpe-keypad - add support for Device Tree bindings

This patch allows the STMPE driver to be successfully probed and
initialised when Device Tree support is enabled. Besides the usual
platform data changes, we also separate the process of filling in
the 'in use' pin bitmap, as we have to extract the information from
Device Tree in the DT boot case.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: remove use of __devexit
Bill Pemberton [Sat, 24 Nov 2012 05:50:47 +0000 (21:50 -0800)]
Input: remove use of __devexit

CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: remove use of __devinit
Bill Pemberton [Sat, 24 Nov 2012 05:38:25 +0000 (21:38 -0800)]
Input: remove use of __devinit

CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
12 years agoInput: remove use of __devinitconst
Bill Pemberton [Sat, 24 Nov 2012 05:31:00 +0000 (21:31 -0800)]
Input: remove use of __devinitconst

CONFIG_HOTPLUG is going away as an option so __devinitconst is no
longer needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>