diff options
author | Olof Johansson <olof@lixom.net> | 2012-03-14 08:35:51 +0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-03-14 08:37:04 +0400 |
commit | 2cd36877ad1c61429e00c099b6903ebcd936ca00 (patch) | |
tree | c9f7618f3b49c2ba5516c9023ba7e5604aa6b08c /include/linux/input | |
parent | b51425becfe127e0c17a8501ffa079b37241ed11 (diff) | |
download | linux-2cd36877ad1c61429e00c099b6903ebcd936ca00.tar.xz |
Input: of_keymap - add device tree bindings for simple key matrices
This adds a simple device tree binding for simple key matrix data and
a helper to fill in the platform data.
Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'include/linux/input')
-rw-r--r-- | include/linux/input/matrix_keypad.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/input/matrix_keypad.h b/include/linux/input/matrix_keypad.h index fe7c4b9ae270..6c07ced0af81 100644 --- a/include/linux/input/matrix_keypad.h +++ b/include/linux/input/matrix_keypad.h @@ -3,6 +3,7 @@ #include <linux/types.h> #include <linux/input.h> +#include <linux/of.h> #define MATRIX_MAX_ROWS 32 #define MATRIX_MAX_COLS 32 @@ -106,4 +107,22 @@ matrix_keypad_build_keymap(const struct matrix_keymap_data *keymap_data, __clear_bit(KEY_RESERVED, keybit); } +#ifdef CONFIG_INPUT_OF_MATRIX_KEYMAP +struct matrix_keymap_data * +matrix_keyboard_of_fill_keymap(struct device_node *np, const char *propname); + +void matrix_keyboard_of_free_keymap(const struct matrix_keymap_data *kd); +#else +static inline struct matrix_keymap_data * +matrix_keyboard_of_fill_keymap(struct device_node *np, const char *propname) +{ + return NULL; +} + +static inline void +matrix_keyboard_of_free_keymap(const struct matrix_keymap_data *kd) +{ +} +#endif + #endif /* _MATRIX_KEYPAD_H */ |