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-nokia770.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-nokia770.c')
-rw-r--r-- | arch/arm/mach-omap1/board-nokia770.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c index 605495bbc58..d21f09dc78f 100644 --- a/arch/arm/mach-omap1/board-nokia770.c +++ b/arch/arm/mach-omap1/board-nokia770.c | |||
@@ -54,19 +54,18 @@ static void __init omap_nokia770_init_irq(void) | |||
54 | omap_init_irq(); | 54 | omap_init_irq(); |
55 | } | 55 | } |
56 | 56 | ||
57 | static int nokia770_keymap[] = { | 57 | static const unsigned int nokia770_keymap[] = { |
58 | KEY(0, 1, GROUP_0 | KEY_UP), | 58 | KEY(1, 0, GROUP_0 | KEY_UP), |
59 | KEY(0, 2, GROUP_1 | KEY_F5), | 59 | KEY(2, 0, GROUP_1 | KEY_F5), |
60 | KEY(1, 0, GROUP_0 | KEY_LEFT), | 60 | KEY(0, 1, GROUP_0 | KEY_LEFT), |
61 | KEY(1, 1, GROUP_0 | KEY_ENTER), | 61 | KEY(1, 1, GROUP_0 | KEY_ENTER), |
62 | KEY(1, 2, GROUP_0 | KEY_RIGHT), | 62 | KEY(2, 1, GROUP_0 | KEY_RIGHT), |
63 | KEY(2, 0, GROUP_1 | KEY_ESC), | 63 | KEY(0, 2, GROUP_1 | KEY_ESC), |
64 | KEY(2, 1, GROUP_0 | KEY_DOWN), | 64 | KEY(1, 2, GROUP_0 | KEY_DOWN), |
65 | KEY(2, 2, GROUP_1 | KEY_F4), | 65 | KEY(2, 2, GROUP_1 | KEY_F4), |
66 | KEY(3, 0, GROUP_2 | KEY_F7), | 66 | KEY(0, 3, GROUP_2 | KEY_F7), |
67 | KEY(3, 1, GROUP_2 | KEY_F8), | 67 | KEY(1, 3, GROUP_2 | KEY_F8), |
68 | KEY(3, 2, GROUP_2 | KEY_F6), | 68 | KEY(2, 3, GROUP_2 | KEY_F6), |
69 | 0 | ||
70 | }; | 69 | }; |
71 | 70 | ||
72 | static struct resource nokia770_kp_resources[] = { | 71 | static struct resource nokia770_kp_resources[] = { |
@@ -77,11 +76,15 @@ static struct resource nokia770_kp_resources[] = { | |||
77 | }, | 76 | }, |
78 | }; | 77 | }; |
79 | 78 | ||
79 | static const struct matrix_keymap_data nokia770_keymap_data = { | ||
80 | .keymap = nokia770_keymap, | ||
81 | .keymap_size = ARRAY_SIZE(nokia770_keymap), | ||
82 | }; | ||
83 | |||
80 | static struct omap_kp_platform_data nokia770_kp_data = { | 84 | static struct omap_kp_platform_data nokia770_kp_data = { |
81 | .rows = 8, | 85 | .rows = 8, |
82 | .cols = 8, | 86 | .cols = 8, |
83 | .keymap = nokia770_keymap, | 87 | .keymap_data = &nokia770_keymap_data, |
84 | .keymapsize = ARRAY_SIZE(nokia770_keymap), | ||
85 | .delay = 4, | 88 | .delay = 4, |
86 | }; | 89 | }; |
87 | 90 | ||