diff options
-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 @@ | |||
24 | #include <mach/pxa168.h> | 24 | #include <mach/pxa168.h> |
25 | #include <mach/gpio.h> | 25 | #include <mach/gpio.h> |
26 | #include <video/pxa168fb.h> | 26 | #include <video/pxa168fb.h> |
27 | #include <linux/input.h> | ||
28 | #include <plat/pxa27x_keypad.h> | ||
27 | 29 | ||
28 | #include "common.h" | 30 | #include "common.h" |
29 | 31 | ||
@@ -97,6 +99,13 @@ static unsigned long common_pin_config[] __initdata = { | |||
97 | GPIO81_LCD_DD21, | 99 | GPIO81_LCD_DD21, |
98 | GPIO82_LCD_DD22, | 100 | GPIO82_LCD_DD22, |
99 | GPIO83_LCD_DD23, | 101 | GPIO83_LCD_DD23, |
102 | |||
103 | /* Keypad */ | ||
104 | GPIO109_KP_MKIN1, | ||
105 | GPIO110_KP_MKIN0, | ||
106 | GPIO111_KP_MKOUT7, | ||
107 | GPIO112_KP_MKOUT6, | ||
108 | GPIO121_KP_MKIN4, | ||
100 | }; | 109 | }; |
101 | 110 | ||
102 | static struct smc91x_platdata smc91x_info = { | 111 | static struct smc91x_platdata smc91x_info = { |
@@ -193,6 +202,23 @@ struct pxa168fb_mach_info aspenite_lcd_info = { | |||
193 | .invert_pixclock = 0, | 202 | .invert_pixclock = 0, |
194 | }; | 203 | }; |
195 | 204 | ||
205 | static unsigned int aspenite_matrix_key_map[] = { | ||
206 | KEY(0, 6, KEY_UP), /* SW 4 */ | ||
207 | KEY(0, 7, KEY_DOWN), /* SW 5 */ | ||
208 | KEY(1, 6, KEY_LEFT), /* SW 6 */ | ||
209 | KEY(1, 7, KEY_RIGHT), /* SW 7 */ | ||
210 | KEY(4, 6, KEY_ENTER), /* SW 8 */ | ||
211 | KEY(4, 7, KEY_ESC), /* SW 9 */ | ||
212 | }; | ||
213 | |||
214 | static struct pxa27x_keypad_platform_data aspenite_keypad_info __initdata = { | ||
215 | .matrix_key_rows = 5, | ||
216 | .matrix_key_cols = 8, | ||
217 | .matrix_key_map = aspenite_matrix_key_map, | ||
218 | .matrix_key_map_size = ARRAY_SIZE(aspenite_matrix_key_map), | ||
219 | .debounce_interval = 30, | ||
220 | }; | ||
221 | |||
196 | static void __init common_init(void) | 222 | static void __init common_init(void) |
197 | { | 223 | { |
198 | mfp_config(ARRAY_AND_SIZE(common_pin_config)); | 224 | mfp_config(ARRAY_AND_SIZE(common_pin_config)); |
@@ -203,6 +229,7 @@ static void __init common_init(void) | |||
203 | pxa168_add_ssp(1); | 229 | pxa168_add_ssp(1); |
204 | pxa168_add_nand(&aspenite_nand_info); | 230 | pxa168_add_nand(&aspenite_nand_info); |
205 | pxa168_add_fb(&aspenite_lcd_info); | 231 | pxa168_add_fb(&aspenite_lcd_info); |
232 | pxa168_add_keypad(&aspenite_keypad_info); | ||
206 | 233 | ||
207 | /* off-chip devices */ | 234 | /* off-chip devices */ |
208 | platform_device_register(&smc91x_device); | 235 | platform_device_register(&smc91x_device); |