summaryrefslogtreecommitdiff
path: root/drivers/input/key_matrix.c
Commit message (Collapse)AuthorAgeLines
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-24-17/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* input: Finish simplifing key_matrix_decode_fdt()Stephen Warren2013-06-06-2/+4
| | | | | | | | [trini: Applied v1 of the series rather than v2, this commit is the delta from v1 to v2] Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Rini <trini@ti.com>
* input: simplify key_matrix_decode_fdt()Stephen Warren2013-06-04-40/+26
| | | | | | | | | We know the exact property names that the code wants to process. Look these up directly with fdt_get_property(), rather than iterating over all properties within the node, and checking each property's name, in a convoluted fashion, against the expected name. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* input: fix unaligned access in key_matrix_decode_fdt()Stephen Warren2013-06-04-1/+1
| | | | | | | | | | | | | Initialized character arrays on the stack can cause gcc to emit code that performs unaligned accessess. Make the data static to avoid this. Note that the unaligned accesses are made when copying data to prefix[] on the stack from .rodata. By making the data static, the copy is completely avoided. All explicitly written code treats the data as u8[], so will never cause any unaligned accesses. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
* input: Add debugging for key matrix key codesSimon Glass2012-10-15-0/+2
| | | | | | | | | These are read from the fdt - add a debug feature to display the mapping on start-up. See that we get debug output listing the keycodes Signed-off-by: Simon Glass <sjg@chromium.org>
* input: Allow key ghosting filter to be disabledSimon Glass2012-10-15-2/+7
| | | | | | | Some keyboards will not need a key ghosting filter, so make this feature optional. Signed-off-by: Simon Glass <sjg@chromium.org>
* input: Correct key_matrix fdt decodingSimon Glass2012-10-15-4/+7
| | | | | | | | | Some issues with this were not addressed in the previous series. Fix up the binding decoding to deal with what is actually expected in the fdt. This corrects the broken keyboard on seaboard. Signed-off-by: Simon Glass <sjg@chromium.org>
* input: key_matrix: fix header inclusionStephan Linz2012-09-02-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | On Microblaze with device tree support enabled we run into the error below. I'm not sure, but I think that all source code should include at least the common.h and just this fix the problem on Microblaz architecture. The error is: In file included from key_matrix.c:29: include/malloc.h:364: error: conflicting types for 'memset' include/linux/string.h:71: error: previous declaration of 'memset' was here include/malloc.h:365: error: conflicting types for 'memcpy' include/linux/string.h:74: error: previous declaration of 'memcpy' was here Signed-off-by: Stephan Linz <linz@li-pro.net> CC: Bernie Thompson <bhthompson@chromium.org> CC: Simon Glass <sjg@chromium.org> CC: Tom Warren <twarren@nvidia.com> CC: Michal Simek <monstr@monstr.eu> Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Michal Simek <monstr@monstr.eu>
* input: Add support for keyboard matrix decoding from an fdtBernie Thompson2012-05-15-0/+208
Matrix keyboards require a key map to be set up, and must also deal with key ghosting. Create a keyboard matrix management implementation which can be leveraged by various keyboard drivers. This includes code to read the keymap from the FDT and perform debouncing. Signed-off-by: Bernie Thompson <bhthompson@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>