diff options
author | Mark F. Brown <mark.brown314@gmail.com> | 2010-09-04 00:28:11 +0200 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2010-10-09 11:07:21 +0200 |
commit | 6aafc5f394fce437bf005b59034d7e5917778a99 (patch) | |
tree | 290ec52f588b2995a20212dbb4d2ea4b7dfa758d /arch/arm | |
parent | ARM: pxa168: added keypad wake clear event support for platform (diff) | |
download | linux-6aafc5f394fce437bf005b59034d7e5917778a99.tar.xz linux-6aafc5f394fce437bf005b59034d7e5917778a99.zip |
ARM: pxa168/aspenite: add board support for keypad
Signed-off-by: Mark F. Brown <mark.brown314@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-mmp/aspenite.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c index 9e1bd6b1fdfb..f04bae6e4ccf 100644 --- a/arch/arm/mach-mmp/aspenite.c +++ b/arch/arm/mach-mmp/aspenite.c @@ -24,6 +24,8 @@ #include <mach/pxa168.h> #include <mach/gpio.h> #include <video/pxa168fb.h> +#include <linux/input.h> +#include <plat/pxa27x_keypad.h> #include "common.h" @@ -97,6 +99,13 @@ static unsigned long common_pin_config[] __initdata = { GPIO81_LCD_DD21, GPIO82_LCD_DD22, GPIO83_LCD_DD23, + + /* Keypad */ + GPIO109_KP_MKIN1, + GPIO110_KP_MKIN0, + GPIO111_KP_MKOUT7, + GPIO112_KP_MKOUT6, + GPIO121_KP_MKIN4, }; static struct smc91x_platdata smc91x_info = { @@ -193,6 +202,23 @@ struct pxa168fb_mach_info aspenite_lcd_info = { .invert_pixclock = 0, }; +static unsigned int aspenite_matrix_key_map[] = { + KEY(0, 6, KEY_UP), /* SW 4 */ + KEY(0, 7, KEY_DOWN), /* SW 5 */ + KEY(1, 6, KEY_LEFT), /* SW 6 */ + KEY(1, 7, KEY_RIGHT), /* SW 7 */ + KEY(4, 6, KEY_ENTER), /* SW 8 */ + KEY(4, 7, KEY_ESC), /* SW 9 */ +}; + +static struct pxa27x_keypad_platform_data aspenite_keypad_info __initdata = { + .matrix_key_rows = 5, + .matrix_key_cols = 8, + .matrix_key_map = aspenite_matrix_key_map, + .matrix_key_map_size = ARRAY_SIZE(aspenite_matrix_key_map), + .debounce_interval = 30, +}; + static void __init common_init(void) { mfp_config(ARRAY_AND_SIZE(common_pin_config)); @@ -203,6 +229,7 @@ static void __init common_init(void) pxa168_add_ssp(1); pxa168_add_nand(&aspenite_nand_info); pxa168_add_fb(&aspenite_lcd_info); + pxa168_add_keypad(&aspenite_keypad_info); /* off-chip devices */ platform_device_register(&smc91x_device); |