mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
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>
This commit is contained in:
parent
b51425becf
commit
2cd36877ad
6 changed files with 131 additions and 0 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue