Commit graph

202 commits

Author SHA1 Message Date
Stefan Agner
4d741f3dd1 Input: snvs_pwrkey - allow selecting driver for i.MX 7D
The i.MX SNVS Power Key driver supports the i.MX 7D SoC family too.
Allow to enable the i.MX SNVS Power Key driver even if only i.MX 7D
SoC is selected.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2019-01-28 11:24:18 -08:00
Enric Balletbo i Serra
413c94469a
Input: keyboard: Fix ChromeOS EC keyboard help message.
The cros-ec I2C and SPI transport drivers have been moved from MFD
subsystem to platform/chrome, at the same time, the config symbol
has been renamed and lost the MFD_ prefix So, update the help message
accordingly.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Benson Leung <bleung@chromium.org>
2018-07-03 12:40:44 -07:00
Chen Zhong
3e9f0b3e2b input: Add MediaTek PMIC keys support
This patch add support to handle MediaTek PMIC MT6397/MT6323 key
interrupts including pwrkey and homekey, also add setting for
long press key shutdown behavior.

Signed-off-by: Chen Zhong <chen.zhong@mediatek.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2018-04-16 15:16:11 +01:00
Arnd Bergmann
01b7649598 input: keyboard: remove bf54x driver
The blackfin architecture is getting removed, so this
driver is now obsolete.

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-03-26 15:56:58 +02:00
Linus Walleij
131b3de701 Input: add D-Link DIR-685 touchkeys driver
This adds support for the D-Link DIR-685 touchkeys found in the
router with this name.

The vendor code calles this a "touchpad" but we are registering
it here under its real name.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-06-05 15:35:32 -07:00
Jaechul Lee
72d1f2346d Input: tm2-touchkey - add touchkey driver support for TM2
This patch adds support for the TM2 touch key and led functionality.

The driver interfaces with userspace through an input device and reports
KEY_PHONE and KEY_BACK event types. LED brightness can be controlled by
"/sys/class/leds/tm2-touchkey/brightness".

Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Andi Shyti <andi.shyti@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Tested-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-01-18 14:50:23 -08:00
Alexandre Belloni
680772647d Input: add ADC resistor ladder driver
A common way of multiplexing buttons on a single input in cheap devices is
to use a resistor ladder on an ADC. This driver supports that configuration
by polling an ADC channel provided by IIO.

Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-08-29 20:00:58 -07:00
Simon Horman
5186b8c41a Input: sh_keysc - remove dependency on SUPERH
A dependency on ARCH_SHMOBILE seems to be the best option for sh_keysc:

* For Super H based SoCs: sh_keysc is used on SH_MIGOR, SH_ECOVEC, SH_KFR2R09,
  SH_7722_SOLUTION_ENGINE, and SH_7724_SOLUTION_ENGINE, which depend on
  either CPU_SUBTYPE_SH7722 or CPU_SUBTYPE_SH7724, and both select
  ARCH_SHMOBILE.

* For ARM Based SoCs: Since the removal of legacy (non-multiplatform) support
  this driver has not been used by any Renesas ARM based SoCs. The Renesas
  ARM based SoCs currently select ARCH_SHMOBILE, however, it is planned
  that this will no longer be the case.

This is part of an ongoing process to migrate from ARCH_SHMOBILE to
ARCH_RENESAS the motivation for which being that RENESAS seems to be a more
appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-03-04 11:32:12 -08:00
Javier Martinez Canillas
aaa59e0911 Input: goldfish - allow compile the driver with COMPILE_TEST
The driver depends on GOLDFISH but there isn't a build dependency
so it's a good idea to allow the driver to be built even if that
option is disabled, if the COMPILE_TEST option is enabled.

That way, the driver can be built with a config generated by make
allyesconfig and can be checked if a patch would break the build.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-10-02 11:44:16 -07:00
Linus Torvalds
51e771c0d2 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input subsystem updates from Dmitry Torokhov:
 "Drivers, drivers, drivers...  No interesting input core changes this
  time"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (74 commits)
  Input: elan_i2c - use iap_version to get firmware information
  Input: max8997_haptic - fix module alias
  Input: elan_i2c - fix typos for validpage_count
  Input: psmouse - add small delay for IBM trackpoint pass-through mode
  Input: synaptics - fix handling of disabling gesture mode
  Input: elan_i2c - enable ELAN0100 acpi panels
  Input: gpio-keys - report error when disabling unsupported key
  Input: sur40 - fix error return code
  Input: sentelic - silence some underflow warnings
  Input: zhenhua - switch to using bitrev8()
  Input: cros_ec_keyb - replace KEYBOARD_CROS_EC dependency
  Input: cap11xx - add LED support
  Input: elants_i2c - fix for devm_gpiod_get API change
  Input: elan_i2c - enable asynchronous probing
  Input: elants_i2c - enable asynchronous probing
  Input: elants_i2c - wire up regulator support
  Input: do not emit unneeded EV_SYN when suspending
  Input: elants_i2c - disable idle mode before updating firmware
  MAINTAINERS: Add maintainer for atmel_mxt_ts
  Input: atmel_mxt_ts - remove warning on zero T44 count
  ...
2015-09-04 12:02:11 -07:00
Javier Martinez Canillas
95ecdc2549 Input: cros_ec_keyb - replace KEYBOARD_CROS_EC dependency
The ChromeOS EC keyboard driver config depends on CROS_EC_PROTO but
MFD_CROS_EC selects CROS_EC_PROTO instead. Mixing select and depends
on is bad practice as it may lead to circular Kconfig dependencies.

Since the platform device that is matched with the keyboard driver
is registered by the ChromeOS EC mfd driver, KEYBOARD_CROS_EC really
should depend on MFD_CROS_EC. And because this config option selects
CROS_EC_PROTO, that dependency is met as well. So make the driver
to depend on MFD_CROS_EC instead of CROS_EC_PROTO.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-19 14:24:36 -07:00
Geert Uytterhoeven
7d6548abcf Input: Allow compile test of GPIO consumers if !GPIOLIB
The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is
not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer
functionality only, can still be compiled if GPIOLIB is not enabled.

Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where
appropriate.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-08-04 11:45:45 -07:00
Robin Gong
d3dc6e2322 input: keyboard: imx: add snvs power key driver
add snvs power key driver.
It work in imx chips after i.mx6sx

ON/OFF key used power on/off whole system.
This driver make it wakeup from suspend state when short press
ON/OFF key.

Long time press will trig SNVS power off chip without software
intervention.

Signed-off-by: Robin Gong <b38343@freescale.com>
Signed-off-by: Frank Li <Frank.Li@freescale.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2015-07-15 10:17:06 +08:00
Linus Torvalds
14738e0331 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input subsystem updates from Dmitry Torokhov:
 "Thanks to Samuel Thibault input device (keyboard) LEDs are no longer
  hardwired within the input core but use LED subsystem and so allow use
  of different triggers; Hans de Goede did a large update for the ALPS
  touchpad driver; we have new TI drv2665 haptics driver and DA9063
  OnKey driver, and host of other drivers got various fixes"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (55 commits)
  Input: pixcir_i2c_ts - fix receive error
  MAINTAINERS: remove non existent input mt git tree
  Input: improve usage of gpiod API
  tty/vt/keyboard: define LED triggers for VT keyboard lock states
  tty/vt/keyboard: define LED triggers for VT LED states
  Input: export LEDs as class devices in sysfs
  Input: cyttsp4 - use swap() in cyttsp4_get_touch()
  Input: goodix - do not explicitly set evbits in input device
  Input: goodix - export id and version read from device
  Input: goodix - fix variable length array warning
  Input: goodix - fix alignment issues
  Input: add OnKey driver for DA9063 MFD part
  Input: elan_i2c - add product IDs FW names
  Input: elan_i2c - add support for multi IC type and iap format
  Input: focaltech - report finger width to userspace
  tty: remove platform_sysrq_reset_seq
  Input: synaptics_i2c - use proper boolean values
  Input: psmouse - use true instead of 1 for boolean values
  Input: cyapa - fix a few typos in comments
  Input: stmpe-ts - enforce device tree only mode
  ...
2015-06-24 19:56:58 -07:00
Javier Martinez Canillas
062476f24a mfd: cros_ec: Move protocol helpers out of the MFD driver
The MFD driver should only have the logic to instantiate its child devices
and setup any shared resources that will be used by the subdevices drivers.

The cros_ec MFD is more complex than expected since it also has helpers to
communicate with the EC. So the driver will only get more bigger as other
protocols are supported in the future. So move the communication protocol
helpers to its own driver as drivers/platform/chrome/cros_ec_proto.c.

Suggested-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-06-15 13:18:20 +01:00
Evgeniy Dushistov
68aeee98ee Input: max7359_keypad - switch to using matrix_keypad_build_keymap()
max7359_build_keycode() does the same thing as matrix_keypad_build_keymap(),
but the latter can also handle DT bindings.

Tested on beagleboard-xm.

Signed-off-by: Evgeniy A. Dushistov <dushistov@mail.ru>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-05-15 15:58:40 -07:00
Linus Walleij
d7535ffa42 Input: driver for microcontroller keys on the iPaq h3xxx
This adds a key input driver for the keys found on the h3xxx
iPAQ series.

Based on a driver from handhelds.org 2.6.21 kernel, written
by Alessandro GARDICH.

Signed-off-by: Alessandro GARDICH <gremlin@gremlin.it>
Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-03-06 11:25:31 -08:00
Scott Branden
0c7e67a928 Input: add driver for Broadcom keypad controller
Broadcom Keypad controller is used to interface a SoC with a matrix-type
keypad device. The keypad controller supports multiple row and column
lines. A key can be placed at each intersection of a unique row and a
unique column. The keypad controller can sense a key-press and key-release
and report the event using an interrupt to the CPU.

Reviewed-by: Ray Jui <rjui@broadcom.com>
Signed-off-by: Scott Branden <sbranden@broadcom.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2015-03-02 15:16:52 -08:00
Hans de Goede
af6a5af8e8 Input: add new sun4i-lradc-keys driver
Allwinnner sunxi SoCs have a low resolution adc (called lradc) which is
specifically designed to have various (tablet) keys (ie home, back, search,
etc). attached to it using a resistor network. This adds a driver for this.

There are 2 channels, currently this driver only supports chan0 since there
are no boards known to use chan1.

This has been tested on an olimex a10s-olinuxino-micro, a13-olinuxino, and
a20-olinuxino-micro.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-12-21 18:59:21 -08:00
Linus Walleij
a4164863e1 Input: stmpe - enforce device tree only mode
The STMPE keypad controller is only used with device tree configured
systems, so force the configuration to come from device tree only, and now
actually get the rows and cols from the device tree too.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-12-15 21:46:12 -08:00
Matt Ranostay
c77fd0a42b Input: rename cap1106 driver to cap11xx
There are several devices in cap11xx family besides cap1106. The driver can
be made to support all of them, so let's give it more generic name.

Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Reviewed-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-11-02 00:09:10 -07:00
Dmitry Torokhov
b9f12a5d97 Linux 3.16-rc6
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJTzJFGAAoJEHm+PkMAQRiGNzQH/087gQch5K+A2HKvPzjUXq57
 G82DJHLONMMq8+NY3Vqhp8g2V8zRbXGJEvMJMsyuscO37Vo7ADcrYo8lqY9w5bIl
 h+Zarhkqz0rqRs2SfMMIVzdd2W7MzL+lqj3GplGPxHztw0+qk7PRKILx6eRppGaH
 JaD4NfkD5+1vfve/2d1ze9D5pCiw6PFNzjesKZxScQhNhIyLdRamfSTY4r9XeURo
 CxpwjphEYfvAcgc39mwzEHPHyKSqULu0By6R8FXQpJ9QjVtzcGEiF+cPqGncpZOR
 5ZSyU5e1CpBl9w8o6Lm9ewXmaCSnBU/VFrOwWvZrXfokZedXBOz7KdShU93XFjU=
 =0VJM
 -----END PGP SIGNATURE-----

Merge tag 'v3.16-rc6' into next

Merge with mainline to bring in changes to MFD to allow merging
ipaq-micro-ts driver.
2014-07-24 12:36:56 -07:00
Daniel Mack
128bb95deb Input: add driver for Microchip's CAP1106
This patch adds a driver for Microchips CAP1106, an I2C driven, 6-channel
capacitive touch sensor.

For now, only the capacitive buttons are supported, and no specific
settings that can be tweaked for individual channels, except for the
device-wide sensitivity gain. The defaults seem to work just fine out of
the box, so I'll leave configurable parameters for someone who's in need
of them and who can actually measure the impact. All registers are
prepared, however. Many of them are just not used for now.

The implementation does not make any attempt to be compatible to platform
data driven boards, but fully depends on CONFIG_OF.

Power management functions are also left for volounteers with the ability
to actually test them.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-18 10:53:29 -07:00
Dmitry Torokhov
a292241ccc Merge branch 'next' into for-linus
Prepare input updates for 3.16.
2014-06-07 23:24:07 -07:00
Joachim Eastwood
61721c88b8 Input: omap-keypad - remove platform data support
This is unused since all users (OMAP4/5) are DT only.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-05-29 00:33:32 -07:00
Gabriel FERNANDEZ
062589b139 Input: add st-keyscan driver
This patch adds ST Keyscan driver to use the keypad hw a subset of ST
boards provide. Specific board setup will be put in the given dt.

Signed-off-by: Gabriel Fernandez <gabriel.fernandez@linaro.org>
Signed-off-by: Giuseppe Condorelli <giuseppe.condorelli@st.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-05-14 16:39:46 -07:00
Arnd Bergmann
0a4ac2ea27 Input: fix ps2/serio module dependency
The ps2 mouse and keyboard drivers use the "serio" framework that they
correctly select in Kconfig, and that in turn depends on the i8042 driver,
which is also allowed to be disabled for architectures that don't have an
i8042.

However, Kconfig also allows i8042 to be built as a module while
the serio framework is built-in, which causes this link error:

drivers/built-in.o: In function `ps2_begin_command':
:(.text+0x26b6cc): undefined reference to `i8042_check_port_owner'
:(.text+0x26b6d4): undefined reference to `i8042_lock_chip'
drivers/built-in.o: In function `ps2_end_command':
:(.text+0x26b734): undefined reference to `i8042_check_port_owner'
:(.text+0x26b73c): undefined reference to `i8042_unlock_chip'

On x86, a specific 'select SERIO_I8042' takes care of it, but
not on the other architecture that potentially have a i8042.

This patch changes the Kconfig logic to ensure that whenever
there is an i8042, it does get used for the serio driver, avoiding
the link error above.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-05-12 12:33:52 -07:00
Alexander Shiyan
e70f18e1c7 Input: add new driver for ARM CLPS711X keypad
This patch adds a new driver for keypad for Cirrus Logic CLPS711X CPUs.
Target CPU contain keyboard interface which can scan 8 column lines,
so we can read row GPIOs to read status and determine asserted state.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-03-30 13:24:55 -07:00
Arnd Bergmann
e545ef39e0 Input: remove obsolete tnetv107x drivers
The tnetv107x platform is getting removed, so the touchscreen
and keypad drivers for this platform will no longer be needed
either.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Acked-by: Kevin Hilman <khilman@linaro.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-03-28 01:10:11 -07:00
Laurent Pinchart
54f05e9513 Input: sh_keysc - restrict non-COMPILE_TEST compilation
Hardware supported by the driver is only found on SUPERH or
ARCH_SHMOBILE platforms. Restrict non-COMPILE_TEST compilation to them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-05 12:51:21 -08:00
Laurent Pinchart
e4a42f655f Input: sh_keysc - enable the driver on all ARM platforms
Renesas ARM platforms are transitioning from single-platform to
multi-platform kernels using the new ARCH_SHMOBILE_MULTI. Make the
driver available on all ARM platforms to enable it on both ARCH_SHMOBILE
and ARCH_SHMOBILE_MULTI, and increase build testing coverage with
COMPILE_TEST.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-10-31 08:46:08 -07:00
Tom Gundersen
bcd2623073 Input: allow deselecting serio drivers even without CONFIG_EXPERT
There is plenty of consumer hardware (e.g., mac books) that does not use AT
keyboards or PS/2 mice. It therefore makes sense for distro kernels to
build the related drivers as modules to avoid loading them on hardware that
does not need them. As such, these options should no longer be protected by
EXPERT.

Moreover, building these drivers as modules gets rid of the following ugly
error during boot:

[    2.337745] i8042: PNP: No PS/2 controller found. Probing ports directly.
[    3.439537] i8042: No controller found

Signed-off-by: Tom Gundersen <teg@jklm.no>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-10-31 08:46:06 -07:00
Martin Schwidefsky
0244ad004a Remove GENERIC_HARDIRQ config option
After the last architecture switched to generic hard irqs the config
options HAVE_GENERIC_HARDIRQS & GENERIC_HARDIRQS and the related code
for !CONFIG_GENERIC_HARDIRQS can be removed.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-09-13 15:09:52 +02:00
Dmitry Torokhov
27eb2c4b3d Merge branch 'next' into for-linus
Prepare first set of updates for 3.11 merge window.
2013-07-02 09:01:31 -07:00
Dmitry Torokhov
31881d74b6 Merge branch 'for-next' of git://github.com/rydberg/linux into next
Pull in changes from Henrik: "a trivial MT documentation fix".
2013-06-27 23:00:25 -07:00
Chao Xie
0a085a9482 Input: pxa27x-keypad - use matrix_keymap for matrix keys
pxa27x-keypad includes matrix keys. Make use of matrix_keymap
for the matrix keys.

Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-06-18 22:56:51 -07:00
Ben Hutchings
150e5928d6 Input: add missing dependencies on CONFIG_HAS_IOMEM
Several drivers don't build on s390 with CONFIG_PCI disabled as
they require MMIO functions.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable@vger.kernel.org # 3.9
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-06-10 21:37:57 -07:00
Daniel Tang
fc4f314618 Input: add TI-Nspire keypad support
This is a driver for the keypads found on the TI-Nspire series calculators.

Signed-off-by: Daniel Tang <dt.tangr@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-06-04 09:17:25 -07:00
Linus Torvalds
5647ac0ad4 Removal of GENERIC_GPIO for v3.10
GENERIC_GPIO now synonymous with GPIOLIB. There are no longer any valid
 cases for enableing GENERIC_GPIO without GPIOLIB, even though it is
 possible to do so which has been causing confusion and breakage. This
 branch does the work to completely eliminate GENERIC_GPIO.
 
 However, it is not trivial to just create a branch to remove it. Over
 the course of the v3.9 cycle more code referencing GENERIC_GPIO has been
 added to linux-next that conflicts with this branch. The following must
 be done to resolve the conflicts when merging this branch into mainline:
 
 * "git grep CONFIG_GENERIC_GPIO" should return 0 hits. Matches should be
   replaced with CONFIG_GPIOLIB
 * "git grep '\bGENERIC_GPIO\b'" should return 1 hit in the Chinese
   documentation.
 * Selectors of GENERIC_GPIO should be turned into selectors of GPIOLIB
 * definitions of the option in architecture Kconfig code should be deleted.
 
 Stephen has 3 merge fixup patches[1] that do the above. They are currently
 applicable on mainline as of May 2nd.
 
 [1] http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg428056.html
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRifUnAAoJEEFnBt12D9kBs2YP/0U6+ia+xYvkVaJc28PDVIzn
 OReZNcJOYU8D5voxz0voaRD0EdcPwjbMu9Kp9aXMHlk4VxevF+8jCc/us0bIjtO1
 VcB5VmSCIhMhxdnBlum11Mk7Vr5MCweyl9NBsypnPt8cl4obMBZHf2yzoodFktNb
 wtyYlOb6FALtc6iDbOO6dG3w9F7FAOLvskUFzdv89m8mupTsBu9jw9NqFDbJHOex
 rxq0Sdd+kWF/nkJVcV5Y6jIdletRlhpipefMJ9diexreHvwqh+c4kJEYZaXgB5+m
 ha95cPbReK1d+RqzM3A8d4irzSVSmq4k7ijI6QkFOr48+AH7XsgKv5so885LKzMN
 IIXg2Phm9i0H8+ecEvhcc4oIYBHJiEKK54Y0qUD9dqbFoDGPTCSqMHdSSMbpAY+J
 bIIXlVzj1En3PPNUJLPt8q8Qz6WxCT9mDST3QSGYnD4o90HT+1R9j92RxGL6McOq
 rUOyJDwmzFvpBvKK4raGdOU435M+ps2NPKKNIRaIGQPPY9rM1kN4YqvhXukEsC9L
 3a3+3cQLh7iKxBHncxeQsJfethP1CPkJnzvF9r+ZZLf2rcPH4pbQIE2uO0XnX/nd
 5/DKi0nGgAJ//GMMzdo3RiOA5zGFjIZ/KMvfhQldpP6qFJRhqdGi6FPlAcwr1z1n
 YnCByPwwlvfC4LTXFOGL
 =xodc
 -----END PGP SIGNATURE-----

Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux

Pull removal of GENERIC_GPIO from Grant Likely:
 "GENERIC_GPIO now synonymous with GPIOLIB.  There are no longer any
  valid cases for enableing GENERIC_GPIO without GPIOLIB, even though it
  is possible to do so which has been causing confusion and breakage.
  This branch does the work to completely eliminate GENERIC_GPIO."

* tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux:
  gpio: update gpio Chinese documentation
  Remove GENERIC_GPIO config option
  Convert selectors of GENERIC_GPIO to GPIOLIB
  blackfin: force use of gpiolib
  m68k: coldfire: use gpiolib
  mips: pnx833x: remove requirement for GENERIC_GPIO
  openrisc: default GENERIC_GPIO to false
  avr32: default GENERIC_GPIO to false
  xtensa: remove explicit selection of GENERIC_GPIO
  sh: replace CONFIG_GENERIC_GPIO by CONFIG_GPIOLIB
  powerpc: remove redundant GENERIC_GPIO selection
  unicore32: default GENERIC_GPIO to false
  unicore32: remove unneeded select GENERIC_GPIO
  arm: plat-orion: use GPIO driver on CONFIG_GPIOLIB
  arm: remove redundant GENERIC_GPIO selection
  mips: alchemy: require gpiolib
  mips: txx9: change GENERIC_GPIO to GPIOLIB
  mips: loongson: use GPIO driver on CONFIG_GPIOLIB
  mips: remove redundant GENERIC_GPIO select
2013-05-09 09:59:16 -07:00
Alexandre Courbot
76ec9d18b8 Convert selectors of GENERIC_GPIO to GPIOLIB
GENERIC_GPIO is now equivalent to GPIOLIB and features that depended on
GENERIC_GPIO can now depend on GPIOLIB to allow removal of this option.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
2013-04-16 18:47:14 +09:00
Simon Glass
6af6dc2d2a input: Add ChromeOS EC keyboard driver
Use the key-matrix layer to interpret key scan information from the EC
and inject input based on the FDT-supplied key map. This driver registers
itself with the ChromeOS EC driver to perform communications.

The matrix-keypad FDT binding is used with a small addition to control
ghosting.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Luigi Semenzato <semenzato@chromium.org>
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-05 11:20:13 +02:00
Linus Torvalds
c6699b58f4 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov:
 "Two new touchpad drivers - Cypress APA I2C Trackpad and Cypress PS/2
  touchpad and a big update to ALPS driver from Kevin Cernekee that adds
  support for "Rushmore" touchpads and paves way for adding support for
  "Dolphin" touchpads.

  There is also a new input driver for Goldfish emulator and also
  Android keyreset driver was folded into SysRq code.

  A few more drivers were updated with device tree bindings and others
  got some small cleanups and fixes."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (55 commits)
  Input: cyttsp-spi - remove duplicate MODULE_ALIAS()
  Input: tsc2005 - add MODULE_ALIAS
  Input: tegra-kbc - require CONFIG_OF, remove platform data
  Input: synaptics - initialize pointer emulation usage
  Input: MT - do not apply filtering on emulated events
  Input: bma150 - make some defines public and fix some comments
  Input: bma150 - fix checking pm_runtime_get_sync() return value
  Input: ALPS - enable trackstick on Rushmore touchpads
  Input: ALPS - add support for "Rushmore" touchpads
  Input: ALPS - make the V3 packet field decoder "pluggable"
  Input: ALPS - move pixel and bitmap info into alps_data struct
  Input: ALPS - fix command mode check
  Input: ALPS - rework detection of Pinnacle AGx touchpads
  Input: ALPS - move {addr,nibble}_command settings into alps_set_defaults()
  Input: ALPS - use function pointers for different protocol handlers
  Input: ALPS - rework detection sequence
  Input: ALPS - introduce helper function for repeated commands
  Input: ALPS - move alps_get_model() down below hw_init code
  Input: ALPS - copy "model" info into alps_data struct
  Input: ALPS - document the alps.h data structures
  ...
2013-02-20 11:00:43 -08:00
Stephen Warren
9eee07d39f 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>
2013-02-15 18:52:58 -08:00
Heiko Carstens
d722260d23 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>
2013-02-13 20:21:07 -08:00
Brian Swetland
6f2ac009f2 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>
2013-01-25 00:06:43 -08:00
Linus Torvalds
31564cbd77 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull second round of input updates from Dmitry Torokhov:
 "As usual, there are a couple of new drivers, input core now supports
  managed input devices (devres), a slew of drivers now have device tree
  support and a bunch of fixes and cleanups."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (71 commits)
  Input: walkera0701 - fix crash on startup
  Input: matrix-keymap - provide a proper module license
  Input: gpio_keys_polled - switch to using gpio_request_one()
  Input: gpio_keys - switch to using gpio_request_one()
  Input: wacom - fix touch support for Bamboo Fun CTH-461
  Input: xpad - add a few new VID/PID combinations
  Input: xpad - minor formatting fixes
  Input: gpio-keys-polled - honor 'autorepeat' setting in platform data
  Input: tca8418-keypad - switch to using managed resources
  Input: tca8418_keypad - increase severity of failures in probe()
  Input: tca8418_keypad - move device ID tables closer to where they are used
  Input: tca8418_keypad - use dev_get_platdata() to retrieve platform data
  Input: tca8418_keypad - use a temporary variable for parent device
  Input: tca8418_keypad - add support for shared interrupt
  Input: tca8418_keypad - add support for device tree bindings
  Input: remove Compaq iPAQ H3600 (Bitsy) touchscreen driver
  Input: bu21013_ts - add support for Device Tree booting
  Input: bu21013_ts - move GPIO init and exit functions into the driver
  Input: bu21013_ts - request regulator that actually exists
  ARM: ux500: Strip out duplicate touch screen platform information
  ...
2012-12-18 12:46:37 -08:00
Tony Lindgren
770b6cb4d2 ARM: OMAP: Fix drivers to depend on omap for internal devices
These devices are not available on other architectures, so
let's limit them to omap.

If the driver subsystem maintainers want to build test
system wide changes without building for each target,
it's easy to carry a test patch that just strips out the
depends entries from Kconfig files.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-12-16 15:23:37 -08:00
Dmitry Torokhov
fa8e2458ec Linux 3.7-rc4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJQlr0MAAoJEHm+PkMAQRiGLVQH/171fUorGn+u2k7dNhSWJXHB
 pPy6MbZhuBWepgRZGS0ffiC5tBvQaf9iK9Fh/9aqrDDw2aELk0CLPqQcfAUF/Jzf
 USPdBSIMNikgZtlWhabxuj/zKdaw8UuiJpCf3rMyIRmjQgmZyw/53TEqF54xTv0I
 Y4Y21vTSVXilQwvwYvcsCEBFrTZqXjLWQ60Hk+QRS9GV7a9m2LFcdiPOtRv17gbd
 CBDuiMHN9R04l2bB+5WHHsu+TNNf5uy3wAgEskDTftneXWjW44R4UR8O0rQh1ezQ
 Pa5WpCyJRRG8UOtPKTS6LEbljBwLLIoVI2JRoJrWoy3OkT63wyowFXyLGWCCrHY=
 =qAGi
 -----END PGP SIGNATURE-----

Merge tag 'v3.7-rc4' into next to sync up Wacom bits

Linux 3.7-rc4
2012-11-08 08:51:52 -08:00
Olof Johansson
f75ed2d395 This patchset will:
- Move all remaining headers out of arch/arm/plat-nomadik/include/plat
   out to e.g. include/linux/platform_data
 - Delete arch/arm/plat-nomadik
 - Convert Nomadik and Ux500 to SPARSE_IRQ
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJQl4K6AAoJEEEQszewGV1zww0P/3YnFr91bhuwHsqhz3+W31Mi
 RFXk74d7G7vyNZ8817zl0YcR22tByaIldnoj0sasqttqOChE0WbJBl86aDpoeKYo
 dbZL3d8ZndE0mXomyV6nd0d5H7Q2/NBlQwCTEr4KvGlcSHIQ4MEW8aZx64m63ReP
 YytAPNU36GrUBVPgtDNj8QwCTW84HEvwTte/W5t8iUPt40aeWL4BrYg19sIFtz9r
 FhaXUkZBZSfsXg7ZDtkAd2mMpqJusIX0UQi5q0nyhClnz5+PGKHlN1/rMo56diQC
 ZpIo1Dp4RhUj2MYVtvNrMNZE5dZxdrPbpswd/ExEQdzFxinUiopzz4VoMLjwbHME
 c324I23kke/bDrOSQQvwUqRQ0p1xm2NFipPzs7LkqggxnLXBhDKkQoih6GeEmo4/
 6Dq7XFN7DX6PwaambLEsvwolm52mvxN5N9R8bc3VBt9Z07Xt+nM994E55PcwHsD1
 KaO+8R3efhUCTFq/r/on+QiEz6++kFZqLDeFlbsrPsUZDn0kZ0VPsKpEXKFwEJWk
 bTk+vDo5OefSZ1d421Rpu73L6WkzhPQC9sIGSdDrw8uEOlgEQggVnI8VkATkz2Em
 gn2aC1tCwtyhmTbzNhL8VLB4h1q7lvRX2mR8Z9Q9F0bL9IbyWGJ+hsuDjNZstjk4
 FFXyRSClx3stmuSuPcGT
 =LEWy
 -----END PGP SIGNATURE-----

Merge tag 'kill-plat-sparse-irq' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl into next/multiplatform

From Linus Walleij:

This patchset will:
- Move all remaining headers out of arch/arm/plat-nomadik/include/plat
  out to e.g. include/linux/platform_data
- Delete arch/arm/plat-nomadik
- Convert Nomadik and Ux500 to SPARSE_IRQ

* tag 'kill-plat-sparse-irq' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  ARM: plat-nomadik: convert platforms to SPARSE_IRQ
  mfd/db8500-prcmu: use the irq_domain_add_simple()
  mfd/ab8500-core: use irq_domain_add_simple()
  ARM: plat-nomadik: move MTU, kill plat-nomadik
  ARM: plat-nomadik: move DMA40 header to <linux/platform_data>
  ARM: plat-nomadik: use DIV_ROUND_CLOSEST()
  ARM: plat-nomadik: pass IRQ to timer driver
  clk/ux500: explicitly include register header
  pinctrl/nomadik: merge old pincfg header
  pinctrl/nomadik: move the platform data header
  ARM: plat-nomadik: move NMK_GPIO_PER_CHIP into gpio-nomadik.h
  ARM: plat-nomadik: Introduce new DB8540 GPIO registers
2012-11-06 07:47:09 -08:00
Linus Walleij
694e33a7f4 ARM: plat-nomadik: move MTU, kill plat-nomadik
This moves the MTU timer driver from arch/arm/plat-nomadik
to drivers/clocksource and moves the header file to the
platform_data directory.

As this moves the last file being compiled to an object out
of arch/arm/plat-nomadik, we have to "turn off the light"
and delete the plat-nomadik directory, because it is not
allowed to have an empty Makefile in a plat-* directory.
This is probably also a desired side effect of depopulating
the arch/arm directory of drivers. Luckily we have just
deleted all the <plat/*> include files prior to this so
by moving the last one we may delete the directory.

After this all the Ux500 and Nomadik device drivers live
outside of the arch/arm hierarchy.

Cc: Alessandro Rubini <rubini@unipv.it>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-11-05 09:55:33 +01:00
Dmitry Torokhov
53279f36dc Linux 3.7-rc3
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJQjYaSAAoJEHm+PkMAQRiGIlYH+wbwj7i5CcUG46VRFT5WlG7W
 iYaojL68FKKIUCBh4GOvZxE2D907KgqHQI6rePE/xDhK493d0Nyi4PGQJ1JoTE+l
 JQq++C3CoX9mm/zCRW5JyOcemE4t2t1/poi2ege9Kf9E9N5Cw0P4r8Cz1urCFKL6
 EO2/gA5d6cBQpg+gVq9T88SnYgiJGs7d8AYjFeC7SrqIwDvG6tfg+YF4IRxC4QAc
 0zbBgej/kbuiLbGl2ltU0I9HTOwlTgp53tdYe810cs3CdzNC2ykdF391Q24tloeo
 uxmCSQrA2upHA9aILqY+T5f+cMOpVS4T8Ica3N9OzVEIPXSh2K9d4tESGPikMEE=
 =yiDr
 -----END PGP SIGNATURE-----

Merge tag 'v3.7-rc3' into next to sync up with recent USB and MFD changes
2012-10-30 00:20:56 -07:00
Roland Stigge
e07577e1dd Input: lpc32xx-keys - select INPUT_MATRIXKMAP
This adds a "select" dependency of KEYBOARD_LPC32XX on INPUT_MATRIXKMAP,
as the other drivers are doing in this regard. This fixes the following
compile error if KEYBOARD_LPC32XX is enabled but INPUT_MATRIXKMAP is not:

drivers/input/keyboard/lpc32xx-keys.c:230: undefined reference to
`matrix_keypad_build_keymap'

Signed-off-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-10-30 00:10:55 -07:00
Kees Cook
6828b4bb76 Input: remove CONFIG_EXPERIMENTAL from keyboard drivers
This config item has not carried much meaning for a while now and is
almost always enabled by default. As agreed during the Linux kernel
summit, remove it.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-10-25 00:12:23 -07:00
Tony Lindgren
f799a3d8fe Input: omap-keypad: Remove dependencies to mach includes
Remove support for omap2+ as it's no longer needed since
it's using matrix-keypad. This way we can remove depency
to plat and mach headers which is needed for ARM common
zImage support.

Also remove INT_KEYBOARD by using omap_kp->irq.

Note that this patch depends on an earlier patch
"ARM: OMAP: Move gpio.h to include/linux/platform_data".

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
Acked-by: Sourav Poddar <sourav.poddar@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-09-12 18:06:30 -07:00
Roland Stigge
69690bec40 Input: add support for key scan interface of the LPC32xx SoC
This is a driver for the key scan interface of the LPC32xx SoC

Signed-off-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-07-17 23:16:16 -07:00
Dmitry Torokhov
1932811f42 Input: matrix-keymap - uninline and prepare for device tree support
Change matrix-keymap helper to be out-of-line, like sparse keymap,
allow the helper perform basic keymap validation and return errors,
and prepare for device tree support.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-05-10 22:38:47 -07:00
Poddar, Sourav
f77621cc64 Input: omap-keypad - dynamically handle register offsets
Hi Dmitry,

On Wed, May 9, 2012 at 3:14 PM, Poddar, Sourav <sourav.poddar@ti.com> wrote:
> Hi Dmitry,
>
> I did some minor fixes to the patch which you suggested above and
> the keypad is functional now.
>
> Changes:
> - Move "pm_runtime_enable" before using "pm_runtime_get_sync".
>
> Sending the patch inlined..(also attached).
>
> From: G, Manjunath Kondaiah <manjugk@ti.com>
> Date: Mon, 10 Oct 2011 20:52:05 +0530
> Subject: [PATCH] Input: omap-keypad: dynamically handle register offsets
>
> Keypad controller register offsets are different for omap4
> and omap5. Handle these offsets through static mapping and
> assign these mappings during run time.
>
> Tested on omap4430 sdp with 3.4-rc3.
> Tested on omap5430evm with 3.1-custom kernel.
>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> Signed-off-by: G, Manjunath Kondaiah <manjugk@ti.com>
> Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
> ---
>  drivers/input/keyboard/Kconfig        |    4 +-
>  drivers/input/keyboard/omap4-keypad.c |  120 +++++++++++++++++++++++++-------
>  2 files changed, 95 insertions(+), 29 deletions(-)
>
> diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
> index f354813..33bbdee 100644
> --- a/drivers/input/keyboard/Kconfig
> +++ b/drivers/input/keyboard/Kconfig
> @@ -512,9 +512,9 @@ config KEYBOARD_OMAP
>          module will be called omap-keypad.
>
>  config KEYBOARD_OMAP4
> -       tristate "TI OMAP4 keypad support"
> +       tristate "TI OMAP4+ keypad support"
>        help
> -         Say Y here if you want to use the OMAP4 keypad.
> +         Say Y here if you want to use the OMAP4+ keypad.
>
>          To compile this driver as a module, choose M here: the
>          module will be called omap4-keypad.
> diff --git a/drivers/input/keyboard/omap4-keypad.c
> b/drivers/input/keyboard/omap4-keypad.c
> index e809ac0..d7102e8 100644
> --- a/drivers/input/keyboard/omap4-keypad.c
> +++ b/drivers/input/keyboard/omap4-keypad.c
> @@ -68,19 +68,52 @@
>
>  #define OMAP4_MASK_IRQSTATUSDISABLE    0xFFFF
>
> +enum {
> +       KBD_REVISION_OMAP4 = 0,
> +       KBD_REVISION_OMAP5,
> +};
> +
>  struct omap4_keypad {
>        struct input_dev *input;
>
>        void __iomem *base;
> -       int irq;
> +       unsigned int irq;
>
>        unsigned int rows;
>        unsigned int cols;
> +       u32 reg_offset;
> +       u32 irqreg_offset;
>        unsigned int row_shift;
>        unsigned char key_state[8];
>        unsigned short keymap[];
>  };
>
> +static int kbd_readl(struct omap4_keypad *keypad_data, u32 offset)
> +{
> +       return __raw_readl(keypad_data->base +
> +                               keypad_data->reg_offset + offset);
> +}
> +
> +static void kbd_writel(struct omap4_keypad *keypad_data, u32 offset, u32 value)
> +{
> +       __raw_writel(value,
> +                    keypad_data->base + keypad_data->reg_offset + offset);
> +}
> +
> +static int kbd_read_irqreg(struct omap4_keypad *keypad_data, u32 offset)
> +{
> +       return __raw_readl(keypad_data->base +
> +                               keypad_data->irqreg_offset + offset);
> +}
> +
> +static void kbd_write_irqreg(struct omap4_keypad *keypad_data,
> +                            u32 offset, u32 value)
> +{
> +       __raw_writel(value,
> +                    keypad_data->base + keypad_data->irqreg_offset + offset);
> +}
> +
> +
>  /* Interrupt handler */
>  static irqreturn_t omap4_keypad_interrupt(int irq, void *dev_id)
>  {
> @@ -91,12 +124,11 @@ static irqreturn_t omap4_keypad_interrupt(int
> irq, void *dev_id)
>        u32 *new_state = (u32 *) key_state;
>
>        /* Disable interrupts */
> -       __raw_writel(OMAP4_VAL_IRQDISABLE,
> -                    keypad_data->base + OMAP4_KBD_IRQENABLE);
> +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE,
> +                        OMAP4_VAL_IRQDISABLE);
>
> -       *new_state = __raw_readl(keypad_data->base + OMAP4_KBD_FULLCODE31_0);
> -       *(new_state + 1) = __raw_readl(keypad_data->base
> -                                               + OMAP4_KBD_FULLCODE63_32);
> +       *new_state = kbd_readl(keypad_data, OMAP4_KBD_FULLCODE31_0);
> +       *(new_state + 1) = kbd_readl(keypad_data, OMAP4_KBD_FULLCODE63_32);
>
>        for (row = 0; row < keypad_data->rows; row++) {
>                changed = key_state[row] ^ keypad_data->key_state[row];
> @@ -121,12 +153,13 @@ static irqreturn_t omap4_keypad_interrupt(int
> irq, void *dev_id)
>                sizeof(keypad_data->key_state));
>
>        /* clear pending interrupts */
> -       __raw_writel(__raw_readl(keypad_data->base + OMAP4_KBD_IRQSTATUS),
> -                       keypad_data->base + OMAP4_KBD_IRQSTATUS);
> +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS,
> +                        kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS));
>
>        /* enable interrupts */
> -       __raw_writel(OMAP4_DEF_IRQENABLE_EVENTEN | OMAP4_DEF_IRQENABLE_LONGKEY,
> -                       keypad_data->base + OMAP4_KBD_IRQENABLE);
> +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE,
> +               OMAP4_DEF_IRQENABLE_EVENTEN |
> +                               OMAP4_DEF_IRQENABLE_LONGKEY);
>
>        return IRQ_HANDLED;
>  }
> @@ -139,16 +172,17 @@ static int omap4_keypad_open(struct input_dev *input)
>
>        disable_irq(keypad_data->irq);
>
> -       __raw_writel(OMAP4_VAL_FUNCTIONALCFG,
> -                       keypad_data->base + OMAP4_KBD_CTRL);
> -       __raw_writel(OMAP4_VAL_DEBOUNCINGTIME,
> -                       keypad_data->base + OMAP4_KBD_DEBOUNCINGTIME);
> -       __raw_writel(OMAP4_VAL_IRQDISABLE,
> -                       keypad_data->base + OMAP4_KBD_IRQSTATUS);
> -       __raw_writel(OMAP4_DEF_IRQENABLE_EVENTEN | OMAP4_DEF_IRQENABLE_LONGKEY,
> -                       keypad_data->base + OMAP4_KBD_IRQENABLE);
> -       __raw_writel(OMAP4_DEF_WUP_EVENT_ENA | OMAP4_DEF_WUP_LONG_KEY_ENA,
> -                       keypad_data->base + OMAP4_KBD_WAKEUPENABLE);
> +       kbd_writel(keypad_data, OMAP4_KBD_CTRL,
> +                       OMAP4_VAL_FUNCTIONALCFG);
> +       kbd_writel(keypad_data, OMAP4_KBD_DEBOUNCINGTIME,
> +                       OMAP4_VAL_DEBOUNCINGTIME);
> +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS,
> +                       OMAP4_VAL_IRQDISABLE);
> +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE,
> +                       OMAP4_DEF_IRQENABLE_EVENTEN |
> +                               OMAP4_DEF_IRQENABLE_LONGKEY);
> +       kbd_writel(keypad_data, OMAP4_KBD_WAKEUPENABLE,
> +                       OMAP4_DEF_WUP_EVENT_ENA | OMAP4_DEF_WUP_LONG_KEY_ENA);
>
>        enable_irq(keypad_data->irq);
>
> @@ -162,12 +196,12 @@ static void omap4_keypad_close(struct input_dev *input)
>        disable_irq(keypad_data->irq);
>
>        /* Disable interrupts */
> -       __raw_writel(OMAP4_VAL_IRQDISABLE,
> -                    keypad_data->base + OMAP4_KBD_IRQENABLE);
> +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE,
> +                        OMAP4_VAL_IRQDISABLE);
>
>        /* clear pending interrupts */
> -       __raw_writel(__raw_readl(keypad_data->base + OMAP4_KBD_IRQSTATUS),
> -                       keypad_data->base + OMAP4_KBD_IRQSTATUS);
> +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS,
> +                        kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS));
>
>        enable_irq(keypad_data->irq);
>
> @@ -182,6 +216,7 @@ static int __devinit omap4_keypad_probe(struct
> platform_device *pdev)
>        struct resource *res;
>        resource_size_t size;
>        unsigned int row_shift, max_keys;
> +       int rev;
>        int irq;
>        int error;
>
> @@ -241,11 +276,40 @@ static int __devinit omap4_keypad_probe(struct
> platform_device *pdev)
>        keypad_data->rows = pdata->rows;
>        keypad_data->cols = pdata->cols;
>
> +       /*
> +       * Enable clocks for the keypad module so that we can read
> +       * revision register.
> +       */
> +       pm_runtime_enable(&pdev->dev);
> +       error = pm_runtime_get_sync(&pdev->dev);
> +       if (error) {
> +               dev_err(&pdev->dev, "pm_runtime_get_sync() failed\n");
> +               goto err_unmap;
> +       }
> +       rev = __raw_readl(keypad_data->base + OMAP4_KBD_REVISION);
> +       rev &= 0x03 << 30;
> +       rev >>= 30;
> +       switch (rev) {
> +       case KBD_REVISION_OMAP4:
> +               keypad_data->reg_offset = 0x00;
> +               keypad_data->irqreg_offset = 0x00;
> +               break;
> +       case KBD_REVISION_OMAP5:
> +               keypad_data->reg_offset = 0x10;
> +               keypad_data->irqreg_offset = 0x0c;
> +               break;
> +       default:
> +               dev_err(&pdev->dev,
> +                       "Keypad reports unsupported revision %d", rev);
> +               error = -EINVAL;
> +               goto err_pm_put_sync;
> +       }
> +
>        /* input device allocation */
>        keypad_data->input = input_dev = input_allocate_device();
>        if (!input_dev) {
>                error = -ENOMEM;
> -               goto err_unmap;
> +               goto err_pm_put_sync;
>        }
>
>        input_dev->name = pdev->name;
> @@ -273,14 +337,14 @@ static int __devinit omap4_keypad_probe(struct
> platform_device *pdev)
>                        input_dev->keycode, input_dev->keybit);
>
>        error = request_irq(keypad_data->irq, omap4_keypad_interrupt,
> -                            IRQF_TRIGGER_RISING,
> +                           IRQF_DISABLED | IRQF_TRIGGER_RISING,
Sorry, " IRQF_DISABLED" got included by mistake.
Removing this stray change and sending it again.

>                             "omap4-keypad", keypad_data);
>        if (error) {
>                dev_err(&pdev->dev, "failed to register interrupt\n");
>                goto err_free_input;
>        }
>
> -       pm_runtime_enable(&pdev->dev);
> +       pm_runtime_put_sync(&pdev->dev);
>
>        error = input_register_device(keypad_data->input);
>        if (error < 0) {
> @@ -296,6 +360,8 @@ err_pm_disable:
>        free_irq(keypad_data->irq, keypad_data);
>  err_free_input:
>        input_free_device(input_dev);
> +err_pm_put_sync:
> +       pm_runtime_put_sync(&pdev->dev);
>  err_unmap:
>        iounmap(keypad_data->base);
>  err_release_mem:
>
>
> ~Sourav
>
> On Wed, May 9, 2012 at 1:15 PM, Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
>>> Hi Dmitry ,
>>>
>>>
>>> On Wed, May 9, 2012 at 10:48 AM, Dmitry Torokhov
>>> <dmitry.torokhov@gmail.com> wrote:
>>> > Ho Sourav,
>>> >
>>> > On Thu, Apr 26, 2012 at 11:24:37AM +0530, Sourav Poddar wrote:
>>> >>
>>> >> -config KEYBOARD_OMAP4
>>> >> -     tristate "TI OMAP4 keypad support"
>>> >> +config KEYBOARD_OMAP4+
>>> >
>>> > I think this works purely by accident - '+' sign getting dropped by
>>> > parser...
>>> >
>>> >> @@ -139,16 +192,33 @@ static int omap4_keypad_open(struct input_dev *input)
>>> >>
>>> >>       disable_irq(keypad_data->irq);
>>> >>
>>> >> -     __raw_writel(OMAP4_VAL_FUNCTIONALCFG,
>>> >> -                     keypad_data->base + OMAP4_KBD_CTRL);
>>> >> -     __raw_writel(OMAP4_VAL_DEBOUNCINGTIME,
>>> >> -                     keypad_data->base + OMAP4_KBD_DEBOUNCINGTIME);
>>> >> -     __raw_writel(OMAP4_VAL_IRQDISABLE,
>>> >> -                     keypad_data->base + OMAP4_KBD_IRQSTATUS);
>>> >> -     __raw_writel(OMAP4_DEF_IRQENABLE_EVENTEN | OMAP4_DEF_IRQENABLE_LONGKEY,
>>> >> -                     keypad_data->base + OMAP4_KBD_IRQENABLE);
>>> >> -     __raw_writel(OMAP4_DEF_WUP_EVENT_ENA | OMAP4_DEF_WUP_LONG_KEY_ENA,
>>> >> -                     keypad_data->base + OMAP4_KBD_WAKEUPENABLE);
>>> >> +     keypad_data->revision = kbd_read_revision(keypad_data,
>>> >> +                     OMAP4_KBD_REVISION);
>>> >> +     switch (keypad_data->revision) {
>>> >> +     case 1:
>>> >> +             keypad_data->irqstatus = OMAP4_KBD_IRQSTATUS + 0x0c;
>>> >> +             keypad_data->irqenable = OMAP4_KBD_IRQENABLE + 0x0c;
>>> >> +             keypad_data->reg_offset = 0x10;
>>> >> +             break;
>>> >
>>> > This should be done in probe().
>>> >
>>> Dont we then require "pm_runtime_put_sync" in probe, since we are trying
>>> to read the keypad revision register.?
>>
>> Ah, indeed, but I think not pm_runtime_get_sync() but
>> pm_runtime_set_active().
>>
>> Not sure if this will fix the crash...
>>
>> --
>> Dmitry
>>
>>
>> Input: omap-keypad - dynamically handle register offsets
>>
>> From: G, Manjunath Kondaiah <manjugk@ti.com>
>>
>> Keypad controller register offsets are different for omap4
>> and omap5. Handle these offsets through static mapping and
>> assign these mappings during run time.
>>
>> Tested on omap4430 sdp with 3.4-rc3.
>> Tested on omap5430evm with 3.1-custom kernel.
>>
>> Signed-off-by: Felipe Balbi <balbi@ti.com>
>> Signed-off-by: G, Manjunath Kondaiah <manjugk@ti.com>
>> Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
>> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
>> ---
>>
>>  drivers/input/keyboard/Kconfig        |    4 +
>>  drivers/input/keyboard/omap4-keypad.c |  117 ++++++++++++++++++++++++++-------
>>  2 files changed, 94 insertions(+), 27 deletions(-)
>>
>>
>> diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
>> index 20a3753..84ee155 100644
>> --- a/drivers/input/keyboard/Kconfig
>> +++ b/drivers/input/keyboard/Kconfig
>> @@ -531,9 +531,9 @@ config KEYBOARD_OMAP
>>          module will be called omap-keypad.
>>
>>  config KEYBOARD_OMAP4
>> -       tristate "TI OMAP4 keypad support"
>> +       tristate "TI OMAP4+ keypad support"
>>        help
>> -         Say Y here if you want to use the OMAP4 keypad.
>> +         Say Y here if you want to use the OMAP4+ keypad.
>>
>>          To compile this driver as a module, choose M here: the
>>          module will be called omap4-keypad.
>> diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
>> index e809ac0..c9fd0df 100644
>> --- a/drivers/input/keyboard/omap4-keypad.c
>> +++ b/drivers/input/keyboard/omap4-keypad.c
>> @@ -68,19 +68,52 @@
>>
>>  #define OMAP4_MASK_IRQSTATUSDISABLE    0xFFFF
>>
>> +enum {
>> +       KBD_REVISION_OMAP4 = 0,
>> +       KBD_REVISION_OMAP5,
>> +};
>> +
>>  struct omap4_keypad {
>>        struct input_dev *input;
>>
>>        void __iomem *base;
>> -       int irq;
>> +       unsigned int irq;
>>
>>        unsigned int rows;
>>        unsigned int cols;
>> +       u32 reg_offset;
>> +       u32 irqreg_offset;
>>        unsigned int row_shift;
>>        unsigned char key_state[8];
>>        unsigned short keymap[];
>>  };
>>
>> +static int kbd_readl(struct omap4_keypad *keypad_data, u32 offset)
>> +{
>> +       return __raw_readl(keypad_data->base +
>> +                               keypad_data->reg_offset + offset);
>> +}
>> +
>> +static void kbd_writel(struct omap4_keypad *keypad_data, u32 offset, u32 value)
>> +{
>> +       __raw_writel(value,
>> +                    keypad_data->base + keypad_data->reg_offset + offset);
>> +}
>> +
>> +static int kbd_read_irqreg(struct omap4_keypad *keypad_data, u32 offset)
>> +{
>> +       return __raw_readl(keypad_data->base +
>> +                               keypad_data->irqreg_offset + offset);
>> +}
>> +
>> +static void kbd_write_irqreg(struct omap4_keypad *keypad_data,
>> +                            u32 offset, u32 value)
>> +{
>> +       __raw_writel(value,
>> +                    keypad_data->base + keypad_data->irqreg_offset + offset);
>> +}
>> +
>> +
>>  /* Interrupt handler */
>>  static irqreturn_t omap4_keypad_interrupt(int irq, void *dev_id)
>>  {
>> @@ -91,12 +124,11 @@ static irqreturn_t omap4_keypad_interrupt(int irq, void *dev_id)
>>        u32 *new_state = (u32 *) key_state;
>>
>>        /* Disable interrupts */
>> -       __raw_writel(OMAP4_VAL_IRQDISABLE,
>> -                    keypad_data->base + OMAP4_KBD_IRQENABLE);
>> +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE,
>> +                        OMAP4_VAL_IRQDISABLE);
>>
>> -       *new_state = __raw_readl(keypad_data->base + OMAP4_KBD_FULLCODE31_0);
>> -       *(new_state + 1) = __raw_readl(keypad_data->base
>> -                                               + OMAP4_KBD_FULLCODE63_32);
>> +       *new_state = kbd_readl(keypad_data, OMAP4_KBD_FULLCODE31_0);
>> +       *(new_state + 1) = kbd_readl(keypad_data, OMAP4_KBD_FULLCODE63_32);
>>
>>        for (row = 0; row < keypad_data->rows; row++) {
>>                changed = key_state[row] ^ keypad_data->key_state[row];
>> @@ -121,12 +153,13 @@ static irqreturn_t omap4_keypad_interrupt(int irq, void *dev_id)
>>                sizeof(keypad_data->key_state));
>>
>>        /* clear pending interrupts */
>> -       __raw_writel(__raw_readl(keypad_data->base + OMAP4_KBD_IRQSTATUS),
>> -                       keypad_data->base + OMAP4_KBD_IRQSTATUS);
>> +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS,
>> +                        kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS));
>>
>>        /* enable interrupts */
>> -       __raw_writel(OMAP4_DEF_IRQENABLE_EVENTEN | OMAP4_DEF_IRQENABLE_LONGKEY,
>> -                       keypad_data->base + OMAP4_KBD_IRQENABLE);
>> +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE,
>> +               OMAP4_DEF_IRQENABLE_EVENTEN |
>> +                               OMAP4_DEF_IRQENABLE_LONGKEY);
>>
>>        return IRQ_HANDLED;
>>  }
>> @@ -139,16 +172,17 @@ static int omap4_keypad_open(struct input_dev *input)
>>
>>        disable_irq(keypad_data->irq);
>>
>> -       __raw_writel(OMAP4_VAL_FUNCTIONALCFG,
>> -                       keypad_data->base + OMAP4_KBD_CTRL);
>> -       __raw_writel(OMAP4_VAL_DEBOUNCINGTIME,
>> -                       keypad_data->base + OMAP4_KBD_DEBOUNCINGTIME);
>> -       __raw_writel(OMAP4_VAL_IRQDISABLE,
>> -                       keypad_data->base + OMAP4_KBD_IRQSTATUS);
>> -       __raw_writel(OMAP4_DEF_IRQENABLE_EVENTEN | OMAP4_DEF_IRQENABLE_LONGKEY,
>> -                       keypad_data->base + OMAP4_KBD_IRQENABLE);
>> -       __raw_writel(OMAP4_DEF_WUP_EVENT_ENA | OMAP4_DEF_WUP_LONG_KEY_ENA,
>> -                       keypad_data->base + OMAP4_KBD_WAKEUPENABLE);
>> +       kbd_writel(keypad_data, OMAP4_KBD_CTRL,
>> +                       OMAP4_VAL_FUNCTIONALCFG);
>> +       kbd_writel(keypad_data, OMAP4_KBD_DEBOUNCINGTIME,
>> +                       OMAP4_VAL_DEBOUNCINGTIME);
>> +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS,
>> +                       OMAP4_VAL_IRQDISABLE);
>> +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE,
>> +                       OMAP4_DEF_IRQENABLE_EVENTEN |
>> +                               OMAP4_DEF_IRQENABLE_LONGKEY);
>> +       kbd_writel(keypad_data, OMAP4_KBD_WAKEUPENABLE,
>> +                       OMAP4_DEF_WUP_EVENT_ENA | OMAP4_DEF_WUP_LONG_KEY_ENA);
>>
>>        enable_irq(keypad_data->irq);
>>
>> @@ -162,12 +196,12 @@ static void omap4_keypad_close(struct input_dev *input)
>>        disable_irq(keypad_data->irq);
>>
>>        /* Disable interrupts */
>> -       __raw_writel(OMAP4_VAL_IRQDISABLE,
>> -                    keypad_data->base + OMAP4_KBD_IRQENABLE);
>> +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE,
>> +                        OMAP4_VAL_IRQDISABLE);
>>
>>        /* clear pending interrupts */
>> -       __raw_writel(__raw_readl(keypad_data->base + OMAP4_KBD_IRQSTATUS),
>> -                       keypad_data->base + OMAP4_KBD_IRQSTATUS);
>> +       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS,
>> +                        kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS));
>>
>>        enable_irq(keypad_data->irq);
>>
>> @@ -182,6 +216,7 @@ static int __devinit omap4_keypad_probe(struct platform_device *pdev)
>>        struct resource *res;
>>        resource_size_t size;
>>        unsigned int row_shift, max_keys;
>> +       int rev;
>>        int irq;
>>        int error;
>>
>> @@ -241,11 +276,40 @@ static int __devinit omap4_keypad_probe(struct platform_device *pdev)
>>        keypad_data->rows = pdata->rows;
>>        keypad_data->cols = pdata->cols;
>>
>> +       /*
>> +        * Mark device as active (and wake up its parent) so we can read
>> +        * revision register.
>> +        */
>> +       error = pm_runtime_set_active(&pdev->dev);
>> +       if (error) {
>> +               dev_err(&pdev->dev, "pm_runtime_set_active() failed\n");
>> +               goto err_unmap;
>> +       }
>> +
>> +       rev = __raw_readl(keypad_data->base + OMAP4_KBD_REVISION);
>> +       rev &= 0x03 << 30;
>> +       rev >>= 30;
>> +       switch (rev) {
>> +       case KBD_REVISION_OMAP4:
>> +               keypad_data->reg_offset = 0x00;
>> +               keypad_data->irqreg_offset = 0x00;
>> +               break;
>> +       case KBD_REVISION_OMAP5:
>> +               keypad_data->reg_offset = 0x10;
>> +               keypad_data->irqreg_offset = 0x0c;
>> +               break;
>> +       default:
>> +               dev_err(&pdev->dev,
>> +                       "Keypad reports unsupported revision %d", rev);
>> +               error = -EINVAL;
>> +               goto err_pm_suspended;
>> +       }
>> +
>>        /* input device allocation */
>>        keypad_data->input = input_dev = input_allocate_device();
>>        if (!input_dev) {
>>                error = -ENOMEM;
>> -               goto err_unmap;
>> +               goto err_pm_suspended;
>>        }
>>
>>        input_dev->name = pdev->name;
>> @@ -281,6 +345,7 @@ static int __devinit omap4_keypad_probe(struct platform_device *pdev)
>>        }
>>
>>        pm_runtime_enable(&pdev->dev);
>> +       pm_runtime_put_sync(&pdev->dev);
>>
>>        error = input_register_device(keypad_data->input);
>>        if (error < 0) {
>> @@ -296,6 +361,8 @@ err_pm_disable:
>>        free_irq(keypad_data->irq, keypad_data);
>>  err_free_input:
>>        input_free_device(input_dev);
>> +err_pm_suspended:
>> +       pm_runtime_set_suspended(&pdev->dev);
>>  err_unmap:
>>        iounmap(keypad_data->base);
>>  err_release_mem:

From: G, Manjunath Kondaiah <manjugk@ti.com>
Date: Mon, 10 Oct 2011 20:52:05 +0530
Subject: [PATCH] Input: omap-keypad: dynamically handle register offsets

Keypad controller register offsets are different for omap4
and omap5. Handle these offsets through static mapping and
assign these mappings during run time.

Tested on omap4430 sdp with 3.4-rc3.
Tested on omap5430evm with 3.1-custom kernel.

Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: G, Manjunath Kondaiah <manjugk@ti.com>
Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-05-10 22:33:58 -07:00
Wolfram Sang
0bf25a4538 Input: add support for LM8333 keypads
This driver adds support for the keypad part of the LM8333 and is
prepared for possible GPIO/PWM drivers. Note that this is not a MFD
because you cannot disable the keypad functionality which, thus,
has to be handled by the core anyhow.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-04 09:25:39 -07:00
Felipe Balbi
0f1142a514 Input: omap4-keypad - move platform_data to <linux/platform_data>
This patch allows us to drop the OMAP dependency from the OMAP4 keypad
driver.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-16 22:49:46 -07:00
Olof Johansson
2cd36877ad Input: of_keymap - add device tree bindings for simple key matrices
This adds a simple device tree binding for simple key matrix data and
a helper to fill in the platform data.

Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-13 21:37:04 -07:00
Dmitry Torokhov
8d964a2872 Input: samsung-keypad - enable compiling on other platforms
There is nothing in keypad platform definitions that requires
the driver be complied on Samsung platform only, so let's move them
out of the platform subdirectory and relax the dependencies.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-11-15 09:46:14 -08:00
Kyle Manna
fb6c721b69 Input: tca8418_keypad - initial driver release
This driver has been tested with hardware and works as expected.  To use
it add the platform data as appropriate and register it with the
corresponding I2C bus.

Signed-off-by: Kyle Manna <kyle.manna@fuel7.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-29 12:32:24 -07:00
Michael Hennerich
3f48e73543 Input: adp5589-keys - add support for the ADP5585 derivatives
The ADP5585 family keypad decoder and IO expander is similar to the ADP5589,
however it features less IO pins, and lacks hardware assisted key-lock
functionality. Unfortunately the register addresses are different, as well as
the event codes and bit organization within the port related registers.

Move ADP5589 Register defines from the header file into the main source file.
Add new defines while making sure we don't break existing platform_data.
Add register address translation, and turn device specific defines into variables.
Introduce some helper functions and disable functions that doesn't
exist on the added devices.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-18 21:26:55 -07: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
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
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
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
Linus Torvalds
6fb1b30425 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: wacom - pass touch resolution to clients through input_absinfo
  Input: wacom - add 2 Bamboo Pen and touch models
  Input: sysrq - ensure sysrq_enabled and __sysrq_enabled are consistent
  Input: sparse-keymap - fix KEY_VSW handling in sparse_keymap_setup
  Input: tegra-kbc - add tegra keyboard driver
  Input: gpio_keys - switch to using request_any_context_irq
  Input: serio - allow registered drivers to get status flag
  Input: ct82710c - return proper error code for ct82c710_open
  Input: bu21013_ts - added regulator support
  Input: bu21013_ts - remove duplicate resolution parameters
  Input: tnetv107x-ts - don't treat NULL clk as an error
  Input: tnetv107x-keypad - don't treat NULL clk as an error

Fix up trivial conflicts in drivers/input/keyboard/Makefile due to
additions of tc3589x/Tegra drivers
2011-01-26 16:31:44 +10:00
Rakesh Iyer
11f5b30dac Input: tegra-kbc - add tegra keyboard driver
This patch adds support for the internal matrix keyboard controller for
Nvidia Tegra platforms.

Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Reviewed-by: Trilok Soni <tsoni@codeaurora.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-01-20 23:12:34 -08:00
David Rientjes
6a108a14fa kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT
The meaning of CONFIG_EMBEDDED has long since been obsoleted; the option
is used to configure any non-standard kernel with a much larger scope than
only small devices.

This patch renames the option to CONFIG_EXPERT in init/Kconfig and fixes
references to the option throughout the kernel.  A new CONFIG_EMBEDDED
option is added that automatically selects CONFIG_EXPERT when enabled and
can be used in the future to isolate options that should only be
considered for embedded systems (RISC architectures, SLOB, etc).

Calling the option "EXPERT" more accurately represents its intention: only
expert users who understand the impact of the configuration changes they
are making should enable it.

Reviewed-by: Ingo Molnar <mingo@elte.hu>
Acked-by: David Woodhouse <david.woodhouse@intel.com>
Signed-off-by: David Rientjes <rientjes@google.com>
Cc: Greg KH <gregkh@suse.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Robin Holt <holt@sgi.com>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-01-20 17:02:05 -08:00
Linus Torvalds
d24450e207 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: add SW_ROTATE_LOCK switch type
  Input: fix force feedback capability query example
  Input: wacom_w8001 - add single-touch support
  Input: add Austria Microsystem AS5011 joystick driver
  Input: remove aaed2000 keyboard driver
  Input: i8042 - introduce 'notimeout' blacklist for Dell Vostro V13
  Input: cy8ctmg110_ts - Convert to dev_pm_ops
  Input: migor_ts - convert to dev_pm_ops
  Input: mcs5000_ts - convert to dev_pm_ops
  Input: eeti_ts - convert to dev_pm_ops
  Input: ad7879 - convert I2C to dev_pm_ops
2011-01-13 09:58:14 -08:00
Dmitry Torokhov
01c728a246 Merge branch 'next' into for-linus 2011-01-11 22:01:45 -08:00
Jamie Iles
048fc018c8 Input: remove aaed2000 keyboard driver
The only platform using this driver (mach-aaec2000) is no longer in
the kernel so remove the driver.

Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-01-08 01:38:24 -08:00
Linus Torvalds
31b6ca0af7 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: (58 commits)
  Input: wacom_w8001 - support pen or touch only devices
  Input: wacom_w8001 - use __set_bit to set keybits
  Input: bu21013_ts - fix misuse of logical operation in place of bitop
  Input: i8042 - add Acer Aspire 5100 to the Dritek list
  Input: wacom - add support for digitizer in Lenovo W700
  Input: psmouse - disable the synaptics extension on OLPC machines
  Input: psmouse - fix up Synaptics comment
  Input: synaptics - ignore bogus mt packet
  Input: synaptics - add multi-finger and semi-mt support
  Input: synaptics - report clickpad property
  input: mt: Document interface updates
  Input: fix double equality sign in uevent
  Input: introduce device properties
  hid: egalax: Add support for Wetab (726b)
  Input: include MT library as source for kerneldoc
  MAINTAINERS: Update input-mt entry
  hid: egalax: Add support for Samsung NB30 netbook
  hid: egalax: Document the new devices in Kconfig
  hid: egalax: Add support for Wetab
  hid: egalax: Convert to MT slots
  ...

Fixed up trivial conflict in drivers/input/keyboard/Kconfig
2011-01-07 14:45:47 -08:00
Dmitry Torokhov
554738da71 Merge branch 'next' into for-linus
Conflicts:
	include/linux/input.h
2011-01-06 22:34:59 -08:00
Russell King
cde9efef40 Merge branch 'ux500-core' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into devel-stable 2011-01-03 10:31:58 +00:00
Sundar Iyer
09c730a488 input/tc3589x: add tc3589x keypad support
Add support for the keypad controller module found on the
TC3589X devices. This driver default adds the support for
TC35893 device.

Signed-off-by: Sundar Iyer <sundar.iyer@stericsson.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
[Some minor fixups for compilation]
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
2010-12-29 22:02:24 +01:00
Tony SIM
b8a3d6bcbc Input: tca6416-keypad - add support for tca6408a
Support 8-bit tca6408a I/O expander as a keypad.

Signed-off-by: Tony SIM <chinyeow.sim.xt@renesas.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-12-07 21:10:28 -08:00
Gabor Juhos
0e7d0c860a Input: add input driver for polled GPIO buttons
The existing gpio-keys driver can be usable only for GPIO lines with
interrupt support. Several devices have buttons connected to a GPIO
line which is not capable to generate interrupts. This patch adds a
new input driver using the generic GPIO layer and the input-polldev
to support such buttons.

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

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Tested-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-12-06 17:15:15 -08:00
Rajeev Kumar
bc95df78c4 Input: add support for keyboards on ST SPEAr platform
Signed-off-by: Rajeev Kumar <rajeev-dlh.kumar@st.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-19 12:43:25 -08:00
Linus Torvalds
72e58063d6 Merge branch 'davinci-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci
* 'davinci-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci: (50 commits)
  davinci: fix remaining board support after io_pgoffst removal
  davinci: mityomapl138: make file local data static
  arm/davinci: remove duplicated include
  davinci: Initial support for Omapl138-Hawkboard
  davinci: MityDSP-L138/MityARM-1808 read MAC address from I2C Prom
  davinci: add tnetv107x touchscreen platform device
  input: add driver for tnetv107x touchscreen controller
  davinci: add keypad config for tnetv107x evm board
  davinci: add tnetv107x keypad platform device
  input: add driver for tnetv107x on-chip keypad controller
  net: davinci_emac: cleanup unused cpdma code
  net: davinci_emac: switch to new cpdma layer
  net: davinci_emac: separate out cpdma code
  net: davinci_emac: cleanup unused mdio emac code
  omap: cleanup unused davinci mdio arch code
  davinci: cleanup mdio arch code and switch to phy_id
  net: davinci_emac: switch to new mdio
  omap: add mdio platform devices
  davinci: add mdio platform devices
  net: davinci_emac: separate out davinci mdio
  ...

Fix up trivial conflict in drivers/input/keyboard/Kconfig (two entries
added next to each other - one from the davinci merge, one from the
input merge)
2010-10-25 10:59:31 -07:00
Linus Torvalds
3a99c63190 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: (75 commits)
  Input: wacom - specify Cinitq supported tools
  Input: ab8500-ponkey - fix IRQ freeing in error path
  Input: adp5588-keys - use more obvious i2c_device_id name string
  Input: ad7877 - switch to using threaded IRQ
  Input: ad7877 - use attribute group to control visibility of attributes
  Input: serio - add support for PS2Mult multiplexer protocol
  Input: wacom - properly enable runtime PM
  Input: ad7877 - filter events where pressure is beyond the maximum
  Input: ad7877 - implement EV_KEY:BTN_TOUCH reporting
  Input: ad7877 - implement specified chip select behavior
  Input: hp680_ts_input - use cancel_delayed_work_sync()
  Input: mousedev - correct lockdep annotation
  Input: ads7846 - switch to using threaded IRQ
  Input: serio - support multiple child devices per single parent
  Input: synaptics - simplify pass-through port handling
  Input: add ROHM BU21013 touch panel controller support
  Input: omap4-keypad - wake-up on events & long presses
  Input: omap4-keypad - fix interrupt line configuration
  Input: omap4-keypad - SYSCONFIG register configuration
  Input: omap4-keypad - use platform device helpers
  ...
2010-10-25 07:59:01 -07:00
Kevin Hilman
7940a34b2e Merge branch 'davinci-next' into davinci-for-linus
Conflicts:
	arch/arm/mach-davinci/board-da830-evm.c
	arch/arm/mach-davinci/board-da850-evm.c
2010-10-21 11:21:55 -07:00
Sundar Iyer
1158f0f162 Input: add support for Nomadik SKE keypad controller
Add support for the keypad controller in the Scroll Key Encoder (SKE)
module on the Nomadik family and the DB8500 SoC.

Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Sundar Iyer <sundar.iyer@stericsson.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-10-13 07:49:24 -07:00
Mark F. Brown
6d109465fb ARM: pxa168: added keypad support
Signed-off-by: Mark F. Brown <mark.brown314@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-10-09 17:07:17 +08:00
Cyril Chemparathy
7061408440 input: add driver for tnetv107x on-chip keypad controller
This patch adds support for tnetv107x's on-chip keypad controller.

Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-09-24 07:40:31 -07:00
Abraham Arce
a17f79553f Input: add support for OMAP4 keyboard controller
OMAP4 keyboard controller includes:
  - built-in scanning algorithm
  - debouncing feature

Driver implementation is based on matrix_keypad.c

Signed-off-by: Syed Rafiuddin <rafiuddin.syed@ti.com>
Signed-off-by: Abraham Arce <x0066660@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2010-08-31 18:07:54 -07:00
Rabin Vincent
76f1084531 input: Add STMPE keypad driver
Add an input driver for the keypad on STMPE I/O expanders.  This driver
uses the common support provided by the STMPE MFD driver.

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-08-12 11:27:56 +02:00
Linus Torvalds
fe445c6e2c 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: (57 commits)
  Input: adp5588-keypad - fix NULL dereference in adp5588_gpio_add()
  Input: cy8ctmg110 - capacitive touchscreen support
  Input: keyboard - also match braille-only keyboards
  Input: adp5588-keys - export unused GPIO pins
  Input: xpad - add product ID for Hori Fighting Stick EX2
  Input: adxl34x - fix leak and use after free
  Input: samsung-keypad - Add samsung keypad driver
  Input: i8042 - reset keyboard controller wehen resuming from S2R
  Input: synaptics - set min/max for finger width
  Input: synaptics - only report width on hardware that supports it
  Input: evdev - signal that device is writable in evdev_poll()
  Input: mousedev - signal that device is writable in mousedev_poll()
  Input: change input handlers to use bool when possible
  Input: document the MT event slot protocol
  Input: introduce MT event slots
  Input: usbtouchscreen - implement reset_resume
  Input: usbtouchscreen - implement runtime power management
  Input: usbtouchscreen - implement basic suspend/resume
  Input: Add ATMEL QT602240 touchscreen driver
  Input: fix signedness warning in input_set_keycode()
  ...
2010-08-04 10:41:52 -07:00
Dmitry Torokhov
d01d0756f7 Merge branch 'next' into for-linus 2010-08-02 18:35:17 -07:00
Linus Torvalds
27efd7e2e6 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: synaptics - relax capability ID checks on newer hardware
  Input: twl40300-keypad - fix handling of "all ground" rows
  Input: gamecon - reference correct pad in gc_psx_command()
  Input: gamecon - reference correct input device in NES mode
  Input: w90p910_keypad - change platfrom driver name to 'nuc900-kpi'
  Input: i8042 - add Gigabyte Spring Peak to dmi_noloop_table
  Input: qt2160 - rename kconfig symbol name
2010-07-22 11:46:15 -07:00
Joonyoung Shim
0fffed27f9 Input: samsung-keypad - Add samsung keypad driver
This patch adds support for keypad driver running on Samsung cpus. This
driver is tested on GONI and Aquila board using S5PC110 cpu.

[ch.naveen@samsung.com: tested on SMDK6410, SMDKC100, and SMDKV210]
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Naveen Krishna Ch <ch.naveen@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-07-21 00:49:06 -07:00
Christoph Fritz
d90d8d5e52 Input: qt2160 - rename kconfig symbol name
drivers/input/keyboard/Kconfig defines QT2160 while the corresponding
Makefile expects CONFIG_KEYBOARD_QT2160 as all other keyboard drivers
do. To keep this Makefile consistent rename the config-token from
CONFIG_QT2160 to CONFIG_KEYBOARD_QT2160.

The various defconfig files are left alone.

Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-07-17 14:30:28 -07:00
Feng Tang
c9d46f63f8 Revert "Input: fixup X86_MRST selects"
This reverts commit 0b28bac5ae.

After adding x86_platform's detection for i8042 controller, we
don't need the force dependency on !X86_MRST any more

Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Feng Tang <feng.tang@intel.com>
LKML-Reference: <1278342202-10973-5-git-send-email-feng.tang@intel.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2010-07-07 17:05:07 -07:00
Feng Tang
44631ac64d Revert "Input: do not force selecting i8042 on Moorestown"
This reverts commit 685afae025.

After adding x86_platform's detection for i8042 controller, we
don't need the force dependency on !X86_MRST any more

Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Feng Tang <feng.tang@intel.com>
LKML-Reference: <1278342202-10973-4-git-send-email-feng.tang@intel.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2010-07-07 17:05:06 -07:00
Joonyoung Shim
312e8e8a9e Input: mcs - Add MCS touchkey driver
This adds support for MELPAS MCS5000/MSC5080 touch key controllers.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-07-04 01:23:26 -07:00
Randy Dunlap
0b28bac5ae Input: fixup X86_MRST selects
Some of the recent X86_MRST additions make some "select"s
conditional on X86_MRST but missed some related kconfig symbols,
causing:

drivers/built-in.o: In function `ps2_end_command':
(.text+0x257ab2): undefined reference to `i8042_check_port_owner'
drivers/built-in.o: In function `ps2_end_command':
(.text+0x257ae1): undefined reference to `i8042_unlock_chip'
drivers/built-in.o: In function `ps2_begin_command':
(.text+0x257b40): undefined reference to `i8042_check_port_owner'
drivers/built-in.o: In function `ps2_begin_command':
(.text+0x257b6f): undefined reference to `i8042_lock_chip'

when SERIO_I8042=m, SERIO_LIBPS2=y, KEYBOARD_ATKBD=y.

We need to make i8042 dependant upon !X86_MRST and allow deselecting
atkbd on Moorestown even when !CONFIG_EMBEDDED.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Jacob Pan <jacob.jun.pan@intel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-06-22 11:32:16 -07:00
Jacob Pan
685afae025 Input: do not force selecting i8042 on Moorestown
Moorestown does not have i8042 based keyboard controller, so give
an option to deselect i8042 for non-pc mid.

Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-05-19 10:14:25 -07:00
Sriramakrishnan Govindarajan
30ba3ead05 Input: add keypad driver for keys interfaced to TCA6416
This patch implements a simple Keypad driver that functions
as an I2C client. It handles key press events for keys
connected to TCA6416 I2C based IO expander.

Signed-off-by: Sriramakrishnan <srk@ti.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-05-03 23:50:42 -07:00
Eric Miao
16b32e0c9e Input: remove obsolete {corgi,spitz,tosa}kbd.c
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-05-03 23:32:22 -07:00