2 * Copyright (C) 2010 ST Microelectronics
3 * Rajeev Kumar<rajeev-dlh.kumar@st.com>
5 * This file is licensed under the terms of the GNU General Public
6 * License version 2. This program is licensed "as is" without any
7 * warranty of any kind, whether express or implied.
10 #ifndef __PLAT_KEYBOARD_H
11 #define __PLAT_KEYBOARD_H
13 #include <linux/bitops.h>
14 #include <linux/input.h>
15 #include <linux/input/matrix_keypad.h>
16 #include <linux/types.h>
18 #define DECLARE_9x9_KEYMAP(_name) \
30 KEY(1, 1, KEY_MINUS), \
31 KEY(1, 2, KEY_EQUAL), \
32 KEY(1, 3, KEY_BACKSPACE), \
44 KEY(2, 6, KEY_LEFTBRACE), \
45 KEY(2, 7, KEY_RIGHTBRACE), \
46 KEY(2, 8, KEY_ENTER), \
47 KEY(3, 0, KEY_LEFTCTRL), \
57 KEY(4, 1, KEY_SEMICOLON), \
58 KEY(4, 2, KEY_APOSTROPHE), \
59 KEY(4, 3, KEY_GRAVE), \
60 KEY(4, 4, KEY_LEFTSHIFT), \
61 KEY(4, 5, KEY_BACKSLASH), \
69 KEY(5, 4, KEY_COMMA), \
71 KEY(5, 6, KEY_SLASH), \
72 KEY(5, 7, KEY_RIGHTSHIFT), \
73 KEY(5, 8, KEY_KPASTERISK), \
74 KEY(6, 0, KEY_LEFTALT), \
75 KEY(6, 1, KEY_SPACE), \
76 KEY(6, 2, KEY_CAPSLOCK), \
87 KEY(7, 4, KEY_NUMLOCK), \
88 KEY(7, 5, KEY_SCROLLLOCK), \
92 KEY(8, 0, KEY_KPMINUS), \
96 KEY(8, 4, KEY_KPPLUS), \
100 KEY(8, 8, KEY_KP0), \
103 #define DECLARE_6x6_KEYMAP(_name) \
105 KEY(0, 0, KEY_RESERVED), \
126 KEY(3, 3, KEY_COMMA), \
127 KEY(3, 4, KEY_DOT), \
128 KEY(3, 5, KEY_SLASH), \
133 KEY(4, 4, KEY_F10), \
134 KEY(4, 5, KEY_NUMLOCK), \
135 KEY(5, 0, KEY_KP2), \
136 KEY(5, 1, KEY_KP3), \
137 KEY(5, 2, KEY_KP0), \
138 KEY(5, 3, KEY_KPDOT), \
140 KEY(5, 5, KEY_ZENKAKUHANKAKU), \
148 * struct kbd_platform_data - spear keyboard platform data
149 * keymap: pointer to keymap data (table and size)
150 * rep: enables key autorepeat
151 * mode: choose keyboard support(9x9, 6x6, 2x2)
152 * suspended_rate: rate at which keyboard would operate in suspended mode
154 * This structure is supposed to be used by platform code to supply
155 * keymaps to drivers that implement keyboards.
157 struct kbd_platform_data
{
158 const struct matrix_keymap_data
*keymap
;
161 unsigned int suspended_rate
;
164 #endif /* __PLAT_KEYBOARD_H */