diff options
Diffstat (limited to 'arch/arm/mach-pxa/ezx.c')
-rw-r--r-- | arch/arm/mach-pxa/ezx.c | 60 |
1 files changed, 42 insertions, 18 deletions
diff --git a/arch/arm/mach-pxa/ezx.c b/arch/arm/mach-pxa/ezx.c index dca10709be8f..fe2eb8394dff 100644 --- a/arch/arm/mach-pxa/ezx.c +++ b/arch/arm/mach-pxa/ezx.c | |||
@@ -392,7 +392,7 @@ static unsigned long e6_pin_config[] __initdata = { | |||
392 | 392 | ||
393 | /* KEYPAD */ | 393 | /* KEYPAD */ |
394 | #ifdef CONFIG_MACH_EZX_A780 | 394 | #ifdef CONFIG_MACH_EZX_A780 |
395 | static unsigned int a780_key_map[] = { | 395 | static const unsigned int a780_key_map[] = { |
396 | KEY(0, 0, KEY_SEND), | 396 | KEY(0, 0, KEY_SEND), |
397 | KEY(0, 1, KEY_BACK), | 397 | KEY(0, 1, KEY_BACK), |
398 | KEY(0, 2, KEY_END), | 398 | KEY(0, 2, KEY_END), |
@@ -424,11 +424,15 @@ static unsigned int a780_key_map[] = { | |||
424 | KEY(4, 4, KEY_DOWN), | 424 | KEY(4, 4, KEY_DOWN), |
425 | }; | 425 | }; |
426 | 426 | ||
427 | static struct matrix_keymap_data a780_matrix_keymap_data = { | ||
428 | .keymap = a780_key_map, | ||
429 | .keymap_size = ARRAY_SIZE(a780_key_map), | ||
430 | }; | ||
431 | |||
427 | static struct pxa27x_keypad_platform_data a780_keypad_platform_data = { | 432 | static struct pxa27x_keypad_platform_data a780_keypad_platform_data = { |
428 | .matrix_key_rows = 5, | 433 | .matrix_key_rows = 5, |
429 | .matrix_key_cols = 5, | 434 | .matrix_key_cols = 5, |
430 | .matrix_key_map = a780_key_map, | 435 | .matrix_keymap_data = &a780_matrix_keymap_data, |
431 | .matrix_key_map_size = ARRAY_SIZE(a780_key_map), | ||
432 | 436 | ||
433 | .direct_key_map = { KEY_CAMERA }, | 437 | .direct_key_map = { KEY_CAMERA }, |
434 | .direct_key_num = 1, | 438 | .direct_key_num = 1, |
@@ -438,7 +442,7 @@ static struct pxa27x_keypad_platform_data a780_keypad_platform_data = { | |||
438 | #endif /* CONFIG_MACH_EZX_A780 */ | 442 | #endif /* CONFIG_MACH_EZX_A780 */ |
439 | 443 | ||
440 | #ifdef CONFIG_MACH_EZX_E680 | 444 | #ifdef CONFIG_MACH_EZX_E680 |
441 | static unsigned int e680_key_map[] = { | 445 | static const unsigned int e680_key_map[] = { |
442 | KEY(0, 0, KEY_UP), | 446 | KEY(0, 0, KEY_UP), |
443 | KEY(0, 1, KEY_RIGHT), | 447 | KEY(0, 1, KEY_RIGHT), |
444 | KEY(0, 2, KEY_RESERVED), | 448 | KEY(0, 2, KEY_RESERVED), |
@@ -455,11 +459,15 @@ static unsigned int e680_key_map[] = { | |||
455 | KEY(2, 3, KEY_KPENTER), | 459 | KEY(2, 3, KEY_KPENTER), |
456 | }; | 460 | }; |
457 | 461 | ||
462 | static struct matrix_keymap_data e680_matrix_keymap_data = { | ||
463 | .keymap = e680_key_map, | ||
464 | .keymap_size = ARRAY_SIZE(e680_key_map), | ||
465 | }; | ||
466 | |||
458 | static struct pxa27x_keypad_platform_data e680_keypad_platform_data = { | 467 | static struct pxa27x_keypad_platform_data e680_keypad_platform_data = { |
459 | .matrix_key_rows = 3, | 468 | .matrix_key_rows = 3, |
460 | .matrix_key_cols = 4, | 469 | .matrix_key_cols = 4, |
461 | .matrix_key_map = e680_key_map, | 470 | .matrix_keymap_data = &e680_matrix_keymap_data, |
462 | .matrix_key_map_size = ARRAY_SIZE(e680_key_map), | ||
463 | 471 | ||
464 | .direct_key_map = { | 472 | .direct_key_map = { |
465 | KEY_CAMERA, | 473 | KEY_CAMERA, |
@@ -476,7 +484,7 @@ static struct pxa27x_keypad_platform_data e680_keypad_platform_data = { | |||
476 | #endif /* CONFIG_MACH_EZX_E680 */ | 484 | #endif /* CONFIG_MACH_EZX_E680 */ |
477 | 485 | ||
478 | #ifdef CONFIG_MACH_EZX_A1200 | 486 | #ifdef CONFIG_MACH_EZX_A1200 |
479 | static unsigned int a1200_key_map[] = { | 487 | static const unsigned int a1200_key_map[] = { |
480 | KEY(0, 0, KEY_RESERVED), | 488 | KEY(0, 0, KEY_RESERVED), |
481 | KEY(0, 1, KEY_RIGHT), | 489 | KEY(0, 1, KEY_RIGHT), |
482 | KEY(0, 2, KEY_PAGEDOWN), | 490 | KEY(0, 2, KEY_PAGEDOWN), |
@@ -513,18 +521,22 @@ static unsigned int a1200_key_map[] = { | |||
513 | KEY(4, 5, KEY_RESERVED), | 521 | KEY(4, 5, KEY_RESERVED), |
514 | }; | 522 | }; |
515 | 523 | ||
524 | static struct matrix_keymap_data a1200_matrix_keymap_data = { | ||
525 | .keymap = a1200_key_map, | ||
526 | .keymap_size = ARRAY_SIZE(a1200_key_map), | ||
527 | }; | ||
528 | |||
516 | static struct pxa27x_keypad_platform_data a1200_keypad_platform_data = { | 529 | static struct pxa27x_keypad_platform_data a1200_keypad_platform_data = { |
517 | .matrix_key_rows = 5, | 530 | .matrix_key_rows = 5, |
518 | .matrix_key_cols = 6, | 531 | .matrix_key_cols = 6, |
519 | .matrix_key_map = a1200_key_map, | 532 | .matrix_keymap_data = &a1200_matrix_keymap_data, |
520 | .matrix_key_map_size = ARRAY_SIZE(a1200_key_map), | ||
521 | 533 | ||
522 | .debounce_interval = 30, | 534 | .debounce_interval = 30, |
523 | }; | 535 | }; |
524 | #endif /* CONFIG_MACH_EZX_A1200 */ | 536 | #endif /* CONFIG_MACH_EZX_A1200 */ |
525 | 537 | ||
526 | #ifdef CONFIG_MACH_EZX_E6 | 538 | #ifdef CONFIG_MACH_EZX_E6 |
527 | static unsigned int e6_key_map[] = { | 539 | static const unsigned int e6_key_map[] = { |
528 | KEY(0, 0, KEY_RESERVED), | 540 | KEY(0, 0, KEY_RESERVED), |
529 | KEY(0, 1, KEY_RIGHT), | 541 | KEY(0, 1, KEY_RIGHT), |
530 | KEY(0, 2, KEY_PAGEDOWN), | 542 | KEY(0, 2, KEY_PAGEDOWN), |
@@ -561,18 +573,22 @@ static unsigned int e6_key_map[] = { | |||
561 | KEY(4, 5, KEY_PREVIOUSSONG), | 573 | KEY(4, 5, KEY_PREVIOUSSONG), |
562 | }; | 574 | }; |
563 | 575 | ||
576 | static struct matrix_keymap_data e6_keymap_data = { | ||
577 | .keymap = e6_key_map, | ||
578 | .keymap_size = ARRAY_SIZE(e6_key_map), | ||
579 | }; | ||
580 | |||
564 | static struct pxa27x_keypad_platform_data e6_keypad_platform_data = { | 581 | static struct pxa27x_keypad_platform_data e6_keypad_platform_data = { |
565 | .matrix_key_rows = 5, | 582 | .matrix_key_rows = 5, |
566 | .matrix_key_cols = 6, | 583 | .matrix_key_cols = 6, |
567 | .matrix_key_map = e6_key_map, | 584 | .matrix_keymap_data = &e6_keymap_data, |
568 | .matrix_key_map_size = ARRAY_SIZE(e6_key_map), | ||
569 | 585 | ||
570 | .debounce_interval = 30, | 586 | .debounce_interval = 30, |
571 | }; | 587 | }; |
572 | #endif /* CONFIG_MACH_EZX_E6 */ | 588 | #endif /* CONFIG_MACH_EZX_E6 */ |
573 | 589 | ||
574 | #ifdef CONFIG_MACH_EZX_A910 | 590 | #ifdef CONFIG_MACH_EZX_A910 |
575 | static unsigned int a910_key_map[] = { | 591 | static const unsigned int a910_key_map[] = { |
576 | KEY(0, 0, KEY_NUMERIC_6), | 592 | KEY(0, 0, KEY_NUMERIC_6), |
577 | KEY(0, 1, KEY_RIGHT), | 593 | KEY(0, 1, KEY_RIGHT), |
578 | KEY(0, 2, KEY_PAGEDOWN), | 594 | KEY(0, 2, KEY_PAGEDOWN), |
@@ -609,18 +625,22 @@ static unsigned int a910_key_map[] = { | |||
609 | KEY(4, 5, KEY_RESERVED), | 625 | KEY(4, 5, KEY_RESERVED), |
610 | }; | 626 | }; |
611 | 627 | ||
628 | static struct matrix_keymap_data a910_matrix_keymap_data = { | ||
629 | .keymap = a910_key_map, | ||
630 | .keymap_size = ARRAY_SIZE(a910_key_map), | ||
631 | }; | ||
632 | |||
612 | static struct pxa27x_keypad_platform_data a910_keypad_platform_data = { | 633 | static struct pxa27x_keypad_platform_data a910_keypad_platform_data = { |
613 | .matrix_key_rows = 5, | 634 | .matrix_key_rows = 5, |
614 | .matrix_key_cols = 6, | 635 | .matrix_key_cols = 6, |
615 | .matrix_key_map = a910_key_map, | 636 | .matrix_keymap_data = &a910_matrix_keymap_data, |
616 | .matrix_key_map_size = ARRAY_SIZE(a910_key_map), | ||
617 | 637 | ||
618 | .debounce_interval = 30, | 638 | .debounce_interval = 30, |
619 | }; | 639 | }; |
620 | #endif /* CONFIG_MACH_EZX_A910 */ | 640 | #endif /* CONFIG_MACH_EZX_A910 */ |
621 | 641 | ||
622 | #ifdef CONFIG_MACH_EZX_E2 | 642 | #ifdef CONFIG_MACH_EZX_E2 |
623 | static unsigned int e2_key_map[] = { | 643 | static const unsigned int e2_key_map[] = { |
624 | KEY(0, 0, KEY_NUMERIC_6), | 644 | KEY(0, 0, KEY_NUMERIC_6), |
625 | KEY(0, 1, KEY_RIGHT), | 645 | KEY(0, 1, KEY_RIGHT), |
626 | KEY(0, 2, KEY_NUMERIC_9), | 646 | KEY(0, 2, KEY_NUMERIC_9), |
@@ -657,11 +677,15 @@ static unsigned int e2_key_map[] = { | |||
657 | KEY(4, 5, KEY_RESERVED), | 677 | KEY(4, 5, KEY_RESERVED), |
658 | }; | 678 | }; |
659 | 679 | ||
680 | static struct matrix_keymap_data e2_matrix_keymap_data = { | ||
681 | .keymap = e2_key_map, | ||
682 | .keymap_size = ARRAY_SIZE(e2_key_map), | ||
683 | }; | ||
684 | |||
660 | static struct pxa27x_keypad_platform_data e2_keypad_platform_data = { | 685 | static struct pxa27x_keypad_platform_data e2_keypad_platform_data = { |
661 | .matrix_key_rows = 5, | 686 | .matrix_key_rows = 5, |
662 | .matrix_key_cols = 6, | 687 | .matrix_key_cols = 6, |
663 | .matrix_key_map = e2_key_map, | 688 | .matrix_keymap_data = &e2_matrix_keymap_data, |
664 | .matrix_key_map_size = ARRAY_SIZE(e2_key_map), | ||
665 | 689 | ||
666 | .debounce_interval = 30, | 690 | .debounce_interval = 30, |
667 | }; | 691 | }; |