aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/board-palmte.c
diff options
context:
space:
mode:
authorJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>2010-12-20 16:09:22 -0500
committerTony Lindgren <tony@atomide.com>2010-12-22 14:11:47 -0500
commitda1f026b532ce944d74461497dc6d8c16456466e (patch)
tree227cd89307e0094d02e944a29225b19c2fca286b /arch/arm/mach-omap1/board-palmte.c
parent4e012e5f246d4da924b14d453452fd0838d4e03b (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-palmte.c')
-rw-r--r--arch/arm/mach-omap1/board-palmte.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c
index 994dc6f50729..fb51ce6123d8 100644
--- a/arch/arm/mach-omap1/board-palmte.c
+++ b/arch/arm/mach-omap1/board-palmte.c
@@ -65,25 +65,29 @@ static void __init omap_palmte_init_irq(void)
65 omap_init_irq(); 65 omap_init_irq();
66} 66}
67 67
68static const int palmte_keymap[] = { 68static const unsigned int palmte_keymap[] = {
69 KEY(0, 0, KEY_F1), /* Calendar */ 69 KEY(0, 0, KEY_F1), /* Calendar */
70 KEY(0, 1, KEY_F2), /* Contacts */ 70 KEY(1, 0, KEY_F2), /* Contacts */
71 KEY(0, 2, KEY_F3), /* Tasks List */ 71 KEY(2, 0, KEY_F3), /* Tasks List */
72 KEY(0, 3, KEY_F4), /* Note Pad */ 72 KEY(3, 0, KEY_F4), /* Note Pad */
73 KEY(0, 4, KEY_POWER), 73 KEY(4, 0, KEY_POWER),
74 KEY(1, 0, KEY_LEFT), 74 KEY(0, 1, KEY_LEFT),
75 KEY(1, 1, KEY_DOWN), 75 KEY(1, 1, KEY_DOWN),
76 KEY(1, 2, KEY_UP), 76 KEY(2, 1, KEY_UP),
77 KEY(1, 3, KEY_RIGHT), 77 KEY(3, 1, KEY_RIGHT),
78 KEY(1, 4, KEY_ENTER), 78 KEY(4, 1, KEY_ENTER),
79 0, 79};
80
81static const struct matrix_keymap_data palmte_keymap_data = {
82 .keymap = palmte_keymap,
83 .keymap_size = ARRAY_SIZE(palmte_keymap),
80}; 84};
81 85
82static struct omap_kp_platform_data palmte_kp_data = { 86static struct omap_kp_platform_data palmte_kp_data = {
83 .rows = 8, 87 .rows = 8,
84 .cols = 8, 88 .cols = 8,
85 .keymap = (int *) palmte_keymap, 89 .keymap_data = &palmte_keymap_data,
86 .rep = 1, 90 .rep = true,
87 .delay = 12, 91 .delay = 12,
88}; 92};
89 93