History log of /drivers/input/keyboard/twl4030_keypad.c
Revision Date Author Comments
bf9a9f8e5105b13cea954b254008f383ed0b4045 06-Jan-2014 Paul Gortmaker <paul.gortmaker@windriver.com> Input: delete non-required instances of include <linux/init.h>

None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>. Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
049f1cb2c115855858ae0b15d559d40296f43d37 04-Jan-2014 Dmitry Torokhov <dmitry.torokhov@gmail.com> Input: twl4030-keypad - convert to using managed resources

Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Tested-by: Sebastian Reichel <sre@debian.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7abf38d6d13c9e3e3b9e4d7d8d7a68a353279d11 04-Jan-2014 Sebastian Reichel <sre@debian.org> Input: twl4030-keypad - add device tree support

Add device tree support for twl4030 keypad driver.

Tested on Nokia N900.

Signed-off-by: Sebastian Reichel <sre@debian.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
c838cb3d477f79738ee03ede53a3f724021f3ae0 06-Dec-2013 Jingoo Han <jg1.han@samsung.com> Input: use dev_get_platdata()

Use the wrapper function for retrieving the platform data instead
of accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
994c755a197df16aa8fd2a5f2de48500142494a0 23-May-2013 Lars-Peter Clausen <lars@metafoo.de> Input: twl4030_keypad - pass correct pointer to free_irq()

free_irq() expects the same pointer that was passed to
request_threaded_irq(), otherwise the IRQ is not freed.

The issue was found using the following coccinelle script:

<smpl>
@r1@
type T;
T devid;
@@
request_threaded_irq(..., devid)

@r2@
type r1.T;
T devid;
position p;
@@
free_irq@p(..., devid)

@@
position p != r2.p;
@@
*free_irq@p(...)
</smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
62205e08e6192a1aa67cc647994c69d9cc55e6f6 06-May-2013 Sachin Kamat <sachin.kamat@linaro.org> Input: twl4030_keypad - remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
e2619cf78e19476bfd7ceaefa9eff0847529346e 24-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> 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>
5298cc4cc753bbe4c530b41341834f6ef3344d0d 24-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> 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>
1cb0aa88179b7a71c240529e9d781d7bbb43d2e8 24-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> Input: remove use of __devexit_p

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

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1932811f426fee71b7ece67e70aeba7e1b0ebb6d 11-May-2012 Dmitry Torokhov <dmitry.torokhov@gmail.com> 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>
4936f97cbb99c19680ea6a3cc0148ebe51f0eb68 01-Feb-2012 Felipe Contreras <felipe.contreras@gmail.com> Input: twl4030_keypad - fix comment (trivial)

And trivial whitespace fixes.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
5146c84f87c8aa3d115cea0d77ed3553df426752 29-Nov-2011 JJ Ding <dgdunix@gmail.com> Input: keyboard - use macro module_platform_driver()

Commit 940ab88962bc1aff3273a8356d64577a6e386736 introduced a new macro to
save some platform_driver boilerplate code. Use it.

Signed-off-by: JJ Ding <dgdunix@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
c68b2081250a87ba9b9a173faa5a600cc684602e 12-Apr-2011 Axel Lin <axel.lin@gmail.com> Input: twl4030_keypad - fix potential NULL dereference in twl4030_kp_probe()

We should first check whether platform data is NULL or not, before
dereferencing it to get the keymap.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
8f74c0661c42104b3e3d2c032bc61efde15360ad 07-Apr-2011 Shubhrajyoti D <a0393217@india.ti.com> Input: twl4030_keypad - avoid potential NULL-pointer dereference

Signed-off-by: Shubhrajyoti D <a0393217@india.ti.com>
Acked-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
a9cc0202227caa4adb5e823d5fbce7790364941f 30-Sep-2010 Dmitry Torokhov <dmitry.torokhov@gmail.com> Input: twl4030_keypad - fix error handling path

We should not try to call free_irq() when request_irq() failed.

Reported-by: G, Manjunath Kondaiah <manjugk@ti.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
3fea60261e73dbf4a51130d40cafcc8465b0f2c3 21-Jul-2010 Dmitry Torokhov <dmitry.torokhov@gmail.com> Input: twl40300-keypad - fix handling of "all ground" rows

The Nokia RX51 board code (arch/arm/mach-omap2/board-rx51-peripherals.c)
defines a key map for the matrix keypad keyboard. The hardware seems to
use all of the 8 rows and 8 columns of the keypad, although not all
possible locations are used.

The TWL4030 supports keypads with at most 8 rows and 8 columns. Most keys
are defined with a row and column number between 0 and 7, except

KEY(0xff, 2, KEY_F9),
KEY(0xff, 4, KEY_F10),
KEY(0xff, 5, KEY_F11),

which represent keycodes that should be emitted when entire row is
connected to the ground. since the driver handles this case as if we
had an extra column in the key matrix. Unfortunately we do not allocate
enough space and end up owerwriting some random memory.

Reported-and-tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: stable@kernel.org
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
5a0e3ad6af8660be21ca98a971cd00f331318c05 24-Mar-2010 Tejun Heo <tj@kernel.org> include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
3f58061d0160424d244e3a72258a1366ab4a8547 30-Dec-2009 Felipe Balbi <felipe.balbi@nokia.com> Input: twl4030_keypad - switch to using threaded IRQ

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
fc7b92fca4e546184557f1c53f84ad57c66b7695 13-Dec-2009 Balaji T K <balajitk@ti.com> mfd: Rename all twl4030_i2c*

This patch renames function names like twl4030_i2c_write_u8,
twl4030_i2c_read_u8 to twl_i2c_write_u8, twl_i2c_read_u8
and also common variable in twl-core.c

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
b07682b6056eb6701f8cb86aa5800e6f2ea7919b 13-Dec-2009 Santosh Shilimkar <santosh.shilimkar@ti.com> mfd: Rename twl4030* driver files to enable re-use

The upcoming TWL6030 is companion chip for OMAP4 like the current TWL4030
for OMAP3. The common modules like RTC, Regulator creates opportunity
to re-use the most of the code from twl4030.

This patch renames few common drivers twl4030* files to twl* to enable
the code re-use.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
9d8340687c524ce61e3c9c76758c4c81303acfc0 26-Aug-2009 David Brownell <dbrownell@users.sourceforge.net> Input: add twl4030_keypad driver

Add a driver for the keypad controller on TWL4030 family chips.
These support up to an 8x8 key matrix. The TWL4030 multifunction
chips are mostly used on OMAP3 (or OMAP 2430) based boards.

[dtor@mail.ru: switch to matrix-keypad framework, fix changing
keymap from userspace]
Reviewed-by: Trilok Soni <soni.trilok@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>