diff options
author | Syed Rafiuddin <rafiuddin.syed@ti.com> | 2010-12-27 00:51:45 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-02-17 16:42:10 -0500 |
commit | 59556765cd30467ff64a391906ad8eb68f886ad3 (patch) | |
tree | 27583c30dfd43bd476a22a28b4eca3d5b047cad9 /arch/arm/mach-omap2/board-4430sdp.c | |
parent | b9b35ade88d5855de0ac3ebc3d66881f799114f9 (diff) |
OMAP4: keypad: Add the board support
-Add the platform changes for the keypad driver
-Register keyboard device with hwmod framework.
Signed-off-by: Syed Rafiuddin <rafiuddin.syed@ti.com>
Signed-off-by: Abraham Arce <x0066660@ti.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-4430sdp.c')
-rw-r--r-- | arch/arm/mach-omap2/board-4430sdp.c | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 12d99e582cd6..dcc8b27e3033 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <plat/common.h> | 35 | #include <plat/common.h> |
36 | #include <plat/usb.h> | 36 | #include <plat/usb.h> |
37 | #include <plat/mmc.h> | 37 | #include <plat/mmc.h> |
38 | #include <plat/omap4-keypad.h> | ||
38 | 39 | ||
39 | #include "mux.h" | 40 | #include "mux.h" |
40 | #include "hsmmc.h" | 41 | #include "hsmmc.h" |
@@ -48,6 +49,90 @@ | |||
48 | #define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184 | 49 | #define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184 |
49 | #define OMAP4_SFH7741_ENABLE_GPIO 188 | 50 | #define OMAP4_SFH7741_ENABLE_GPIO 188 |
50 | 51 | ||
52 | static const int sdp4430_keymap[] = { | ||
53 | KEY(0, 0, KEY_E), | ||
54 | KEY(0, 1, KEY_R), | ||
55 | KEY(0, 2, KEY_T), | ||
56 | KEY(0, 3, KEY_HOME), | ||
57 | KEY(0, 4, KEY_F5), | ||
58 | KEY(0, 5, KEY_UNKNOWN), | ||
59 | KEY(0, 6, KEY_I), | ||
60 | KEY(0, 7, KEY_LEFTSHIFT), | ||
61 | |||
62 | KEY(1, 0, KEY_D), | ||
63 | KEY(1, 1, KEY_F), | ||
64 | KEY(1, 2, KEY_G), | ||
65 | KEY(1, 3, KEY_SEND), | ||
66 | KEY(1, 4, KEY_F6), | ||
67 | KEY(1, 5, KEY_UNKNOWN), | ||
68 | KEY(1, 6, KEY_K), | ||
69 | KEY(1, 7, KEY_ENTER), | ||
70 | |||
71 | KEY(2, 0, KEY_X), | ||
72 | KEY(2, 1, KEY_C), | ||
73 | KEY(2, 2, KEY_V), | ||
74 | KEY(2, 3, KEY_END), | ||
75 | KEY(2, 4, KEY_F7), | ||
76 | KEY(2, 5, KEY_UNKNOWN), | ||
77 | KEY(2, 6, KEY_DOT), | ||
78 | KEY(2, 7, KEY_CAPSLOCK), | ||
79 | |||
80 | KEY(3, 0, KEY_Z), | ||
81 | KEY(3, 1, KEY_KPPLUS), | ||
82 | KEY(3, 2, KEY_B), | ||
83 | KEY(3, 3, KEY_F1), | ||
84 | KEY(3, 4, KEY_F8), | ||
85 | KEY(3, 5, KEY_UNKNOWN), | ||
86 | KEY(3, 6, KEY_O), | ||
87 | KEY(3, 7, KEY_SPACE), | ||
88 | |||
89 | KEY(4, 0, KEY_W), | ||
90 | KEY(4, 1, KEY_Y), | ||
91 | KEY(4, 2, KEY_U), | ||
92 | KEY(4, 3, KEY_F2), | ||
93 | KEY(4, 4, KEY_VOLUMEUP), | ||
94 | KEY(4, 5, KEY_UNKNOWN), | ||
95 | KEY(4, 6, KEY_L), | ||
96 | KEY(4, 7, KEY_LEFT), | ||
97 | |||
98 | KEY(5, 0, KEY_S), | ||
99 | KEY(5, 1, KEY_H), | ||
100 | KEY(5, 2, KEY_J), | ||
101 | KEY(5, 3, KEY_F3), | ||
102 | KEY(5, 4, KEY_F9), | ||
103 | KEY(5, 5, KEY_VOLUMEDOWN), | ||
104 | KEY(5, 6, KEY_M), | ||
105 | KEY(5, 7, KEY_RIGHT), | ||
106 | |||
107 | KEY(6, 0, KEY_Q), | ||
108 | KEY(6, 1, KEY_A), | ||
109 | KEY(6, 2, KEY_N), | ||
110 | KEY(6, 3, KEY_BACK), | ||
111 | KEY(6, 4, KEY_BACKSPACE), | ||
112 | KEY(6, 5, KEY_UNKNOWN), | ||
113 | KEY(6, 6, KEY_P), | ||
114 | KEY(6, 7, KEY_UP), | ||
115 | |||
116 | KEY(7, 0, KEY_PROG1), | ||
117 | KEY(7, 1, KEY_PROG2), | ||
118 | KEY(7, 2, KEY_PROG3), | ||
119 | KEY(7, 3, KEY_PROG4), | ||
120 | KEY(7, 4, KEY_F4), | ||
121 | KEY(7, 5, KEY_UNKNOWN), | ||
122 | KEY(7, 6, KEY_OK), | ||
123 | KEY(7, 7, KEY_DOWN), | ||
124 | }; | ||
125 | |||
126 | static struct matrix_keymap_data sdp4430_keymap_data = { | ||
127 | .keymap = sdp4430_keymap, | ||
128 | .keymap_size = ARRAY_SIZE(sdp4430_keymap), | ||
129 | }; | ||
130 | |||
131 | static struct omap4_keypad_platform_data sdp4430_keypad_data = { | ||
132 | .keymap_data = &sdp4430_keymap_data, | ||
133 | .rows = 8, | ||
134 | .cols = 8, | ||
135 | }; | ||
51 | static struct gpio_led sdp4430_gpio_leds[] = { | 136 | static struct gpio_led sdp4430_gpio_leds[] = { |
52 | { | 137 | { |
53 | .name = "omap4:green:debug0", | 138 | .name = "omap4:green:debug0", |
@@ -593,6 +678,10 @@ static void __init omap_4430sdp_init(void) | |||
593 | spi_register_board_info(sdp4430_spi_board_info, | 678 | spi_register_board_info(sdp4430_spi_board_info, |
594 | ARRAY_SIZE(sdp4430_spi_board_info)); | 679 | ARRAY_SIZE(sdp4430_spi_board_info)); |
595 | } | 680 | } |
681 | |||
682 | status = omap4_keyboard_init(&sdp4430_keypad_data); | ||
683 | if (status) | ||
684 | pr_err("Keypad initialization failed: %d\n", status); | ||
596 | } | 685 | } |
597 | 686 | ||
598 | static void __init omap_4430sdp_map_io(void) | 687 | static void __init omap_4430sdp_map_io(void) |