Input: pxa27x-keypad - use matrix_keymap for matrix keys

pxa27x-keypad includes matrix keys. Make use of matrix_keymap
for the matrix keys.

Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
Chao Xie
2013-05-05 20:24:58 -07:00
committed by Dmitry Torokhov
parent 483180281f
commit 0a085a9482
18 changed files with 180 additions and 81 deletions

View File

@@ -345,7 +345,7 @@ static inline void z2_leds_init(void) {}
* GPIO keyboard
******************************************************************************/
#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
static unsigned int z2_matrix_keys[] = {
static const unsigned int z2_matrix_keys[] = {
KEY(0, 0, KEY_OPTION),
KEY(1, 0, KEY_UP),
KEY(2, 0, KEY_DOWN),
@@ -405,11 +405,15 @@ static unsigned int z2_matrix_keys[] = {
KEY(5, 7, KEY_DOT),
};
static struct matrix_keymap_data z2_matrix_keymap_data = {
.keymap = z2_matrix_keys,
.keymap_size = ARRAY_SIZE(z2_matrix_keys),
};
static struct pxa27x_keypad_platform_data z2_keypad_platform_data = {
.matrix_key_rows = 7,
.matrix_key_cols = 8,
.matrix_key_map = z2_matrix_keys,
.matrix_key_map_size = ARRAY_SIZE(z2_matrix_keys),
.matrix_keymap_data = &z2_matrix_keymap_data,
.debounce_interval = 30,
};