diff options
author | Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> | 2010-12-20 16:09:22 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-12-22 14:11:47 -0500 |
commit | da1f026b532ce944d74461497dc6d8c16456466e (patch) | |
tree | 227cd89307e0094d02e944a29225b19c2fca286b /arch/arm/mach-omap1/board-h2.c | |
parent | 4e012e5f246d4da924b14d453452fd0838d4e03b (diff) |
Keyboard: omap-keypad: use matrix_keypad.h
Most keypad drivers make use of the <linux/input/matrix_keypad.h>
defined macros, structures and inline functions.
Convert omap-keypad driver to use those as well, as suggested by a
compile time warning, hardcoded into the OMAP <palt/keypad.h>.
Created against linux-2.6.37-rc5.
Tested on Amstrad Delta.
Compile tested with omap1_defconfig and omap2plus_defconfig shrinked to
board-h4.
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Reviewed-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1/board-h2.c')
-rw-r--r-- | arch/arm/mach-omap1/board-h2.c | 75 |
1 files changed, 39 insertions, 36 deletions
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index 082a73ca5564..28b84aa9bdba 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c | |||
@@ -52,43 +52,42 @@ | |||
52 | /* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */ | 52 | /* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */ |
53 | #define OMAP1610_ETHR_START 0x04000300 | 53 | #define OMAP1610_ETHR_START 0x04000300 |
54 | 54 | ||
55 | static int h2_keymap[] = { | 55 | static const unsigned int h2_keymap[] = { |
56 | KEY(0, 0, KEY_LEFT), | 56 | KEY(0, 0, KEY_LEFT), |
57 | KEY(0, 1, KEY_RIGHT), | 57 | KEY(1, 0, KEY_RIGHT), |
58 | KEY(0, 2, KEY_3), | 58 | KEY(2, 0, KEY_3), |
59 | KEY(0, 3, KEY_F10), | 59 | KEY(3, 0, KEY_F10), |
60 | KEY(0, 4, KEY_F5), | 60 | KEY(4, 0, KEY_F5), |
61 | KEY(0, 5, KEY_9), | 61 | KEY(5, 0, KEY_9), |
62 | KEY(1, 0, KEY_DOWN), | 62 | KEY(0, 1, KEY_DOWN), |
63 | KEY(1, 1, KEY_UP), | 63 | KEY(1, 1, KEY_UP), |
64 | KEY(1, 2, KEY_2), | 64 | KEY(2, 1, KEY_2), |
65 | KEY(1, 3, KEY_F9), | 65 | KEY(3, 1, KEY_F9), |
66 | KEY(1, 4, KEY_F7), | 66 | KEY(4, 1, KEY_F7), |
67 | KEY(1, 5, KEY_0), | 67 | KEY(5, 1, KEY_0), |
68 | KEY(2, 0, KEY_ENTER), | 68 | KEY(0, 2, KEY_ENTER), |
69 | KEY(2, 1, KEY_6), | 69 | KEY(1, 2, KEY_6), |
70 | KEY(2, 2, KEY_1), | 70 | KEY(2, 2, KEY_1), |
71 | KEY(2, 3, KEY_F2), | 71 | KEY(3, 2, KEY_F2), |
72 | KEY(2, 4, KEY_F6), | 72 | KEY(4, 2, KEY_F6), |
73 | KEY(2, 5, KEY_HOME), | 73 | KEY(5, 2, KEY_HOME), |
74 | KEY(3, 0, KEY_8), | 74 | KEY(0, 3, KEY_8), |
75 | KEY(3, 1, KEY_5), | 75 | KEY(1, 3, KEY_5), |
76 | KEY(3, 2, KEY_F12), | 76 | KEY(2, 3, KEY_F12), |
77 | KEY(3, 3, KEY_F3), | 77 | KEY(3, 3, KEY_F3), |
78 | KEY(3, 4, KEY_F8), | 78 | KEY(4, 3, KEY_F8), |
79 | KEY(3, 5, KEY_END), | 79 | KEY(5, 3, KEY_END), |
80 | KEY(4, 0, KEY_7), | 80 | KEY(0, 4, KEY_7), |
81 | KEY(4, 1, KEY_4), | 81 | KEY(1, 4, KEY_4), |
82 | KEY(4, 2, KEY_F11), | 82 | KEY(2, 4, KEY_F11), |
83 | KEY(4, 3, KEY_F1), | 83 | KEY(3, 4, KEY_F1), |
84 | KEY(4, 4, KEY_F4), | 84 | KEY(4, 4, KEY_F4), |
85 | KEY(4, 5, KEY_ESC), | 85 | KEY(5, 4, KEY_ESC), |
86 | KEY(5, 0, KEY_F13), | 86 | KEY(0, 5, KEY_F13), |
87 | KEY(5, 1, KEY_F14), | 87 | KEY(1, 5, KEY_F14), |
88 | KEY(5, 2, KEY_F15), | 88 | KEY(2, 5, KEY_F15), |
89 | KEY(5, 3, KEY_F16), | 89 | KEY(3, 5, KEY_F16), |
90 | KEY(5, 4, KEY_SLEEP), | 90 | KEY(4, 5, KEY_SLEEP), |
91 | 0 | ||
92 | }; | 91 | }; |
93 | 92 | ||
94 | static struct mtd_partition h2_nor_partitions[] = { | 93 | static struct mtd_partition h2_nor_partitions[] = { |
@@ -270,14 +269,18 @@ static struct resource h2_kp_resources[] = { | |||
270 | }, | 269 | }, |
271 | }; | 270 | }; |
272 | 271 | ||
272 | static const struct matrix_keymap_data h2_keymap_data = { | ||
273 | .keymap = h2_keymap, | ||
274 | .keymap_size = ARRAY_SIZE(h2_keymap), | ||
275 | }; | ||
276 | |||
273 | static struct omap_kp_platform_data h2_kp_data = { | 277 | static struct omap_kp_platform_data h2_kp_data = { |
274 | .rows = 8, | 278 | .rows = 8, |
275 | .cols = 8, | 279 | .cols = 8, |
276 | .keymap = h2_keymap, | 280 | .keymap_data = &h2_keymap_data, |
277 | .keymapsize = ARRAY_SIZE(h2_keymap), | 281 | .rep = true, |
278 | .rep = 1, | ||
279 | .delay = 9, | 282 | .delay = 9, |
280 | .dbounce = 1, | 283 | .dbounce = true, |
281 | }; | 284 | }; |
282 | 285 | ||
283 | static struct platform_device h2_kp_device = { | 286 | static struct platform_device h2_kp_device = { |