History log of /drivers/input/keyboard/tegra-kbc.c
Revision Date Author Comments
fe6b0dfaba689ad5481037bdfbf31531b3e4c074 07-Nov-2013 Stephen Warren <swarren@nvidia.com> Input: tegra-kbc - use reset framework

Tegra's clock driver now provides an implementation of the common
reset API (include/linux/reset.h). Use this instead of the old Tegra-
specific API; that will soon be removed.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
3cbd04f856467d8e3b2cb15194508f38c507047a 06-Oct-2013 Sachin Kamat <sachin.kamat@linaro.org> Input: tegra-kbc - remove redundant of_match_ptr

The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
eacd0c47966b918f10c7ac1a91dd9fccb0f58ddd 15-Aug-2013 Julia Lawall <Julia.Lawall@lip6.fr> Input: tegra-kbc - simplify use of devm_ioremap_resource

Remove unneeded error handling on the result of a call to
platform_get_resource when the value is passed to devm_ioremap_resource.

Move the call to platform_get_resource adjacent to the call to
devm_ioremap_resource to make the connection between them more clear.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression pdev,res,n,e,e1;
expression ret != 0;
identifier l;
@@

- res = platform_get_resource(pdev, IORESOURCE_MEM, n);
... when != res
- if (res == NULL) { ... \(goto l;\|return ret;\) }
... when != res
+ res = platform_get_resource(pdev, IORESOURCE_MEM, n);
e = devm_ioremap_resource(e1, res);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
e10af9e79a97ac5d305ec1be94338e8d3fd7aaa4 31-Mar-2013 Laxman Dewangan <ldewangan@nvidia.com> Input: tegra-kbc - support for defining row/columns based on SoC

NVIDIA's Tegra20 and Tegra30 supports the 16x8 keyboard matrix and T114
support the 11x8 Key matrix.

Add support for defining the maximum row/columns based on SoC through
proper compatibility.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
ba52a7fc434bea7c4a5d0ac7c10bf131f5ac60e2 18-Mar-2013 Sachin Kamat <sachin.kamat@linaro.org> Input: tegra-kbc - convert to devm_ioremap_resource()

Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.

devm_ioremap_resource() provides its own error messages; so all explicit
error messages can be removed from the failure code paths.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9eee07d39fa606a191ae65d3c0e12771a80e70ca 16-Feb-2013 Stephen Warren <swarren@nvidia.com> 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>
61fd290d213e25d5a119b8ca25644001ed9f8f2d 11-Jan-2013 Prashant Gaikwad <pgaikwad@nvidia.com> ARM: tegra: migrate to new clock code

Migrate Tegra clock support to drivers/clk/tegra, this involves
moving:
1. definition of tegra_cpu_car_ops to clk.c
2. definition of reset functions to clk-peripheral.c
3. change parent of cpu clock.
4. Remove legacy clock initialization.
5. Initialize clocks using DT.
6. Remove all instance of mach/clk.h

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
[swarren: use to_clk_periph_gate().]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
914e597682375ad732d2fedecd855ac637ed7ef7 07-Jan-2013 Laxman Dewangan <ldewangan@nvidia.com> Input: tegra-kbc - remove default keymap

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

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
88390243a9937f9831aeba5113a8b59bb1d4411a 07-Jan-2013 Laxman Dewangan <ldewangan@nvidia.com> Input: tegra-kbc - add support for rows/columns configuration from dt

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

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

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
00eb81e56a38ffb7839e0e6262e26c20c617d2ab 07-Jan-2013 Laxman Dewangan <ldewangan@nvidia.com> Input: tegra-kbc - use devm_* for resource allocation

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

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1c407a1b24debecccc42e5a2ae167f058dbb6fba 07-Jan-2013 Laxman Dewangan <ldewangan@nvidia.com> Input: tegra-kbc - fix build warning

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

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

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
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>
d6f6dfd941de2b106af1290b810eff9b1c523772 24-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> Input: remove use of __devinitdata

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

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
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>
a85442ade272121927a56e02f7dfde1127482df2 05-Sep-2012 Stephen Warren <swarren@nvidia.com> Input: tegra - move platform data header

Move the Tegra KBC platform data header out of arch/arm/mach-tegra, as
a pre-requisite of single zImage.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
f762470b522014ce4ebda3ecac74eb6658da7d9d 05-Jun-2012 Prashant Gaikwad <pgaikwad@nvidia.com> Input: tegra-kbc - add clk_prepare/clk_unprepare

Use clk_prepare/clk_unprepare as required by the generic clk framework.

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
b45c8f35a7fec17bdd159a7815203b6137c00ab9 11-May-2012 Dmitry Torokhov <dmitry.torokhov@gmail.com> Input: matrix-keymap - wire up device tree support

When platform keymap is not supplied to matrix_keypad_build_keymap()
and device tree support is enabled, try locating specified property
and load keymap from it. If property name is not defined, try using
"linux,keymap".

Based on earlier patch by Viresh Kumar <viresh.kumar@st.com>

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
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>
131c713fd96e251fcb18f4d2d05f263aa41bb11f 27-Mar-2012 Viresh Kumar <viresh.kumar@st.com> Input: tegra-kbc - allocate pdata before using it

Following commit broke DT support for tegra-kbc by removing pdata
allocation completely:

commit 023cea0ecfa2df034096c3f4afa796a0b2d1188a
Author: Shridhar Rasal <srasal@nvidia.com>
Date: Fri Feb 3 00:27:30 2012 -0800

Input: tegra-kbc - allow skipping setting up some of GPIO pins

This patch restores it.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
145e97348a3066cf71038d02392aa8063550de6f 14-Mar-2012 Olof Johansson <olof@lixom.net> Input: tegra-kbc - revise device tree support

This is an incremental patch updating to the revised bindings for
matrix keyboards.

This includes an optional "linux,fn-keymap" binding that is not yet
implemented, that will be used to specify the Fn-key modifier layout
if needed.

Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
023cea0ecfa2df034096c3f4afa796a0b2d1188a 03-Feb-2012 Shridhar Rasal <srasal@nvidia.com> Input: tegra-kbc - allow skipping setting up some of GPIO pins

Allow marking some of GPIO pins as ignored to to avoid continuously
generating KBC input events.

Signed-off-by: Shridhar Rasal <srasal@nvidia.com>

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
b6834b02e476ff0e99b6814665839e37affa31f0 23-Jan-2012 Rakesh Iyer <riyer@nvidia.com> Input: tegra-kbc - enable key interrupt for wakeup

Enable keypress interrupt to support wakeup from low power state.

Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
fd0fc21350838d3073647be173242db0c58744c8 30-Dec-2011 Rakesh Iyer <riyer@nvidia.com> Input: tegra-kbc - report wakeup key for some platforms

Tegra kbc cannot detect exact keypress causing wakeup in interrupt mode.
Allow wakeup keypress to be reported for certain platforms.

Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
a445c7f0afb9114ef3de2d123f2c851787cf9d11 29-Dec-2011 Olof Johansson <olof@lixom.net> Input: tegra-kbc - add device tree bindings

This adds a simple device tree binding to the tegra keyboard controller.

Also, mark the default keymap as __devinitdata since it is not referenced
after boot.

Signed-off-by: Olof Johansson <olof@lixom.net>
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>
95439cbad134de58d9ea256e37fd13fbcdc87d08 09-Sep-2011 Dmitry Torokhov <dmitry.torokhov@gmail.com> Input: tegra-kbc - tighten locking

Take spinlock when entering ISR and timer routine to ensure that we do not
race while enabling/disabling FIFO interrupts.

Also we do not need to take teh spinlock in tegra_kbc_startremove() since
interrupt is completely disabled.

Tested-by: Rakesh Iyer <riyer@nvidia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
d0d150ec28ab05eb2ec8cf9fcb7c9753ec95e0d4 09-Sep-2011 Rakesh Iyer <riyer@nvidia.com> Input: tegra-kbc - fix wakeup from suspend

For wakeup to be reliable, kbc needs to be in interrupt mode before suspend.
Created common routine to control the FIFO interrupt.
Added synchronization to ensure orderly suspend.

Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
22f83205e59c97c2460ad8e4bd6e71268cb2f37f 11-Aug-2011 Axel Lin <axel.lin@gmail.com> Input: tegra-kbc - correct call to input_free_device

If kzalloc for kbc fails, then we have NULL pointer dereference while
calling input_free_device(kbc->idev) in the error handling.
So it is safer to always use the original name, input_dev.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
3f27757a1182f5e3feff7425b1c3e43f3e466724 30-Jul-2011 Rakesh Iyer <riyer@nvidia.com> Input: tegra-kbc - fix computation of polling time

Fix a constant definition and computation of polling time.

[dtor@mail.ru: switched to using DIV_ROUND_UP as was suggested by
Thierry Reding <thierry.reding@avionic-design.de>]

Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
5599d2e60b1191520778def7c0658fbc6de6d8c1 25-Jul-2011 Rakesh Iyer <riyer@nvidia.com> Input: tegra-kbc - enable key autorepeat

To support key repeats, keyboard needs to be setup as an autorepeating
device.

Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
baafb435372dd48e3854028aec669effae957c9e 11-May-2011 Rakesh Iyer <riyer@nvidia.com> Input: tegra-kbc - change wakeup logic to be all or nothing

Tegra hardware design cannot reliably support an arbitrary set of keys
waking up the system. Modify wakeup logic so either any key wakes the
system up or none will do.

Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
34abeeb23575c9c25b8c582d582e5bcfcd1cf338 28-Apr-2011 Rakesh Iyer <riyer@nvidia.com> Input: tegra-kbc - add ghost key filter

Add ghost key filtering support for the Nvidia Tegra matrix keyboard.

Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
4e8b65f606b9e4e6922fd17a772fe3e69cc5553b 18-Feb-2011 Rakesh Iyer <riyer@nvidia.com> Input: tegra-kbc - add function keymap

Add Fn keymap support to allow for internal processing of Fn keys.

Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
e7acc84a27fe53b198cd98cc7deaabb5dd0f20c4 29-Jan-2011 Rakesh Iyer <riyer@nvidia.com> Input: tegra-kbc - fix keymap entry for LeftMeta key

Correct key mapping for Left Meta key.

Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
7530c4a197f3dd63f1381c1cdf93e4d2b8429ef5 29-Jan-2011 Rakesh Iyer <riyer@nvidia.com> Input: tegra-kbc - fix build error

Fix build error introduced by variable name change.

Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
11f5b30dacdd77bee1028764d91ad58b6c73d50c 20-Jan-2011 Rakesh Iyer <riyer@nvidia.com> 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>