[U-Boot] [PATCH v4 0/10] tegra: Enable keyboard with matrix keyboard driver

Simon Glass
2012-04-17T19:01:27Z

Tegra2 has a built-in a keyboard controller which we can use to scan
a matrix keyboard. This series brings in a driver for this and adds
support for the QUERTY keyboard on Seaboard as an example.

This version uses the keyboard device-tree definition here:

http://patchwork.ozlabs.org/patch/134093/

so it should work seemlessly with the kernel keyboard device tree node.

Part of this series is an input library which is not tied to Tegra,
but hopes to be more generic. It supports converting key codes (or scan
codes as they are currently called) into ASCII characters, an input FIFO,
multiple key maps and dealing with duplicate key codes under key-repeat
situations (when a key is held down). Half of this library is taken from
keyboard.c and expanded to keep its state in a structure. The other half
of this library is new.

Another part of the series is a keyboard matrix library, which understands
how to convert (row, column) information into key codes in a device tree.

Both of these new libraries are used by the Tegra driver.

If this input library is accepted, then I will update keyboard.c and
i8042.c to use it. If not, then I could subsume it into the Tegra driver
for now. Or I could do something else. But it didn't seem right to add
a third key decoder (ignoring USB which does its own thing).

Changes in v2:
- Remove status = "okay" since this is the default anyway
- Use correct name for get_prop_check_min_len() function

Changes in v3:
- Add new patch for generic keyboard input handler
- Adjust decode logic to work with new Linux fdt keyboard binding
- Bring in linux/input.h header file in new patch
- Move to new Linux device tree mapping for Tegra keyboard
- Use funcmux to set up keyboard pinmux
- Use new input library to handle key decode, fifo, getc()/tstc()

Changes in v4:
- Implement key auto-repeat in the input layer
- Move matrix keyboard handling into a separate module
- Simplify driver as much as possible using input/key matrix layers
- Use new key_matrix handler to deal with key matrix decode

Anton Staff (3):
fdt: Add fdtdec functions to read byte array
tegra: fdt: Add keyboard controller definition
tegra: fdt: Add keyboard definitions for Seaboard

Bernie Thompson (1):
input: Add support for keyboard matrix decoding from an fdt

Rakesh Iyer (1):
tegra: Add tegra keyboard driver

Simon Glass (5):
input: Add linux/input.h for key code support
input: Add generic keyboard input handler
tegra: Add keyboard support to funcmux
tegra: Switch on console mux and use environment for console
tegra: Enable keyboard for Seaboard

arch/arm/cpu/armv7/tegra2/funcmux.c | 16 ++
arch/arm/dts/tegra20.dtsi | 5 +
board/nvidia/dts/tegra2-seaboard.dts | 27 +++
drivers/input/Makefile | 3 +
drivers/input/input.c | 429 ++++++++++++++++++++++++++++++++++
drivers/input/key_matrix.c | 208 ++++++++++++++++
drivers/input/tegra-kbc.c | 375 +++++++++++++++++++++++++++++
include/configs/seaboard.h | 9 +
include/configs/tegra2-common.h | 9 +-
include/fdtdec.h | 33 +++
include/input.h | 145 ++++++++++++
include/key_matrix.h | 99 ++++++++
include/linux/input.h | 155 ++++++++++++
include/tegra-kbc.h | 33 +++
lib/fdtdec.c | 25 ++
15 files changed, 1570 insertions(+), 1 deletions(-)
create mode 100644 drivers/input/input.c
create mode 100644 drivers/input/key_matrix.c
create mode 100644 drivers/input/tegra-kbc.c
create mode 100644 include/input.h
create mode 100644 include/key_matrix.h
create mode 100644 include/linux/input.h
create mode 100644 include/tegra-kbc.h

--
1.7.7.3