diff options
author | Mark F. Brown <mark.brown314@gmail.com> | 2010-09-12 23:51:35 -0400 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2010-10-09 05:07:27 -0400 |
commit | d2ce697309ba5215cc5b2d5a11c8599d9eb1c75c (patch) | |
tree | 98a350f1c95ac313c30f955934f2376990770be9 /arch/arm/mach-mmp | |
parent | 1bbd7089f2effc40c35ffbbc62ad54aefd741633 (diff) |
ARM: pxa168/teton bga: added keypad support
Support for Matrix keypad ESC, ENTER, LEFT, and RIGHT
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/mach-mmp')
-rw-r--r-- | arch/arm/mach-mmp/teton_bga.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/mach-mmp/teton_bga.c b/arch/arm/mach-mmp/teton_bga.c index 4e024c7fb984..f556b2059754 100644 --- a/arch/arm/mach-mmp/teton_bga.c +++ b/arch/arm/mach-mmp/teton_bga.c | |||
@@ -16,6 +16,8 @@ | |||
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
19 | #include <linux/input.h> | ||
20 | #include <plat/pxa27x_keypad.h> | ||
19 | 21 | ||
20 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
21 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
@@ -30,6 +32,27 @@ static unsigned long teton_bga_pin_config[] __initdata = { | |||
30 | /* UART1 */ | 32 | /* UART1 */ |
31 | GPIO107_UART1_TXD, | 33 | GPIO107_UART1_TXD, |
32 | GPIO108_UART1_RXD, | 34 | GPIO108_UART1_RXD, |
35 | |||
36 | /* Keypad */ | ||
37 | GPIO109_KP_MKIN1, | ||
38 | GPIO110_KP_MKIN0, | ||
39 | GPIO111_KP_MKOUT7, | ||
40 | GPIO112_KP_MKOUT6, | ||
41 | }; | ||
42 | |||
43 | static unsigned int teton_bga_matrix_key_map[] = { | ||
44 | KEY(0, 6, KEY_ESC), | ||
45 | KEY(0, 7, KEY_ENTER), | ||
46 | KEY(1, 6, KEY_LEFT), | ||
47 | KEY(1, 7, KEY_RIGHT), | ||
48 | }; | ||
49 | |||
50 | static struct pxa27x_keypad_platform_data teton_bga_keypad_info __initdata = { | ||
51 | .matrix_key_rows = 2, | ||
52 | .matrix_key_cols = 8, | ||
53 | .matrix_key_map = teton_bga_matrix_key_map, | ||
54 | .matrix_key_map_size = ARRAY_SIZE(teton_bga_matrix_key_map), | ||
55 | .debounce_interval = 30, | ||
33 | }; | 56 | }; |
34 | 57 | ||
35 | static void __init teton_bga_init(void) | 58 | static void __init teton_bga_init(void) |
@@ -38,6 +61,7 @@ static void __init teton_bga_init(void) | |||
38 | 61 | ||
39 | /* on-chip devices */ | 62 | /* on-chip devices */ |
40 | pxa168_add_uart(1); | 63 | pxa168_add_uart(1); |
64 | pxa168_add_keypad(&teton_bga_keypad_info); | ||
41 | } | 65 | } |
42 | 66 | ||
43 | MACHINE_START(TETON_BGA, "PXA168-based Teton BGA Development Platform") | 67 | MACHINE_START(TETON_BGA, "PXA168-based Teton BGA Development Platform") |