diff options
Diffstat (limited to 'arch/arm/mach-omap1/board-sx1.c')
-rw-r--r-- | arch/arm/mach-omap1/board-sx1.c | 57 |
1 files changed, 30 insertions, 27 deletions
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c index 463862c67819..d41fe2d0616a 100644 --- a/arch/arm/mach-omap1/board-sx1.c +++ b/arch/arm/mach-omap1/board-sx1.c | |||
@@ -164,36 +164,35 @@ EXPORT_SYMBOL(sx1_setusbpower); | |||
164 | 164 | ||
165 | /*----------- Keypad -------------------------*/ | 165 | /*----------- Keypad -------------------------*/ |
166 | 166 | ||
167 | static int sx1_keymap[] = { | 167 | static const unsigned int sx1_keymap[] = { |
168 | KEY(5, 3, GROUP_0 | 117), /* camera Qt::Key_F17 */ | 168 | KEY(3, 5, GROUP_0 | 117), /* camera Qt::Key_F17 */ |
169 | KEY(0, 4, GROUP_0 | 114), /* voice memo Qt::Key_F14 */ | 169 | KEY(4, 0, GROUP_0 | 114), /* voice memo Qt::Key_F14 */ |
170 | KEY(1, 4, GROUP_2 | 114), /* voice memo */ | 170 | KEY(4, 1, GROUP_2 | 114), /* voice memo */ |
171 | KEY(2, 4, GROUP_3 | 114), /* voice memo */ | 171 | KEY(4, 2, GROUP_3 | 114), /* voice memo */ |
172 | KEY(0, 0, GROUP_1 | KEY_F12), /* red button Qt::Key_Hangup */ | 172 | KEY(0, 0, GROUP_1 | KEY_F12), /* red button Qt::Key_Hangup */ |
173 | KEY(4, 3, GROUP_1 | KEY_LEFT), | 173 | KEY(3, 4, GROUP_1 | KEY_LEFT), |
174 | KEY(2, 3, GROUP_1 | KEY_DOWN), | 174 | KEY(3, 2, GROUP_1 | KEY_DOWN), |
175 | KEY(1, 3, GROUP_1 | KEY_RIGHT), | 175 | KEY(3, 1, GROUP_1 | KEY_RIGHT), |
176 | KEY(0, 3, GROUP_1 | KEY_UP), | 176 | KEY(3, 0, GROUP_1 | KEY_UP), |
177 | KEY(3, 3, GROUP_1 | KEY_POWER), /* joystick press or Qt::Key_Select */ | 177 | KEY(3, 3, GROUP_1 | KEY_POWER), /* joystick press or Qt::Key_Select */ |
178 | KEY(5, 0, GROUP_1 | KEY_1), | 178 | KEY(0, 5, GROUP_1 | KEY_1), |
179 | KEY(4, 0, GROUP_1 | KEY_2), | 179 | KEY(0, 4, GROUP_1 | KEY_2), |
180 | KEY(3, 0, GROUP_1 | KEY_3), | 180 | KEY(0, 3, GROUP_1 | KEY_3), |
181 | KEY(3, 4, GROUP_1 | KEY_4), | 181 | KEY(4, 3, GROUP_1 | KEY_4), |
182 | KEY(4, 4, GROUP_1 | KEY_5), | 182 | KEY(4, 4, GROUP_1 | KEY_5), |
183 | KEY(5, 4, GROUP_1 | KEY_KPASTERISK),/* "*" */ | 183 | KEY(4, 5, GROUP_1 | KEY_KPASTERISK),/* "*" */ |
184 | KEY(4, 1, GROUP_1 | KEY_6), | 184 | KEY(1, 4, GROUP_1 | KEY_6), |
185 | KEY(5, 1, GROUP_1 | KEY_7), | 185 | KEY(1, 5, GROUP_1 | KEY_7), |
186 | KEY(3, 1, GROUP_1 | KEY_8), | 186 | KEY(1, 3, GROUP_1 | KEY_8), |
187 | KEY(3, 2, GROUP_1 | KEY_9), | 187 | KEY(2, 3, GROUP_1 | KEY_9), |
188 | KEY(5, 2, GROUP_1 | KEY_0), | 188 | KEY(2, 5, GROUP_1 | KEY_0), |
189 | KEY(4, 2, GROUP_1 | 113), /* # F13 Toggle input method Qt::Key_F13 */ | 189 | KEY(2, 4, GROUP_1 | 113), /* # F13 Toggle input method Qt::Key_F13 */ |
190 | KEY(0, 1, GROUP_1 | KEY_F11), /* green button Qt::Key_Call */ | 190 | KEY(1, 0, GROUP_1 | KEY_F11), /* green button Qt::Key_Call */ |
191 | KEY(1, 2, GROUP_1 | KEY_YEN), /* left soft Qt::Key_Context1 */ | 191 | KEY(2, 1, GROUP_1 | KEY_YEN), /* left soft Qt::Key_Context1 */ |
192 | KEY(2, 2, GROUP_1 | KEY_F8), /* right soft Qt::Key_Back */ | 192 | KEY(2, 2, GROUP_1 | KEY_F8), /* right soft Qt::Key_Back */ |
193 | KEY(2, 1, GROUP_1 | KEY_LEFTSHIFT), /* shift */ | 193 | KEY(1, 2, GROUP_1 | KEY_LEFTSHIFT), /* shift */ |
194 | KEY(1, 1, GROUP_1 | KEY_BACKSPACE), /* C (clear) */ | 194 | KEY(1, 1, GROUP_1 | KEY_BACKSPACE), /* C (clear) */ |
195 | KEY(0, 2, GROUP_1 | KEY_F7), /* menu Qt::Key_Menu */ | 195 | KEY(2, 0, GROUP_1 | KEY_F7), /* menu Qt::Key_Menu */ |
196 | 0 | ||
197 | }; | 196 | }; |
198 | 197 | ||
199 | static struct resource sx1_kp_resources[] = { | 198 | static struct resource sx1_kp_resources[] = { |
@@ -204,11 +203,15 @@ static struct resource sx1_kp_resources[] = { | |||
204 | }, | 203 | }, |
205 | }; | 204 | }; |
206 | 205 | ||
206 | static const struct matrix_keymap_data sx1_keymap_data = { | ||
207 | .keymap = sx1_keymap, | ||
208 | .keymap_size = ARRAY_SIZE(sx1_keymap), | ||
209 | }; | ||
210 | |||
207 | static struct omap_kp_platform_data sx1_kp_data = { | 211 | static struct omap_kp_platform_data sx1_kp_data = { |
208 | .rows = 6, | 212 | .rows = 6, |
209 | .cols = 6, | 213 | .cols = 6, |
210 | .keymap = sx1_keymap, | 214 | .keymap_data = &sx1_keymap_data, |
211 | .keymapsize = ARRAY_SIZE(sx1_keymap), | ||
212 | .delay = 80, | 215 | .delay = 80, |
213 | }; | 216 | }; |
214 | 217 | ||