mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
Input: matrix-keymap - wire up device tree support
When platform keymap is not supplied to matrix_keypad_build_keymap() and device tree support is enabled, try locating specified property and load keymap from it. If property name is not defined, try using "linux,keymap". Based on earlier patch by Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
parent
1932811f42
commit
b45c8f35a7
3 changed files with 130 additions and 119 deletions
|
@ -81,22 +81,4 @@ int matrix_keypad_build_keymap(const struct matrix_keymap_data *keymap_data,
|
|||
unsigned short *keymap,
|
||||
struct input_dev *input_dev);
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
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