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_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), \
66 KEY(4, 1, KEY_SEMICOLON), \
67 KEY(4, 2, KEY_APOSTROPHE), \
68 KEY(4, 3, KEY_GRAVE), \
69 KEY(4, 4, KEY_LEFTSHIFT), \
70 KEY(4, 5, KEY_BACKSLASH), \
75 KEY(4, 1, KEY_SEMICOLON), \
76 KEY(4, 2, KEY_APOSTROPHE), \
77 KEY(4, 3, KEY_GRAVE), \
78 KEY(4, 4, KEY_LEFTSHIFT), \
79 KEY(4, 5, KEY_BACKSLASH), \
87 KEY(5, 4, KEY_COMMA), \
89 KEY(5, 6, KEY_SLASH), \
90 KEY(5, 7, KEY_RIGHTSHIFT), \
91 KEY(5, 8, KEY_KPASTERISK), \
92 KEY(6, 0, KEY_LEFTALT), \
93 KEY(6, 1, KEY_SPACE), \
94 KEY(6, 2, KEY_CAPSLOCK), \
104 KEY(7, 3, KEY_F10), \
105 KEY(7, 4, KEY_NUMLOCK), \
106 KEY(7, 5, KEY_SCROLLLOCK), \
107 KEY(7, 6, KEY_KP7), \
108 KEY(7, 7, KEY_KP8), \
109 KEY(7, 8, KEY_KP9), \
110 KEY(8, 0, KEY_KPMINUS), \
111 KEY(8, 1, KEY_KP4), \
112 KEY(8, 2, KEY_KP5), \
113 KEY(8, 3, KEY_KP6), \
114 KEY(8, 4, KEY_KPPLUS), \
115 KEY(8, 5, KEY_KP1), \
116 KEY(8, 6, KEY_KP2), \
117 KEY(8, 7, KEY_KP3), \
118 KEY(8, 8, KEY_KP0), \
122 * struct kbd_platform_data - spear keyboard platform data
123 * keymap: pointer to keymap data (table and size)
124 * rep: enables key autorepeat
126 * This structure is supposed to be used by platform code to supply
127 * keymaps to drivers that implement keyboards.
129 struct kbd_platform_data
{
130 const struct matrix_keymap_data
*keymap
;
134 /* This function is used to set platform data field of pdev->dev */
136 kbd_set_plat_data(struct platform_device
*pdev
, struct kbd_platform_data
*data
)
138 pdev
->dev
.platform_data
= data
;
141 #endif /* __PLAT_KEYBOARD_H */