History log of /drivers/input/keyboard/sh_keysc.c
Revision Date Author Comments
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>
cca8edfd2ec2a34d9f50f593bc753bb11e1bc1f5 04-Jul-2011 Dmitry Torokhov <dmitry.torokhov@gmail.com> Input: sh_keysc - fix compile warning

The "#if" above should really be an "#ifdef" to avoid this warning:

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

Reported-by: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
cca23d0b5350c9ca0473625c3f5879422ba534a6 18-Jun-2011 Magnus Damm <damm@opensource.se> Input: sh_keysc - 8x8 MODE_6 fix

According to the data sheet for G4, AP4 and AG5 KEYSC MODE_6 is 8x8 keys.
Bump up MAXKEYS to 64 too.

Signed-off-by: Magnus Damm <damm@opensource.se>
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
9cc7c80b57c66d08e67f297169783d1f07288066 05-May-2011 Dmitry Torokhov <dmitry.torokhov@gmail.com> Input: sh_keysc - only compile PM code if PM is enabled

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12d0cef701775f7f52667c33e57a5fe61fa49bd5 03-May-2011 Dmitry Torokhov <dmitry.torokhov@gmail.com> Input: sh_keysc - make sh_keysc_device_driver static

This variable is not used outside of the module so we should mark it
as static.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2dfb9a85ecb86f00b085d6fca7d4bb8dc6764710 28-Apr-2011 Magnus Damm <damm@opensource.se> Input: sh_keysc - switch to threaded IRQ handler

Update the KEYSC driver to make use of threaded IRQs with IRQF_ONESHOT
to improve interrupt latency. The driver is using udelay() in the ISR
to make sure the hardware has stabilized. Without using interrupt threads
this delay may affect the latency of the rest of the system.

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

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
b6d2a3e6ff6a7019b4a240b6bc4a4d74ce82d533 28-Apr-2011 Magnus Damm <damm@opensource.se> Input: sh_keysc - implement runtime PM support

Convert the KEYSC driver from MSTP bit control through a magic clock
string to making use of Runtime PM.

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

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
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>
8f8be2439cd368cc6ba94888919ee90b5a26f0cb 11-Feb-2010 Magnus Damm <damm@opensource.se> Input: sh_keysc - update the driver with mode 6

Add mode 6 support to the sh_keysc driver. Also update the KYOUTDR mask
value to include all 16 register bits.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
324e5ade1569111a40c349726d8a2694b28d7943 11-Feb-2010 Magnus Damm <damm@opensource.se> Input: sh_keysc - switch to using bitmaps

Use bitmaps instead of using 32-bit integers to keep track of the key
states. With this change in place the driver supports key pads with
more than 32 keys.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2b14a808fbbb042d0de323260d939bdf95e9efdf 11-Feb-2010 Magnus Damm <damm@opensource.se> Input: sh_keysc - factor out hw access functions

Update the sh_keysc driver to factor out the register access functions
sh_keysc_read(), sh_keysc_write() together with sh_keysc_level_mode().
This makes the code a bit easier to follow.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
3bf127637e22ddf95e67e10a23c339cee3d52429 21-Jan-2010 Magnus Damm <damm@opensource.se> Input: sh_keysc - add mode 4 and mode 5 support

Add Mode 4 and Mode 5 support to the SH_KEYSC driver. These modes allow
slightly larger key pad matrixes.

While at it, make use of resource_size().

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
471452104b8520337ae2fb48c4e61cd4896e025d 15-Dec-2009 Alexey Dobriyan <adobriyan@gmail.com> const: constify remaining dev_pm_ops

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fc1d003de39c306a44abce97c346921de31277cd 27-Nov-2009 Magnus Damm <damm@opensource.se> sh: Move KEYSC header file

This patch moves the KEYSC header file from the
SuperH specific asm directory to a place where
it can be shared by multiple architectures.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
1f85d381062a046fd8f3ddb654a5276266daf72c 15-Sep-2009 Kuninori Morimoto <morimoto.kuninori@renesas.com> sh: add kycr2_delay for sh_keysc

After KYCR2 is set, udelay might become necessary if there are only a
small number of keys attached. This patch introduces an optional delay
through the platform data to address this problem.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
24d01c0681bfbc10a99304c48a89ad213d2d7a4b 21-Jul-2009 Dmitry Torokhov <dmitry.torokhov@gmail.com> Input: sh_keysc - allow modifying keymap from userspace

Adjust the driver so EVIOCGKEYCODE/EVIOCSKEYCODE work.

Acked-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
4ba50df685e85b9d912a290d9614ffbeb4d9f060 01-Apr-2009 Magnus Damm <damm@igel.co.jp> input: sh_keysc: use enable/disable_irq_wake()

Modify the sh_keysc driver to use enable/disable_irq_wake()
during suspend and resume. These functions are used to enable
the sh_keysc interrupt in the interrupt controller so the
keypad can be used to wakeup the system from suspend.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
49976927de5c52c415d4809c7d56700cc8ff4215 11-Mar-2009 Magnus Damm <damm@igel.co.jp> input: sh_keysc suspend can use to_platform_device()

This patch changes sh_keysc to use to_platform_device()
for suspend. Thanks to Trilok Soni for this suggestion.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Reviewed-by: Trilok Soni <soni.trilok@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
a29b99eccecefe5026713b226f66f117c8837ad5 10-Mar-2009 Magnus Damm <damm@igel.co.jp> input: add suspend wakeup support to sh_keysc

This patch adds wakeup support to the sh_keysc driver.
With this feature the ".../power/wakeup" file can be
used to enable and disable if the device takes the
system out of suspend. Default is enabled.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
090d951b69f29a8d5777c63570d4cd61d7efeb22 31-Oct-2008 Magnus Damm <damm@igel.co.jp> sh: sh_mobile keysc clock framework support

Add clock framework support to the sh_mobile keysc driver and
adjust the board specific code accordingly.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
d3aa43a9db3b18e65f91985b5b91f2450d8b4048 19-Jul-2008 Tetsuya Mukawa <mukawa@igel.co.jp> sh_keysc: remove request_mem_region() and release_mem_region()

Remove request_mem_region() and release_mem_region() from sh_keysc driver.
Those functions can find resource conflict, but it is already checked in
platform_device_add().

Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
6dea7814e1c6a27701a63b271fc580791e066537 21-Mar-2008 Magnus Damm <magnus.damm@gmail.com> Fix sh_keysc double free

Avoid double free situation from happening by removing input_free_device()
after input_unregister_device(). Suggested by Dmitry Torokhov.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
795e6bf33561ff03e253a6a756d5eb663b4a56bd 05-Mar-2008 Magnus Damm <magnus.damm@gmail.com> sh: SuperH KEYSC platform driver

Add a platform driver for the SuperH KEYSC block. The driver expects to get
mode, timing information and keypad layout from the board code as platform
data. The board code is resonsible for pin configuration.

Both sh7343 and sh7722 should be supported, but only the sh7722 processor has
been tested so far. SH_KEYSC_MODE_3 is yet to be tested.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Cc: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>