Commit 6f2ac009f29bcbd468a7a2017912dd090abd1348

Authored by Brian Swetland
Committed by Dmitry Torokhov
1 parent cb696e7cf2

Input: goldfish - virtual input event driver

This device is a direct pipe from "hardware" to the input event subsystem,
allowing us to avoid having to route "keypad" style events through an
AT keyboard driver (gross!).

As with the other submissions this driver is cross architecture.

Signed-off-by: Mike A. Chan <mikechan@google.com>
[Tided up to work on x86]
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
[Ported to 3.4]
Signed-off-by: Tom Keel <thomas.keel@intel.com>
[Cleaned up for 3.7 and submission]
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Showing 3 changed files with 205 additions and 0 deletions Inline Diff

drivers/input/keyboard/Kconfig
1 # 1 #
2 # Input core configuration 2 # Input core configuration
3 # 3 #
4 menuconfig INPUT_KEYBOARD 4 menuconfig INPUT_KEYBOARD
5 bool "Keyboards" if EXPERT || !X86 5 bool "Keyboards" if EXPERT || !X86
6 default y 6 default y
7 help 7 help
8 Say Y here, and a list of supported keyboards will be displayed. 8 Say Y here, and a list of supported keyboards will be displayed.
9 This option doesn't affect the kernel. 9 This option doesn't affect the kernel.
10 10
11 If unsure, say Y. 11 If unsure, say Y.
12 12
13 if INPUT_KEYBOARD 13 if INPUT_KEYBOARD
14 14
15 config KEYBOARD_ADP5520 15 config KEYBOARD_ADP5520
16 tristate "Keypad Support for ADP5520 PMIC" 16 tristate "Keypad Support for ADP5520 PMIC"
17 depends on PMIC_ADP5520 17 depends on PMIC_ADP5520
18 help 18 help
19 This option enables support for the keypad scan matrix 19 This option enables support for the keypad scan matrix
20 on Analog Devices ADP5520 PMICs. 20 on Analog Devices ADP5520 PMICs.
21 21
22 To compile this driver as a module, choose M here: the module will 22 To compile this driver as a module, choose M here: the module will
23 be called adp5520-keys. 23 be called adp5520-keys.
24 24
25 config KEYBOARD_ADP5588 25 config KEYBOARD_ADP5588
26 tristate "ADP5588/87 I2C QWERTY Keypad and IO Expander" 26 tristate "ADP5588/87 I2C QWERTY Keypad and IO Expander"
27 depends on I2C 27 depends on I2C
28 help 28 help
29 Say Y here if you want to use a ADP5588/87 attached to your 29 Say Y here if you want to use a ADP5588/87 attached to your
30 system I2C bus. 30 system I2C bus.
31 31
32 To compile this driver as a module, choose M here: the 32 To compile this driver as a module, choose M here: the
33 module will be called adp5588-keys. 33 module will be called adp5588-keys.
34 34
35 config KEYBOARD_ADP5589 35 config KEYBOARD_ADP5589
36 tristate "ADP5585/ADP5589 I2C QWERTY Keypad and IO Expander" 36 tristate "ADP5585/ADP5589 I2C QWERTY Keypad and IO Expander"
37 depends on I2C 37 depends on I2C
38 help 38 help
39 Say Y here if you want to use a ADP5585/ADP5589 attached to your 39 Say Y here if you want to use a ADP5585/ADP5589 attached to your
40 system I2C bus. 40 system I2C bus.
41 41
42 To compile this driver as a module, choose M here: the 42 To compile this driver as a module, choose M here: the
43 module will be called adp5589-keys. 43 module will be called adp5589-keys.
44 44
45 config KEYBOARD_AMIGA 45 config KEYBOARD_AMIGA
46 tristate "Amiga keyboard" 46 tristate "Amiga keyboard"
47 depends on AMIGA 47 depends on AMIGA
48 help 48 help
49 Say Y here if you are running Linux on any AMIGA and have a keyboard 49 Say Y here if you are running Linux on any AMIGA and have a keyboard
50 attached. 50 attached.
51 51
52 To compile this driver as a module, choose M here: the 52 To compile this driver as a module, choose M here: the
53 module will be called amikbd. 53 module will be called amikbd.
54 54
55 config ATARI_KBD_CORE 55 config ATARI_KBD_CORE
56 bool 56 bool
57 57
58 config KEYBOARD_ATARI 58 config KEYBOARD_ATARI
59 tristate "Atari keyboard" 59 tristate "Atari keyboard"
60 depends on ATARI 60 depends on ATARI
61 select ATARI_KBD_CORE 61 select ATARI_KBD_CORE
62 help 62 help
63 Say Y here if you are running Linux on any Atari and have a keyboard 63 Say Y here if you are running Linux on any Atari and have a keyboard
64 attached. 64 attached.
65 65
66 To compile this driver as a module, choose M here: the 66 To compile this driver as a module, choose M here: the
67 module will be called atakbd. 67 module will be called atakbd.
68 68
69 config KEYBOARD_ATKBD 69 config KEYBOARD_ATKBD
70 tristate "AT keyboard" if EXPERT || !X86 70 tristate "AT keyboard" if EXPERT || !X86
71 default y 71 default y
72 select SERIO 72 select SERIO
73 select SERIO_LIBPS2 73 select SERIO_LIBPS2
74 select SERIO_I8042 if X86 74 select SERIO_I8042 if X86
75 select SERIO_GSCPS2 if GSC 75 select SERIO_GSCPS2 if GSC
76 help 76 help
77 Say Y here if you want to use a standard AT or PS/2 keyboard. Usually 77 Say Y here if you want to use a standard AT or PS/2 keyboard. Usually
78 you'll need this, unless you have a different type keyboard (USB, ADB 78 you'll need this, unless you have a different type keyboard (USB, ADB
79 or other). This also works for AT and PS/2 keyboards connected over a 79 or other). This also works for AT and PS/2 keyboards connected over a
80 PS/2 to serial converter. 80 PS/2 to serial converter.
81 81
82 If unsure, say Y. 82 If unsure, say Y.
83 83
84 To compile this driver as a module, choose M here: the 84 To compile this driver as a module, choose M here: the
85 module will be called atkbd. 85 module will be called atkbd.
86 86
87 config KEYBOARD_ATKBD_HP_KEYCODES 87 config KEYBOARD_ATKBD_HP_KEYCODES
88 bool "Use HP keyboard scancodes" 88 bool "Use HP keyboard scancodes"
89 depends on PARISC && KEYBOARD_ATKBD 89 depends on PARISC && KEYBOARD_ATKBD
90 default y 90 default y
91 help 91 help
92 Say Y here if you have a PA-RISC machine and want to use an AT or 92 Say Y here if you have a PA-RISC machine and want to use an AT or
93 PS/2 keyboard, and your keyboard uses keycodes that are specific to 93 PS/2 keyboard, and your keyboard uses keycodes that are specific to
94 PA-RISC keyboards. 94 PA-RISC keyboards.
95 95
96 Say N if you use a standard keyboard. 96 Say N if you use a standard keyboard.
97 97
98 config KEYBOARD_ATKBD_RDI_KEYCODES 98 config KEYBOARD_ATKBD_RDI_KEYCODES
99 bool "Use PrecisionBook keyboard scancodes" 99 bool "Use PrecisionBook keyboard scancodes"
100 depends on KEYBOARD_ATKBD_HP_KEYCODES 100 depends on KEYBOARD_ATKBD_HP_KEYCODES
101 default n 101 default n
102 help 102 help
103 If you have an RDI PrecisionBook, say Y here if you want to use its 103 If you have an RDI PrecisionBook, say Y here if you want to use its
104 built-in keyboard (as opposed to an external keyboard). 104 built-in keyboard (as opposed to an external keyboard).
105 105
106 The PrecisionBook has five keys that conflict with those used by most 106 The PrecisionBook has five keys that conflict with those used by most
107 AT and PS/2 keyboards. These are as follows: 107 AT and PS/2 keyboards. These are as follows:
108 108
109 PrecisionBook Standard AT or PS/2 109 PrecisionBook Standard AT or PS/2
110 110
111 F1 F12 111 F1 F12
112 Left Ctrl Left Alt 112 Left Ctrl Left Alt
113 Caps Lock Left Ctrl 113 Caps Lock Left Ctrl
114 Right Ctrl Caps Lock 114 Right Ctrl Caps Lock
115 Left 102nd key (the key to the right of Left Shift) 115 Left 102nd key (the key to the right of Left Shift)
116 116
117 If you say N here, and use the PrecisionBook keyboard, then each key 117 If you say N here, and use the PrecisionBook keyboard, then each key
118 in the left-hand column will be interpreted as the corresponding key 118 in the left-hand column will be interpreted as the corresponding key
119 in the right-hand column. 119 in the right-hand column.
120 120
121 If you say Y here, and use an external keyboard, then each key in the 121 If you say Y here, and use an external keyboard, then each key in the
122 right-hand column will be interpreted as the key shown in the 122 right-hand column will be interpreted as the key shown in the
123 left-hand column. 123 left-hand column.
124 124
125 config KEYBOARD_QT1070 125 config KEYBOARD_QT1070
126 tristate "Atmel AT42QT1070 Touch Sensor Chip" 126 tristate "Atmel AT42QT1070 Touch Sensor Chip"
127 depends on I2C 127 depends on I2C
128 help 128 help
129 Say Y here if you want to use Atmel AT42QT1070 QTouch 129 Say Y here if you want to use Atmel AT42QT1070 QTouch
130 Sensor chip as input device. 130 Sensor chip as input device.
131 131
132 To compile this driver as a module, choose M here: 132 To compile this driver as a module, choose M here:
133 the module will be called qt1070 133 the module will be called qt1070
134 134
135 config KEYBOARD_QT2160 135 config KEYBOARD_QT2160
136 tristate "Atmel AT42QT2160 Touch Sensor Chip" 136 tristate "Atmel AT42QT2160 Touch Sensor Chip"
137 depends on I2C 137 depends on I2C
138 help 138 help
139 If you say yes here you get support for Atmel AT42QT2160 Touch 139 If you say yes here you get support for Atmel AT42QT2160 Touch
140 Sensor chip as a keyboard input. 140 Sensor chip as a keyboard input.
141 141
142 This driver can also be built as a module. If so, the module 142 This driver can also be built as a module. If so, the module
143 will be called qt2160. 143 will be called qt2160.
144 144
145 config KEYBOARD_BFIN 145 config KEYBOARD_BFIN
146 tristate "Blackfin BF54x keypad support" 146 tristate "Blackfin BF54x keypad support"
147 depends on (BF54x && !BF544) 147 depends on (BF54x && !BF544)
148 help 148 help
149 Say Y here if you want to use the BF54x keypad. 149 Say Y here if you want to use the BF54x keypad.
150 150
151 To compile this driver as a module, choose M here: the 151 To compile this driver as a module, choose M here: the
152 module will be called bf54x-keys. 152 module will be called bf54x-keys.
153 153
154 config KEYBOARD_LKKBD 154 config KEYBOARD_LKKBD
155 tristate "DECstation/VAXstation LK201/LK401 keyboard" 155 tristate "DECstation/VAXstation LK201/LK401 keyboard"
156 select SERIO 156 select SERIO
157 help 157 help
158 Say Y here if you want to use a LK201 or LK401 style serial 158 Say Y here if you want to use a LK201 or LK401 style serial
159 keyboard. This keyboard is also useable on PCs if you attach 159 keyboard. This keyboard is also useable on PCs if you attach
160 it with the inputattach program. The connector pinout is 160 it with the inputattach program. The connector pinout is
161 described within lkkbd.c. 161 described within lkkbd.c.
162 162
163 To compile this driver as a module, choose M here: the 163 To compile this driver as a module, choose M here: the
164 module will be called lkkbd. 164 module will be called lkkbd.
165 165
166 config KEYBOARD_EP93XX 166 config KEYBOARD_EP93XX
167 tristate "EP93xx Matrix Keypad support" 167 tristate "EP93xx Matrix Keypad support"
168 depends on ARCH_EP93XX 168 depends on ARCH_EP93XX
169 select INPUT_MATRIXKMAP 169 select INPUT_MATRIXKMAP
170 help 170 help
171 Say Y here to enable the matrix keypad on the Cirrus EP93XX. 171 Say Y here to enable the matrix keypad on the Cirrus EP93XX.
172 172
173 To compile this driver as a module, choose M here: the 173 To compile this driver as a module, choose M here: the
174 module will be called ep93xx_keypad. 174 module will be called ep93xx_keypad.
175 175
176 config KEYBOARD_GPIO 176 config KEYBOARD_GPIO
177 tristate "GPIO Buttons" 177 tristate "GPIO Buttons"
178 depends on GENERIC_GPIO 178 depends on GENERIC_GPIO
179 help 179 help
180 This driver implements support for buttons connected 180 This driver implements support for buttons connected
181 to GPIO pins of various CPUs (and some other chips). 181 to GPIO pins of various CPUs (and some other chips).
182 182
183 Say Y here if your device has buttons connected 183 Say Y here if your device has buttons connected
184 directly to such GPIO pins. Your board-specific 184 directly to such GPIO pins. Your board-specific
185 setup logic must also provide a platform device, 185 setup logic must also provide a platform device,
186 with configuration data saying which GPIOs are used. 186 with configuration data saying which GPIOs are used.
187 187
188 To compile this driver as a module, choose M here: the 188 To compile this driver as a module, choose M here: the
189 module will be called gpio_keys. 189 module will be called gpio_keys.
190 190
191 config KEYBOARD_GPIO_POLLED 191 config KEYBOARD_GPIO_POLLED
192 tristate "Polled GPIO buttons" 192 tristate "Polled GPIO buttons"
193 depends on GENERIC_GPIO 193 depends on GENERIC_GPIO
194 select INPUT_POLLDEV 194 select INPUT_POLLDEV
195 help 195 help
196 This driver implements support for buttons connected 196 This driver implements support for buttons connected
197 to GPIO pins that are not capable of generating interrupts. 197 to GPIO pins that are not capable of generating interrupts.
198 198
199 Say Y here if your device has buttons connected 199 Say Y here if your device has buttons connected
200 directly to such GPIO pins. Your board-specific 200 directly to such GPIO pins. Your board-specific
201 setup logic must also provide a platform device, 201 setup logic must also provide a platform device,
202 with configuration data saying which GPIOs are used. 202 with configuration data saying which GPIOs are used.
203 203
204 To compile this driver as a module, choose M here: the 204 To compile this driver as a module, choose M here: the
205 module will be called gpio_keys_polled. 205 module will be called gpio_keys_polled.
206 206
207 config KEYBOARD_TCA6416 207 config KEYBOARD_TCA6416
208 tristate "TCA6416/TCA6408A Keypad Support" 208 tristate "TCA6416/TCA6408A Keypad Support"
209 depends on I2C 209 depends on I2C
210 help 210 help
211 This driver implements basic keypad functionality 211 This driver implements basic keypad functionality
212 for keys connected through TCA6416/TCA6408A IO expanders. 212 for keys connected through TCA6416/TCA6408A IO expanders.
213 213
214 Say Y here if your device has keys connected to 214 Say Y here if your device has keys connected to
215 TCA6416/TCA6408A IO expander. Your board-specific setup logic 215 TCA6416/TCA6408A IO expander. Your board-specific setup logic
216 must also provide pin-mask details(of which TCA6416 pins 216 must also provide pin-mask details(of which TCA6416 pins
217 are used for keypad). 217 are used for keypad).
218 218
219 If enabled the entire TCA6416 device will be managed through 219 If enabled the entire TCA6416 device will be managed through
220 this driver. 220 this driver.
221 221
222 To compile this driver as a module, choose M here: the 222 To compile this driver as a module, choose M here: the
223 module will be called tca6416_keypad. 223 module will be called tca6416_keypad.
224 224
225 config KEYBOARD_TCA8418 225 config KEYBOARD_TCA8418
226 tristate "TCA8418 Keypad Support" 226 tristate "TCA8418 Keypad Support"
227 depends on I2C 227 depends on I2C
228 select INPUT_MATRIXKMAP 228 select INPUT_MATRIXKMAP
229 help 229 help
230 This driver implements basic keypad functionality 230 This driver implements basic keypad functionality
231 for keys connected through TCA8418 keypad decoder. 231 for keys connected through TCA8418 keypad decoder.
232 232
233 Say Y here if your device has keys connected to 233 Say Y here if your device has keys connected to
234 TCA8418 keypad decoder. 234 TCA8418 keypad decoder.
235 235
236 If enabled the complete TCA8418 device will be managed through 236 If enabled the complete TCA8418 device will be managed through
237 this driver. 237 this driver.
238 238
239 To compile this driver as a module, choose M here: the 239 To compile this driver as a module, choose M here: the
240 module will be called tca8418_keypad. 240 module will be called tca8418_keypad.
241 241
242 config KEYBOARD_MATRIX 242 config KEYBOARD_MATRIX
243 tristate "GPIO driven matrix keypad support" 243 tristate "GPIO driven matrix keypad support"
244 depends on GENERIC_GPIO 244 depends on GENERIC_GPIO
245 select INPUT_MATRIXKMAP 245 select INPUT_MATRIXKMAP
246 help 246 help
247 Enable support for GPIO driven matrix keypad. 247 Enable support for GPIO driven matrix keypad.
248 248
249 To compile this driver as a module, choose M here: the 249 To compile this driver as a module, choose M here: the
250 module will be called matrix_keypad. 250 module will be called matrix_keypad.
251 251
252 config KEYBOARD_HIL_OLD 252 config KEYBOARD_HIL_OLD
253 tristate "HP HIL keyboard support (simple driver)" 253 tristate "HP HIL keyboard support (simple driver)"
254 depends on GSC || HP300 254 depends on GSC || HP300
255 default y 255 default y
256 help 256 help
257 The "Human Interface Loop" is a older, 8-channel USB-like 257 The "Human Interface Loop" is a older, 8-channel USB-like
258 controller used in several Hewlett Packard models. This driver 258 controller used in several Hewlett Packard models. This driver
259 was adapted from the one written for m68k/hp300, and implements 259 was adapted from the one written for m68k/hp300, and implements
260 support for a keyboard attached to the HIL port, but not for 260 support for a keyboard attached to the HIL port, but not for
261 any other types of HIL input devices like mice or tablets. 261 any other types of HIL input devices like mice or tablets.
262 However, it has been thoroughly tested and is stable. 262 However, it has been thoroughly tested and is stable.
263 263
264 If you want full HIL support including support for multiple 264 If you want full HIL support including support for multiple
265 keyboards, mice, and tablets, you have to enable the 265 keyboards, mice, and tablets, you have to enable the
266 "HP System Device Controller i8042 Support" in the input/serio 266 "HP System Device Controller i8042 Support" in the input/serio
267 submenu. 267 submenu.
268 268
269 config KEYBOARD_HIL 269 config KEYBOARD_HIL
270 tristate "HP HIL keyboard/pointer support" 270 tristate "HP HIL keyboard/pointer support"
271 depends on GSC || HP300 271 depends on GSC || HP300
272 default y 272 default y
273 select HP_SDC 273 select HP_SDC
274 select HIL_MLC 274 select HIL_MLC
275 select SERIO 275 select SERIO
276 help 276 help
277 The "Human Interface Loop" is a older, 8-channel USB-like 277 The "Human Interface Loop" is a older, 8-channel USB-like
278 controller used in several Hewlett Packard models. 278 controller used in several Hewlett Packard models.
279 This driver implements support for HIL-keyboards and pointing 279 This driver implements support for HIL-keyboards and pointing
280 devices (mice, tablets, touchscreens) attached 280 devices (mice, tablets, touchscreens) attached
281 to your machine, so normally you should say Y here. 281 to your machine, so normally you should say Y here.
282 282
283 config KEYBOARD_HP6XX 283 config KEYBOARD_HP6XX
284 tristate "HP Jornada 6xx keyboard" 284 tristate "HP Jornada 6xx keyboard"
285 depends on SH_HP6XX 285 depends on SH_HP6XX
286 select INPUT_POLLDEV 286 select INPUT_POLLDEV
287 help 287 help
288 Say Y here if you have a HP Jornada 620/660/680/690 and want to 288 Say Y here if you have a HP Jornada 620/660/680/690 and want to
289 support the built-in keyboard. 289 support the built-in keyboard.
290 290
291 To compile this driver as a module, choose M here: the 291 To compile this driver as a module, choose M here: the
292 module will be called jornada680_kbd. 292 module will be called jornada680_kbd.
293 293
294 config KEYBOARD_HP7XX 294 config KEYBOARD_HP7XX
295 tristate "HP Jornada 7xx keyboard" 295 tristate "HP Jornada 7xx keyboard"
296 depends on SA1100_JORNADA720_SSP && SA1100_SSP 296 depends on SA1100_JORNADA720_SSP && SA1100_SSP
297 help 297 help
298 Say Y here if you have a HP Jornada 710/720/728 and want to 298 Say Y here if you have a HP Jornada 710/720/728 and want to
299 support the built-in keyboard. 299 support the built-in keyboard.
300 300
301 To compile this driver as a module, choose M here: the 301 To compile this driver as a module, choose M here: the
302 module will be called jornada720_kbd. 302 module will be called jornada720_kbd.
303 303
304 config KEYBOARD_LM8323 304 config KEYBOARD_LM8323
305 tristate "LM8323 keypad chip" 305 tristate "LM8323 keypad chip"
306 depends on I2C 306 depends on I2C
307 depends on LEDS_CLASS 307 depends on LEDS_CLASS
308 help 308 help
309 If you say yes here you get support for the National Semiconductor 309 If you say yes here you get support for the National Semiconductor
310 LM8323 keypad controller. 310 LM8323 keypad controller.
311 311
312 To compile this driver as a module, choose M here: the 312 To compile this driver as a module, choose M here: the
313 module will be called lm8323. 313 module will be called lm8323.
314 314
315 config KEYBOARD_LM8333 315 config KEYBOARD_LM8333
316 tristate "LM8333 keypad chip" 316 tristate "LM8333 keypad chip"
317 depends on I2C 317 depends on I2C
318 select INPUT_MATRIXKMAP 318 select INPUT_MATRIXKMAP
319 help 319 help
320 If you say yes here you get support for the National Semiconductor 320 If you say yes here you get support for the National Semiconductor
321 LM8333 keypad controller. 321 LM8333 keypad controller.
322 322
323 To compile this driver as a module, choose M here: the 323 To compile this driver as a module, choose M here: the
324 module will be called lm8333. 324 module will be called lm8333.
325 325
326 config KEYBOARD_LOCOMO 326 config KEYBOARD_LOCOMO
327 tristate "LoCoMo Keyboard Support" 327 tristate "LoCoMo Keyboard Support"
328 depends on SHARP_LOCOMO 328 depends on SHARP_LOCOMO
329 help 329 help
330 Say Y here if you are running Linux on a Sharp Zaurus Collie or Poodle based PDA 330 Say Y here if you are running Linux on a Sharp Zaurus Collie or Poodle based PDA
331 331
332 To compile this driver as a module, choose M here: the 332 To compile this driver as a module, choose M here: the
333 module will be called locomokbd. 333 module will be called locomokbd.
334 334
335 config KEYBOARD_LPC32XX 335 config KEYBOARD_LPC32XX
336 tristate "LPC32XX matrix key scanner support" 336 tristate "LPC32XX matrix key scanner support"
337 depends on ARCH_LPC32XX && OF 337 depends on ARCH_LPC32XX && OF
338 select INPUT_MATRIXKMAP 338 select INPUT_MATRIXKMAP
339 help 339 help
340 Say Y here if you want to use NXP LPC32XX SoC key scanner interface, 340 Say Y here if you want to use NXP LPC32XX SoC key scanner interface,
341 connected to a key matrix. 341 connected to a key matrix.
342 342
343 To compile this driver as a module, choose M here: the 343 To compile this driver as a module, choose M here: the
344 module will be called lpc32xx-keys. 344 module will be called lpc32xx-keys.
345 345
346 config KEYBOARD_MAPLE 346 config KEYBOARD_MAPLE
347 tristate "Maple bus keyboard" 347 tristate "Maple bus keyboard"
348 depends on SH_DREAMCAST && MAPLE 348 depends on SH_DREAMCAST && MAPLE
349 help 349 help
350 Say Y here if you have a Dreamcast console running Linux and have 350 Say Y here if you have a Dreamcast console running Linux and have
351 a keyboard attached to its Maple bus. 351 a keyboard attached to its Maple bus.
352 352
353 To compile this driver as a module, choose M here: the 353 To compile this driver as a module, choose M here: the
354 module will be called maple_keyb. 354 module will be called maple_keyb.
355 355
356 config KEYBOARD_MAX7359 356 config KEYBOARD_MAX7359
357 tristate "Maxim MAX7359 Key Switch Controller" 357 tristate "Maxim MAX7359 Key Switch Controller"
358 depends on I2C 358 depends on I2C
359 help 359 help
360 If you say yes here you get support for the Maxim MAX7359 Key 360 If you say yes here you get support for the Maxim MAX7359 Key
361 Switch Controller chip. This providers microprocessors with 361 Switch Controller chip. This providers microprocessors with
362 management of up to 64 key switches 362 management of up to 64 key switches
363 363
364 To compile this driver as a module, choose M here: the 364 To compile this driver as a module, choose M here: the
365 module will be called max7359_keypad. 365 module will be called max7359_keypad.
366 366
367 config KEYBOARD_MCS 367 config KEYBOARD_MCS
368 tristate "MELFAS MCS Touchkey" 368 tristate "MELFAS MCS Touchkey"
369 depends on I2C 369 depends on I2C
370 help 370 help
371 Say Y here if you have the MELFAS MCS5000/5080 touchkey controller 371 Say Y here if you have the MELFAS MCS5000/5080 touchkey controller
372 chip in your system. 372 chip in your system.
373 373
374 If unsure, say N. 374 If unsure, say N.
375 375
376 To compile this driver as a module, choose M here: the 376 To compile this driver as a module, choose M here: the
377 module will be called mcs_touchkey. 377 module will be called mcs_touchkey.
378 378
379 config KEYBOARD_MPR121 379 config KEYBOARD_MPR121
380 tristate "Freescale MPR121 Touchkey" 380 tristate "Freescale MPR121 Touchkey"
381 depends on I2C 381 depends on I2C
382 help 382 help
383 Say Y here if you have Freescale MPR121 touchkey controller 383 Say Y here if you have Freescale MPR121 touchkey controller
384 chip in your system. 384 chip in your system.
385 385
386 If unsure, say N. 386 If unsure, say N.
387 387
388 To compile this driver as a module, choose M here: the 388 To compile this driver as a module, choose M here: the
389 module will be called mpr121_touchkey. 389 module will be called mpr121_touchkey.
390 390
391 config KEYBOARD_IMX 391 config KEYBOARD_IMX
392 tristate "IMX keypad support" 392 tristate "IMX keypad support"
393 depends on ARCH_MXC 393 depends on ARCH_MXC
394 select INPUT_MATRIXKMAP 394 select INPUT_MATRIXKMAP
395 help 395 help
396 Enable support for IMX keypad port. 396 Enable support for IMX keypad port.
397 397
398 To compile this driver as a module, choose M here: the 398 To compile this driver as a module, choose M here: the
399 module will be called imx_keypad. 399 module will be called imx_keypad.
400 400
401 config KEYBOARD_NEWTON 401 config KEYBOARD_NEWTON
402 tristate "Newton keyboard" 402 tristate "Newton keyboard"
403 select SERIO 403 select SERIO
404 help 404 help
405 Say Y here if you have a Newton keyboard on a serial port. 405 Say Y here if you have a Newton keyboard on a serial port.
406 406
407 To compile this driver as a module, choose M here: the 407 To compile this driver as a module, choose M here: the
408 module will be called newtonkbd. 408 module will be called newtonkbd.
409 409
410 config KEYBOARD_NOMADIK 410 config KEYBOARD_NOMADIK
411 tristate "ST-Ericsson Nomadik SKE keyboard" 411 tristate "ST-Ericsson Nomadik SKE keyboard"
412 depends on PLAT_NOMADIK 412 depends on PLAT_NOMADIK
413 select INPUT_MATRIXKMAP 413 select INPUT_MATRIXKMAP
414 help 414 help
415 Say Y here if you want to use a keypad provided on the SKE controller 415 Say Y here if you want to use a keypad provided on the SKE controller
416 used on the Ux500 and Nomadik platforms 416 used on the Ux500 and Nomadik platforms
417 417
418 To compile this driver as a module, choose M here: the 418 To compile this driver as a module, choose M here: the
419 module will be called nmk-ske-keypad. 419 module will be called nmk-ske-keypad.
420 420
421 config KEYBOARD_TEGRA 421 config KEYBOARD_TEGRA
422 tristate "NVIDIA Tegra internal matrix keyboard controller support" 422 tristate "NVIDIA Tegra internal matrix keyboard controller support"
423 depends on ARCH_TEGRA 423 depends on ARCH_TEGRA
424 select INPUT_MATRIXKMAP 424 select INPUT_MATRIXKMAP
425 help 425 help
426 Say Y here if you want to use a matrix keyboard connected directly 426 Say Y here if you want to use a matrix keyboard connected directly
427 to the internal keyboard controller on Tegra SoCs. 427 to the internal keyboard controller on Tegra SoCs.
428 428
429 To compile this driver as a module, choose M here: the 429 To compile this driver as a module, choose M here: the
430 module will be called tegra-kbc. 430 module will be called tegra-kbc.
431 431
432 config KEYBOARD_OPENCORES 432 config KEYBOARD_OPENCORES
433 tristate "OpenCores Keyboard Controller" 433 tristate "OpenCores Keyboard Controller"
434 help 434 help
435 Say Y here if you want to use the OpenCores Keyboard Controller 435 Say Y here if you want to use the OpenCores Keyboard Controller
436 http://www.opencores.org/project,keyboardcontroller 436 http://www.opencores.org/project,keyboardcontroller
437 437
438 To compile this driver as a module, choose M here; the 438 To compile this driver as a module, choose M here; the
439 module will be called opencores-kbd. 439 module will be called opencores-kbd.
440 440
441 config KEYBOARD_PXA27x 441 config KEYBOARD_PXA27x
442 tristate "PXA27x/PXA3xx keypad support" 442 tristate "PXA27x/PXA3xx keypad support"
443 depends on PXA27x || PXA3xx || ARCH_MMP 443 depends on PXA27x || PXA3xx || ARCH_MMP
444 help 444 help
445 Enable support for PXA27x/PXA3xx keypad controller. 445 Enable support for PXA27x/PXA3xx keypad controller.
446 446
447 To compile this driver as a module, choose M here: the 447 To compile this driver as a module, choose M here: the
448 module will be called pxa27x_keypad. 448 module will be called pxa27x_keypad.
449 449
450 config KEYBOARD_PXA930_ROTARY 450 config KEYBOARD_PXA930_ROTARY
451 tristate "PXA930/PXA935 Enhanced Rotary Controller Support" 451 tristate "PXA930/PXA935 Enhanced Rotary Controller Support"
452 depends on CPU_PXA930 || CPU_PXA935 452 depends on CPU_PXA930 || CPU_PXA935
453 help 453 help
454 Enable support for PXA930/PXA935 Enhanced Rotary Controller. 454 Enable support for PXA930/PXA935 Enhanced Rotary Controller.
455 455
456 To compile this driver as a module, choose M here: the 456 To compile this driver as a module, choose M here: the
457 module will be called pxa930_rotary. 457 module will be called pxa930_rotary.
458 458
459 config KEYBOARD_PMIC8XXX 459 config KEYBOARD_PMIC8XXX
460 tristate "Qualcomm PMIC8XXX keypad support" 460 tristate "Qualcomm PMIC8XXX keypad support"
461 depends on MFD_PM8XXX 461 depends on MFD_PM8XXX
462 select INPUT_MATRIXKMAP 462 select INPUT_MATRIXKMAP
463 help 463 help
464 Say Y here if you want to enable the driver for the PMIC8XXX 464 Say Y here if you want to enable the driver for the PMIC8XXX
465 keypad provided as a reference design from Qualcomm. This is intended 465 keypad provided as a reference design from Qualcomm. This is intended
466 to support upto 18x8 matrix based keypad design. 466 to support upto 18x8 matrix based keypad design.
467 467
468 To compile this driver as a module, choose M here: the module will 468 To compile this driver as a module, choose M here: the module will
469 be called pmic8xxx-keypad. 469 be called pmic8xxx-keypad.
470 470
471 config KEYBOARD_SAMSUNG 471 config KEYBOARD_SAMSUNG
472 tristate "Samsung keypad support" 472 tristate "Samsung keypad support"
473 depends on HAVE_CLK 473 depends on HAVE_CLK
474 select INPUT_MATRIXKMAP 474 select INPUT_MATRIXKMAP
475 help 475 help
476 Say Y here if you want to use the keypad on your Samsung mobile 476 Say Y here if you want to use the keypad on your Samsung mobile
477 device. 477 device.
478 478
479 To compile this driver as a module, choose M here: the 479 To compile this driver as a module, choose M here: the
480 module will be called samsung-keypad. 480 module will be called samsung-keypad.
481 481
482 config KEYBOARD_GOLDFISH_EVENTS
483 depends on GOLDFISH
484 tristate "Generic Input Event device for Goldfish"
485 help
486 Say Y here to get an input event device for the Goldfish virtual
487 device emulator.
488
489 To compile this driver as a module, choose M here: the
490 module will be called goldfish-events.
491
482 config KEYBOARD_STOWAWAY 492 config KEYBOARD_STOWAWAY
483 tristate "Stowaway keyboard" 493 tristate "Stowaway keyboard"
484 select SERIO 494 select SERIO
485 help 495 help
486 Say Y here if you have a Stowaway keyboard on a serial port. 496 Say Y here if you have a Stowaway keyboard on a serial port.
487 Stowaway compatible keyboards like Dicota Input-PDA keyboard 497 Stowaway compatible keyboards like Dicota Input-PDA keyboard
488 are also supported by this driver. 498 are also supported by this driver.
489 499
490 To compile this driver as a module, choose M here: the 500 To compile this driver as a module, choose M here: the
491 module will be called stowaway. 501 module will be called stowaway.
492 502
493 config KEYBOARD_SUNKBD 503 config KEYBOARD_SUNKBD
494 tristate "Sun Type 4 and Type 5 keyboard" 504 tristate "Sun Type 4 and Type 5 keyboard"
495 select SERIO 505 select SERIO
496 help 506 help
497 Say Y here if you want to use a Sun Type 4 or Type 5 keyboard, 507 Say Y here if you want to use a Sun Type 4 or Type 5 keyboard,
498 connected either to the Sun keyboard connector or to an serial 508 connected either to the Sun keyboard connector or to an serial
499 (RS-232) port via a simple adapter. 509 (RS-232) port via a simple adapter.
500 510
501 To compile this driver as a module, choose M here: the 511 To compile this driver as a module, choose M here: the
502 module will be called sunkbd. 512 module will be called sunkbd.
503 513
504 config KEYBOARD_SH_KEYSC 514 config KEYBOARD_SH_KEYSC
505 tristate "SuperH KEYSC keypad support" 515 tristate "SuperH KEYSC keypad support"
506 depends on SUPERH || ARCH_SHMOBILE 516 depends on SUPERH || ARCH_SHMOBILE
507 help 517 help
508 Say Y here if you want to use a keypad attached to the KEYSC block 518 Say Y here if you want to use a keypad attached to the KEYSC block
509 on SuperH processors such as sh7722 and sh7343. 519 on SuperH processors such as sh7722 and sh7343.
510 520
511 To compile this driver as a module, choose M here: the 521 To compile this driver as a module, choose M here: the
512 module will be called sh_keysc. 522 module will be called sh_keysc.
513 523
514 config KEYBOARD_STMPE 524 config KEYBOARD_STMPE
515 tristate "STMPE keypad support" 525 tristate "STMPE keypad support"
516 depends on MFD_STMPE 526 depends on MFD_STMPE
517 select INPUT_MATRIXKMAP 527 select INPUT_MATRIXKMAP
518 help 528 help
519 Say Y here if you want to use the keypad controller on STMPE I/O 529 Say Y here if you want to use the keypad controller on STMPE I/O
520 expanders. 530 expanders.
521 531
522 To compile this driver as a module, choose M here: the module will be 532 To compile this driver as a module, choose M here: the module will be
523 called stmpe-keypad. 533 called stmpe-keypad.
524 534
525 config KEYBOARD_DAVINCI 535 config KEYBOARD_DAVINCI
526 tristate "TI DaVinci Key Scan" 536 tristate "TI DaVinci Key Scan"
527 depends on ARCH_DAVINCI_DM365 537 depends on ARCH_DAVINCI_DM365
528 help 538 help
529 Say Y to enable keypad module support for the TI DaVinci 539 Say Y to enable keypad module support for the TI DaVinci
530 platforms (DM365). 540 platforms (DM365).
531 541
532 To compile this driver as a module, choose M here: the 542 To compile this driver as a module, choose M here: the
533 module will be called davinci_keyscan. 543 module will be called davinci_keyscan.
534 544
535 config KEYBOARD_OMAP 545 config KEYBOARD_OMAP
536 tristate "TI OMAP keypad support" 546 tristate "TI OMAP keypad support"
537 depends on ARCH_OMAP1 547 depends on ARCH_OMAP1
538 select INPUT_MATRIXKMAP 548 select INPUT_MATRIXKMAP
539 help 549 help
540 Say Y here if you want to use the OMAP keypad. 550 Say Y here if you want to use the OMAP keypad.
541 551
542 To compile this driver as a module, choose M here: the 552 To compile this driver as a module, choose M here: the
543 module will be called omap-keypad. 553 module will be called omap-keypad.
544 554
545 config KEYBOARD_OMAP4 555 config KEYBOARD_OMAP4
546 tristate "TI OMAP4+ keypad support" 556 tristate "TI OMAP4+ keypad support"
547 select INPUT_MATRIXKMAP 557 select INPUT_MATRIXKMAP
548 help 558 help
549 Say Y here if you want to use the OMAP4+ keypad. 559 Say Y here if you want to use the OMAP4+ keypad.
550 560
551 To compile this driver as a module, choose M here: the 561 To compile this driver as a module, choose M here: the
552 module will be called omap4-keypad. 562 module will be called omap4-keypad.
553 563
554 config KEYBOARD_SPEAR 564 config KEYBOARD_SPEAR
555 tristate "ST SPEAR keyboard support" 565 tristate "ST SPEAR keyboard support"
556 depends on PLAT_SPEAR 566 depends on PLAT_SPEAR
557 select INPUT_MATRIXKMAP 567 select INPUT_MATRIXKMAP
558 help 568 help
559 Say Y here if you want to use the SPEAR keyboard. 569 Say Y here if you want to use the SPEAR keyboard.
560 570
561 To compile this driver as a module, choose M here: the 571 To compile this driver as a module, choose M here: the
562 module will be called spear-keboard. 572 module will be called spear-keboard.
563 573
564 config KEYBOARD_TC3589X 574 config KEYBOARD_TC3589X
565 tristate "TC3589X Keypad support" 575 tristate "TC3589X Keypad support"
566 depends on MFD_TC3589X 576 depends on MFD_TC3589X
567 select INPUT_MATRIXKMAP 577 select INPUT_MATRIXKMAP
568 help 578 help
569 Say Y here if you want to use the keypad controller on 579 Say Y here if you want to use the keypad controller on
570 TC35892/3 I/O expander. 580 TC35892/3 I/O expander.
571 581
572 To compile this driver as a module, choose M here: the 582 To compile this driver as a module, choose M here: the
573 module will be called tc3589x-keypad. 583 module will be called tc3589x-keypad.
574 584
575 config KEYBOARD_TNETV107X 585 config KEYBOARD_TNETV107X
576 tristate "TI TNETV107X keypad support" 586 tristate "TI TNETV107X keypad support"
577 depends on ARCH_DAVINCI_TNETV107X 587 depends on ARCH_DAVINCI_TNETV107X
578 select INPUT_MATRIXKMAP 588 select INPUT_MATRIXKMAP
579 help 589 help
580 Say Y here if you want to use the TNETV107X keypad. 590 Say Y here if you want to use the TNETV107X keypad.
581 591
582 To compile this driver as a module, choose M here: the 592 To compile this driver as a module, choose M here: the
583 module will be called tnetv107x-keypad. 593 module will be called tnetv107x-keypad.
584 594
585 config KEYBOARD_TWL4030 595 config KEYBOARD_TWL4030
586 tristate "TI TWL4030/TWL5030/TPS659x0 keypad support" 596 tristate "TI TWL4030/TWL5030/TPS659x0 keypad support"
587 depends on TWL4030_CORE 597 depends on TWL4030_CORE
588 select INPUT_MATRIXKMAP 598 select INPUT_MATRIXKMAP
589 help 599 help
590 Say Y here if your board use the keypad controller on 600 Say Y here if your board use the keypad controller on
591 TWL4030 family chips. It's safe to say enable this 601 TWL4030 family chips. It's safe to say enable this
592 even on boards that don't use the keypad controller. 602 even on boards that don't use the keypad controller.
593 603
594 To compile this driver as a module, choose M here: the 604 To compile this driver as a module, choose M here: the
595 module will be called twl4030_keypad. 605 module will be called twl4030_keypad.
596 606
597 config KEYBOARD_XTKBD 607 config KEYBOARD_XTKBD
598 tristate "XT keyboard" 608 tristate "XT keyboard"
599 select SERIO 609 select SERIO
600 help 610 help
601 Say Y here if you want to use the old IBM PC/XT keyboard (or 611 Say Y here if you want to use the old IBM PC/XT keyboard (or
602 compatible) on your system. This is only possible with a 612 compatible) on your system. This is only possible with a
603 parallel port keyboard adapter, you cannot connect it to the 613 parallel port keyboard adapter, you cannot connect it to the
604 keyboard port on a PC that runs Linux. 614 keyboard port on a PC that runs Linux.
605 615
606 To compile this driver as a module, choose M here: the 616 To compile this driver as a module, choose M here: the
607 module will be called xtkbd. 617 module will be called xtkbd.
608 618
609 config KEYBOARD_W90P910 619 config KEYBOARD_W90P910
610 tristate "W90P910 Matrix Keypad support" 620 tristate "W90P910 Matrix Keypad support"
611 depends on ARCH_W90X900 621 depends on ARCH_W90X900
612 select INPUT_MATRIXKMAP 622 select INPUT_MATRIXKMAP
613 help 623 help
614 Say Y here to enable the matrix keypad on evaluation board 624 Say Y here to enable the matrix keypad on evaluation board
615 based on W90P910. 625 based on W90P910.
616 626
617 To compile this driver as a module, choose M here: the 627 To compile this driver as a module, choose M here: the
618 module will be called w90p910_keypad. 628 module will be called w90p910_keypad.
619 629
620 endif 630 endif
621 631
drivers/input/keyboard/Makefile
1 # 1 #
2 # Makefile for the input core drivers. 2 # Makefile for the input core drivers.
3 # 3 #
4 4
5 # Each configuration option enables a list of files. 5 # Each configuration option enables a list of files.
6 6
7 obj-$(CONFIG_KEYBOARD_ADP5520) += adp5520-keys.o 7 obj-$(CONFIG_KEYBOARD_ADP5520) += adp5520-keys.o
8 obj-$(CONFIG_KEYBOARD_ADP5588) += adp5588-keys.o 8 obj-$(CONFIG_KEYBOARD_ADP5588) += adp5588-keys.o
9 obj-$(CONFIG_KEYBOARD_ADP5589) += adp5589-keys.o 9 obj-$(CONFIG_KEYBOARD_ADP5589) += adp5589-keys.o
10 obj-$(CONFIG_KEYBOARD_AMIGA) += amikbd.o 10 obj-$(CONFIG_KEYBOARD_AMIGA) += amikbd.o
11 obj-$(CONFIG_KEYBOARD_ATARI) += atakbd.o 11 obj-$(CONFIG_KEYBOARD_ATARI) += atakbd.o
12 obj-$(CONFIG_KEYBOARD_ATKBD) += atkbd.o 12 obj-$(CONFIG_KEYBOARD_ATKBD) += atkbd.o
13 obj-$(CONFIG_KEYBOARD_BFIN) += bf54x-keys.o 13 obj-$(CONFIG_KEYBOARD_BFIN) += bf54x-keys.o
14 obj-$(CONFIG_KEYBOARD_DAVINCI) += davinci_keyscan.o 14 obj-$(CONFIG_KEYBOARD_DAVINCI) += davinci_keyscan.o
15 obj-$(CONFIG_KEYBOARD_EP93XX) += ep93xx_keypad.o 15 obj-$(CONFIG_KEYBOARD_EP93XX) += ep93xx_keypad.o
16 obj-$(CONFIG_KEYBOARD_GOLDFISH_EVENTS) += goldfish_events.o
16 obj-$(CONFIG_KEYBOARD_GPIO) += gpio_keys.o 17 obj-$(CONFIG_KEYBOARD_GPIO) += gpio_keys.o
17 obj-$(CONFIG_KEYBOARD_GPIO_POLLED) += gpio_keys_polled.o 18 obj-$(CONFIG_KEYBOARD_GPIO_POLLED) += gpio_keys_polled.o
18 obj-$(CONFIG_KEYBOARD_TCA6416) += tca6416-keypad.o 19 obj-$(CONFIG_KEYBOARD_TCA6416) += tca6416-keypad.o
19 obj-$(CONFIG_KEYBOARD_TCA8418) += tca8418_keypad.o 20 obj-$(CONFIG_KEYBOARD_TCA8418) += tca8418_keypad.o
20 obj-$(CONFIG_KEYBOARD_HIL) += hil_kbd.o 21 obj-$(CONFIG_KEYBOARD_HIL) += hil_kbd.o
21 obj-$(CONFIG_KEYBOARD_HIL_OLD) += hilkbd.o 22 obj-$(CONFIG_KEYBOARD_HIL_OLD) += hilkbd.o
22 obj-$(CONFIG_KEYBOARD_IMX) += imx_keypad.o 23 obj-$(CONFIG_KEYBOARD_IMX) += imx_keypad.o
23 obj-$(CONFIG_KEYBOARD_HP6XX) += jornada680_kbd.o 24 obj-$(CONFIG_KEYBOARD_HP6XX) += jornada680_kbd.o
24 obj-$(CONFIG_KEYBOARD_HP7XX) += jornada720_kbd.o 25 obj-$(CONFIG_KEYBOARD_HP7XX) += jornada720_kbd.o
25 obj-$(CONFIG_KEYBOARD_LKKBD) += lkkbd.o 26 obj-$(CONFIG_KEYBOARD_LKKBD) += lkkbd.o
26 obj-$(CONFIG_KEYBOARD_LM8323) += lm8323.o 27 obj-$(CONFIG_KEYBOARD_LM8323) += lm8323.o
27 obj-$(CONFIG_KEYBOARD_LM8333) += lm8333.o 28 obj-$(CONFIG_KEYBOARD_LM8333) += lm8333.o
28 obj-$(CONFIG_KEYBOARD_LOCOMO) += locomokbd.o 29 obj-$(CONFIG_KEYBOARD_LOCOMO) += locomokbd.o
29 obj-$(CONFIG_KEYBOARD_LPC32XX) += lpc32xx-keys.o 30 obj-$(CONFIG_KEYBOARD_LPC32XX) += lpc32xx-keys.o
30 obj-$(CONFIG_KEYBOARD_MAPLE) += maple_keyb.o 31 obj-$(CONFIG_KEYBOARD_MAPLE) += maple_keyb.o
31 obj-$(CONFIG_KEYBOARD_MATRIX) += matrix_keypad.o 32 obj-$(CONFIG_KEYBOARD_MATRIX) += matrix_keypad.o
32 obj-$(CONFIG_KEYBOARD_MAX7359) += max7359_keypad.o 33 obj-$(CONFIG_KEYBOARD_MAX7359) += max7359_keypad.o
33 obj-$(CONFIG_KEYBOARD_MCS) += mcs_touchkey.o 34 obj-$(CONFIG_KEYBOARD_MCS) += mcs_touchkey.o
34 obj-$(CONFIG_KEYBOARD_MPR121) += mpr121_touchkey.o 35 obj-$(CONFIG_KEYBOARD_MPR121) += mpr121_touchkey.o
35 obj-$(CONFIG_KEYBOARD_NEWTON) += newtonkbd.o 36 obj-$(CONFIG_KEYBOARD_NEWTON) += newtonkbd.o
36 obj-$(CONFIG_KEYBOARD_NOMADIK) += nomadik-ske-keypad.o 37 obj-$(CONFIG_KEYBOARD_NOMADIK) += nomadik-ske-keypad.o
37 obj-$(CONFIG_KEYBOARD_OMAP) += omap-keypad.o 38 obj-$(CONFIG_KEYBOARD_OMAP) += omap-keypad.o
38 obj-$(CONFIG_KEYBOARD_OMAP4) += omap4-keypad.o 39 obj-$(CONFIG_KEYBOARD_OMAP4) += omap4-keypad.o
39 obj-$(CONFIG_KEYBOARD_OPENCORES) += opencores-kbd.o 40 obj-$(CONFIG_KEYBOARD_OPENCORES) += opencores-kbd.o
40 obj-$(CONFIG_KEYBOARD_PMIC8XXX) += pmic8xxx-keypad.o 41 obj-$(CONFIG_KEYBOARD_PMIC8XXX) += pmic8xxx-keypad.o
41 obj-$(CONFIG_KEYBOARD_PXA27x) += pxa27x_keypad.o 42 obj-$(CONFIG_KEYBOARD_PXA27x) += pxa27x_keypad.o
42 obj-$(CONFIG_KEYBOARD_PXA930_ROTARY) += pxa930_rotary.o 43 obj-$(CONFIG_KEYBOARD_PXA930_ROTARY) += pxa930_rotary.o
43 obj-$(CONFIG_KEYBOARD_QT1070) += qt1070.o 44 obj-$(CONFIG_KEYBOARD_QT1070) += qt1070.o
44 obj-$(CONFIG_KEYBOARD_QT2160) += qt2160.o 45 obj-$(CONFIG_KEYBOARD_QT2160) += qt2160.o
45 obj-$(CONFIG_KEYBOARD_SAMSUNG) += samsung-keypad.o 46 obj-$(CONFIG_KEYBOARD_SAMSUNG) += samsung-keypad.o
46 obj-$(CONFIG_KEYBOARD_SH_KEYSC) += sh_keysc.o 47 obj-$(CONFIG_KEYBOARD_SH_KEYSC) += sh_keysc.o
47 obj-$(CONFIG_KEYBOARD_SPEAR) += spear-keyboard.o 48 obj-$(CONFIG_KEYBOARD_SPEAR) += spear-keyboard.o
48 obj-$(CONFIG_KEYBOARD_STMPE) += stmpe-keypad.o 49 obj-$(CONFIG_KEYBOARD_STMPE) += stmpe-keypad.o
49 obj-$(CONFIG_KEYBOARD_STOWAWAY) += stowaway.o 50 obj-$(CONFIG_KEYBOARD_STOWAWAY) += stowaway.o
50 obj-$(CONFIG_KEYBOARD_SUNKBD) += sunkbd.o 51 obj-$(CONFIG_KEYBOARD_SUNKBD) += sunkbd.o
51 obj-$(CONFIG_KEYBOARD_TC3589X) += tc3589x-keypad.o 52 obj-$(CONFIG_KEYBOARD_TC3589X) += tc3589x-keypad.o
52 obj-$(CONFIG_KEYBOARD_TEGRA) += tegra-kbc.o 53 obj-$(CONFIG_KEYBOARD_TEGRA) += tegra-kbc.o
53 obj-$(CONFIG_KEYBOARD_TNETV107X) += tnetv107x-keypad.o 54 obj-$(CONFIG_KEYBOARD_TNETV107X) += tnetv107x-keypad.o
54 obj-$(CONFIG_KEYBOARD_TWL4030) += twl4030_keypad.o 55 obj-$(CONFIG_KEYBOARD_TWL4030) += twl4030_keypad.o
55 obj-$(CONFIG_KEYBOARD_XTKBD) += xtkbd.o 56 obj-$(CONFIG_KEYBOARD_XTKBD) += xtkbd.o
56 obj-$(CONFIG_KEYBOARD_W90P910) += w90p910_keypad.o 57 obj-$(CONFIG_KEYBOARD_W90P910) += w90p910_keypad.o
57 58
drivers/input/keyboard/goldfish_events.c
File was created 1 /*
2 * Copyright (C) 2007 Google, Inc.
3 * Copyright (C) 2012 Intel, Inc.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16 #include <linux/module.h>
17 #include <linux/init.h>
18 #include <linux/interrupt.h>
19 #include <linux/types.h>
20 #include <linux/input.h>
21 #include <linux/kernel.h>
22 #include <linux/platform_device.h>
23 #include <linux/slab.h>
24 #include <linux/irq.h>
25 #include <linux/io.h>
26
27 enum {
28 REG_READ = 0x00,
29 REG_SET_PAGE = 0x00,
30 REG_LEN = 0x04,
31 REG_DATA = 0x08,
32
33 PAGE_NAME = 0x00000,
34 PAGE_EVBITS = 0x10000,
35 PAGE_ABSDATA = 0x20000 | EV_ABS,
36 };
37
38 struct event_dev {
39 struct input_dev *input;
40 int irq;
41 void __iomem *addr;
42 char name[0];
43 };
44
45 static irqreturn_t events_interrupt(int irq, void *dev_id)
46 {
47 struct event_dev *edev = dev_id;
48 unsigned type, code, value;
49
50 type = __raw_readl(edev->addr + REG_READ);
51 code = __raw_readl(edev->addr + REG_READ);
52 value = __raw_readl(edev->addr + REG_READ);
53
54 input_event(edev->input, type, code, value);
55 input_sync(edev->input);
56 return IRQ_HANDLED;
57 }
58
59 static void events_import_bits(struct event_dev *edev,
60 unsigned long bits[], unsigned type, size_t count)
61 {
62 void __iomem *addr = edev->addr;
63 int i, j;
64 size_t size;
65 uint8_t val;
66
67 __raw_writel(PAGE_EVBITS | type, addr + REG_SET_PAGE);
68
69 size = __raw_readl(addr + REG_LEN) * 8;
70 if (size < count)
71 count = size;
72
73 addr += REG_DATA;
74 for (i = 0; i < count; i += 8) {
75 val = __raw_readb(addr++);
76 for (j = 0; j < 8; j++)
77 if (val & 1 << j)
78 set_bit(i + j, bits);
79 }
80 }
81
82 static void events_import_abs_params(struct event_dev *edev)
83 {
84 struct input_dev *input_dev = edev->input;
85 void __iomem *addr = edev->addr;
86 u32 val[4];
87 int count;
88 int i, j;
89
90 __raw_writel(PAGE_ABSDATA, addr + REG_SET_PAGE);
91
92 count = __raw_readl(addr + REG_LEN) / sizeof(val);
93 if (count > ABS_MAX)
94 count = ABS_MAX;
95
96 for (i = 0; i < count; i++) {
97 if (!test_bit(i, input_dev->absbit))
98 continue;
99
100 for (j = 0; j < ARRAY_SIZE(val); j++) {
101 int offset = (i * ARRAY_SIZE(val) + j) * sizeof(u32);
102 val[j] = __raw_readl(edev->addr + REG_DATA + offset);
103 }
104
105 input_set_abs_params(input_dev, i,
106 val[0], val[1], val[2], val[3]);
107 }
108 }
109
110 static int events_probe(struct platform_device *pdev)
111 {
112 struct input_dev *input_dev;
113 struct event_dev *edev;
114 struct resource *res;
115 unsigned keymapnamelen;
116 void __iomem *addr;
117 int irq;
118 int i;
119 int error;
120
121 irq = platform_get_irq(pdev, 0);
122 if (irq < 0)
123 return -EINVAL;
124
125 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
126 if (!res)
127 return -EINVAL;
128
129 addr = devm_ioremap(&pdev->dev, res->start, 4096);
130 if (!addr)
131 return -ENOMEM;
132
133 __raw_writel(PAGE_NAME, addr + REG_SET_PAGE);
134 keymapnamelen = __raw_readl(addr + REG_LEN);
135
136 edev = devm_kzalloc(&pdev->dev,
137 sizeof(struct event_dev) + keymapnamelen + 1,
138 GFP_KERNEL);
139 if (!edev)
140 return -ENOMEM;
141
142 input_dev = devm_input_allocate_device(&pdev->dev);
143 if (!input_dev)
144 return -ENOMEM;
145
146 edev->input = input_dev;
147 edev->addr = addr;
148 edev->irq = irq;
149
150 for (i = 0; i < keymapnamelen; i++)
151 edev->name[i] = __raw_readb(edev->addr + REG_DATA + i);
152
153 pr_debug("events_probe() keymap=%s\n", edev->name);
154
155 input_dev->name = edev->name;
156 input_dev->id.bustype = BUS_HOST;
157
158 events_import_bits(edev, input_dev->evbit, EV_SYN, EV_MAX);
159 events_import_bits(edev, input_dev->keybit, EV_KEY, KEY_MAX);
160 events_import_bits(edev, input_dev->relbit, EV_REL, REL_MAX);
161 events_import_bits(edev, input_dev->absbit, EV_ABS, ABS_MAX);
162 events_import_bits(edev, input_dev->mscbit, EV_MSC, MSC_MAX);
163 events_import_bits(edev, input_dev->ledbit, EV_LED, LED_MAX);
164 events_import_bits(edev, input_dev->sndbit, EV_SND, SND_MAX);
165 events_import_bits(edev, input_dev->ffbit, EV_FF, FF_MAX);
166 events_import_bits(edev, input_dev->swbit, EV_SW, SW_MAX);
167
168 events_import_abs_params(edev);
169
170 error = devm_request_irq(&pdev->dev, edev->irq, events_interrupt, 0,
171 "goldfish-events-keypad", edev);
172 if (error)
173 return error;
174
175 error = input_register_device(input_dev);
176 if (error)
177 return error;
178
179 return 0;
180 }
181
182 static struct platform_driver events_driver = {
183 .probe = events_probe,
184 .driver = {
185 .owner = THIS_MODULE,
186 .name = "goldfish_events",
187 },
188 };
189
190 module_platform_driver(events_driver);
191
192 MODULE_AUTHOR("Brian Swetland");
193 MODULE_DESCRIPTION("Goldfish Event Device");
194 MODULE_LICENSE("GPL");
195