aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/zylonite.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/zylonite.c')
-rw-r--r--arch/arm/mach-pxa/zylonite.c69
1 files changed, 69 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
index afd2cbfca0d9..dbb546216be1 100644
--- a/arch/arm/mach-pxa/zylonite.c
+++ b/arch/arm/mach-pxa/zylonite.c
@@ -26,6 +26,7 @@
26#include <asm/arch/pxafb.h> 26#include <asm/arch/pxafb.h>
27#include <asm/arch/zylonite.h> 27#include <asm/arch/zylonite.h>
28#include <asm/arch/mmc.h> 28#include <asm/arch/mmc.h>
29#include <asm/arch/pxa27x_keypad.h>
29 30
30#include "generic.h" 31#include "generic.h"
31 32
@@ -35,6 +36,8 @@ struct platform_mmc_slot zylonite_mmc_slot[MAX_SLOTS];
35int gpio_backlight; 36int gpio_backlight;
36int gpio_eth_irq; 37int gpio_eth_irq;
37 38
39int wm9713_irq;
40
38int lcd_id; 41int lcd_id;
39int lcd_orientation; 42int lcd_orientation;
40 43
@@ -249,6 +252,71 @@ static void __init zylonite_init_mmc(void)
249static inline void zylonite_init_mmc(void) {} 252static inline void zylonite_init_mmc(void) {}
250#endif 253#endif
251 254
255#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULES)
256static unsigned int zylonite_matrix_key_map[] = {
257 /* KEY(row, col, key_code) */
258 KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_C), KEY(0, 5, KEY_D),
259 KEY(1, 0, KEY_E), KEY(1, 1, KEY_F), KEY(1, 2, KEY_G), KEY(1, 5, KEY_H),
260 KEY(2, 0, KEY_I), KEY(2, 1, KEY_J), KEY(2, 2, KEY_K), KEY(2, 5, KEY_L),
261 KEY(3, 0, KEY_M), KEY(3, 1, KEY_N), KEY(3, 2, KEY_O), KEY(3, 5, KEY_P),
262 KEY(5, 0, KEY_Q), KEY(5, 1, KEY_R), KEY(5, 2, KEY_S), KEY(5, 5, KEY_T),
263 KEY(6, 0, KEY_U), KEY(6, 1, KEY_V), KEY(6, 2, KEY_W), KEY(6, 5, KEY_X),
264 KEY(7, 1, KEY_Y), KEY(7, 2, KEY_Z),
265
266 KEY(4, 4, KEY_0), KEY(1, 3, KEY_1), KEY(4, 1, KEY_2), KEY(1, 4, KEY_3),
267 KEY(2, 3, KEY_4), KEY(4, 2, KEY_5), KEY(2, 4, KEY_6), KEY(3, 3, KEY_7),
268 KEY(4, 3, KEY_8), KEY(3, 4, KEY_9),
269
270 KEY(4, 5, KEY_SPACE),
271 KEY(5, 3, KEY_KPASTERISK), /* * */
272 KEY(5, 4, KEY_KPDOT), /* #" */
273
274 KEY(0, 7, KEY_UP),
275 KEY(1, 7, KEY_DOWN),
276 KEY(2, 7, KEY_LEFT),
277 KEY(3, 7, KEY_RIGHT),
278 KEY(2, 6, KEY_HOME),
279 KEY(3, 6, KEY_END),
280 KEY(6, 4, KEY_DELETE),
281 KEY(6, 6, KEY_BACK),
282 KEY(6, 3, KEY_CAPSLOCK), /* KEY_LEFTSHIFT), */
283
284 KEY(4, 6, KEY_ENTER), /* scroll push */
285 KEY(5, 7, KEY_ENTER), /* keypad action */
286
287 KEY(0, 4, KEY_EMAIL),
288 KEY(5, 6, KEY_SEND),
289 KEY(4, 0, KEY_CALENDAR),
290 KEY(7, 6, KEY_RECORD),
291 KEY(6, 7, KEY_VOLUMEUP),
292 KEY(7, 7, KEY_VOLUMEDOWN),
293
294 KEY(0, 6, KEY_F22), /* soft1 */
295 KEY(1, 6, KEY_F23), /* soft2 */
296 KEY(0, 3, KEY_AUX), /* contact */
297};
298
299static struct pxa27x_keypad_platform_data zylonite_keypad_info = {
300 .matrix_key_rows = 8,
301 .matrix_key_cols = 8,
302 .matrix_key_map = zylonite_matrix_key_map,
303 .matrix_key_map_size = ARRAY_SIZE(zylonite_matrix_key_map),
304
305 .enable_rotary0 = 1,
306 .rotary0_up_key = KEY_UP,
307 .rotary0_down_key = KEY_DOWN,
308
309 .debounce_interval = 30,
310};
311
312static void __init zylonite_init_keypad(void)
313{
314 pxa_set_keypad_info(&zylonite_keypad_info);
315}
316#else
317static inline void zylonite_init_keypad(void) {}
318#endif
319
252static void __init zylonite_init(void) 320static void __init zylonite_init(void)
253{ 321{
254 /* board-processor specific initialization */ 322 /* board-processor specific initialization */
@@ -265,6 +333,7 @@ static void __init zylonite_init(void)
265 333
266 zylonite_init_lcd(); 334 zylonite_init_lcd();
267 zylonite_init_mmc(); 335 zylonite_init_mmc();
336 zylonite_init_keypad();
268} 337}
269 338
270MACHINE_START(ZYLONITE, "PXA3xx Platform Development Kit (aka Zylonite)") 339MACHINE_START(ZYLONITE, "PXA3xx Platform Development Kit (aka Zylonite)")