diff options
author | Chao Xie <chao.xie@marvell.com> | 2013-05-05 23:24:58 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-06-19 01:56:51 -0400 |
commit | 0a085a9482fa51efb58c9d351ea98e83c5df93fc (patch) | |
tree | 411592ae841ea8b18dce07a7e4bce3fce30fcadc /arch/arm/mach-mmp | |
parent | 483180281f0ac60d1138710eb21f4b9961901294 (diff) |
Input: pxa27x-keypad - use matrix_keymap for matrix keys
pxa27x-keypad includes matrix keys. Make use of matrix_keymap
for the matrix keys.
Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'arch/arm/mach-mmp')
-rw-r--r-- | arch/arm/mach-mmp/aspenite.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-mmp/teton_bga.c | 8 |
2 files changed, 13 insertions, 5 deletions
diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c index 9f64d5632e07..1e233467fffa 100644 --- a/arch/arm/mach-mmp/aspenite.c +++ b/arch/arm/mach-mmp/aspenite.c | |||
@@ -205,7 +205,7 @@ struct pxa168fb_mach_info aspenite_lcd_info = { | |||
205 | .invert_pixclock = 0, | 205 | .invert_pixclock = 0, |
206 | }; | 206 | }; |
207 | 207 | ||
208 | static unsigned int aspenite_matrix_key_map[] = { | 208 | static const unsigned int aspenite_matrix_key_map[] = { |
209 | KEY(0, 6, KEY_UP), /* SW 4 */ | 209 | KEY(0, 6, KEY_UP), /* SW 4 */ |
210 | KEY(0, 7, KEY_DOWN), /* SW 5 */ | 210 | KEY(0, 7, KEY_DOWN), /* SW 5 */ |
211 | KEY(1, 6, KEY_LEFT), /* SW 6 */ | 211 | KEY(1, 6, KEY_LEFT), /* SW 6 */ |
@@ -214,11 +214,15 @@ static unsigned int aspenite_matrix_key_map[] = { | |||
214 | KEY(4, 7, KEY_ESC), /* SW 9 */ | 214 | KEY(4, 7, KEY_ESC), /* SW 9 */ |
215 | }; | 215 | }; |
216 | 216 | ||
217 | static struct matrix_keymap_data aspenite_matrix_keymap_data = { | ||
218 | .keymap = aspenite_matrix_key_map, | ||
219 | .keymap_size = ARRAY_SIZE(aspenite_matrix_key_map), | ||
220 | }; | ||
221 | |||
217 | static struct pxa27x_keypad_platform_data aspenite_keypad_info __initdata = { | 222 | static struct pxa27x_keypad_platform_data aspenite_keypad_info __initdata = { |
218 | .matrix_key_rows = 5, | 223 | .matrix_key_rows = 5, |
219 | .matrix_key_cols = 8, | 224 | .matrix_key_cols = 8, |
220 | .matrix_key_map = aspenite_matrix_key_map, | 225 | .matrix_keymap_data = &aspenite_matrix_keymap_data, |
221 | .matrix_key_map_size = ARRAY_SIZE(aspenite_matrix_key_map), | ||
222 | .debounce_interval = 30, | 226 | .debounce_interval = 30, |
223 | }; | 227 | }; |
224 | 228 | ||
diff --git a/arch/arm/mach-mmp/teton_bga.c b/arch/arm/mach-mmp/teton_bga.c index 8609967975ed..d8967fa48374 100644 --- a/arch/arm/mach-mmp/teton_bga.c +++ b/arch/arm/mach-mmp/teton_bga.c | |||
@@ -56,11 +56,15 @@ static unsigned int teton_bga_matrix_key_map[] = { | |||
56 | KEY(1, 7, KEY_RIGHT), | 56 | KEY(1, 7, KEY_RIGHT), |
57 | }; | 57 | }; |
58 | 58 | ||
59 | static struct matrix_keymap_data teton_bga_matrix_keymap_data = { | ||
60 | .keymap = teton_bga_matrix_key_map, | ||
61 | .keymap_size = ARRAY_SIZE(teton_bga_matrix_key_map), | ||
62 | }; | ||
63 | |||
59 | static struct pxa27x_keypad_platform_data teton_bga_keypad_info __initdata = { | 64 | static struct pxa27x_keypad_platform_data teton_bga_keypad_info __initdata = { |
60 | .matrix_key_rows = 2, | 65 | .matrix_key_rows = 2, |
61 | .matrix_key_cols = 8, | 66 | .matrix_key_cols = 8, |
62 | .matrix_key_map = teton_bga_matrix_key_map, | 67 | .matrix_keymap_data = &teton_bga_matrix_keymap_data, |
63 | .matrix_key_map_size = ARRAY_SIZE(teton_bga_matrix_key_map), | ||
64 | .debounce_interval = 30, | 68 | .debounce_interval = 30, |
65 | }; | 69 | }; |
66 | 70 | ||