diff options
author | Anton Staaf <robotboy@chromium.org> | 2011-06-27 11:26:29 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-08-29 10:39:42 -0700 |
commit | b8c589e180bbc16a92908303732eb362539e7a7a (patch) | |
tree | 0f62a0c8169a8d4992ef6ff15f498ecea51f985f /include | |
parent | d92feb3dc8786fbc1d4f3cb0dfc71595c73bf90c (diff) |
arm: Tegra: Add FDT support to keyboard driver
This makes the Tegra keyboard driver use the fdt decode function to obtain
its key codes.
Signed-off-by: Anton Staaf <robotboy@chromium.org>
BUG=chromium-os:11623
TEST=boot U-Boot; type plain, shift and fn keys and check that the correct
output results
Change-Id: I103789b14ed22693dbc7bc3e162e0df5bdb5ad8c
Reviewed-on: http://gerrit.chromium.org/gerrit/3255
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rwxr-xr-x | include/tegra-kbc.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/tegra-kbc.h b/include/tegra-kbc.h index 5d99cdd2bc..9a2357a61f 100755 --- a/include/tegra-kbc.h +++ b/include/tegra-kbc.h @@ -11,10 +11,17 @@ enum KEYS { KEY_FN = 222, KEY_SHIFT = 223}; +enum { + KBC_MAX_ROW = 16, + KBC_MAX_COL = 8, + KBC_KEY_COUNT = KBC_MAX_ROW * KBC_MAX_COL, +}; + struct tegra_keyboard_config { - int *plain_keycode; /* keycode when Shift or FN are not pressed */ - int *shift_keycode; /* keycode when Shift modifier key is pressed */ - int *function_keycode; /* keycode when Fn modifier key is pressed */ + /* keycode tables, one for each row/col position */ + int plain_keycode[KBC_KEY_COUNT]; /* when no Shift or Fn */ + int shift_keycode[KBC_KEY_COUNT]; /* Shift modifier key is pressed */ + int fn_keycode[KBC_KEY_COUNT]; /* Fn modifier key is pressed */ }; struct kbc_tegra { |