diff options
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/evdev.c | 3 | ||||
-rw-r--r-- | drivers/input/joydev.c | 2 | ||||
-rw-r--r-- | drivers/input/joystick/xpad.c | 26 | ||||
-rw-r--r-- | drivers/input/keyboard/Kconfig | 294 | ||||
-rw-r--r-- | drivers/input/keyboard/Makefile | 33 | ||||
-rw-r--r-- | drivers/input/keyboard/atkbd.c | 32 | ||||
-rw-r--r-- | drivers/input/keyboard/gpio_keys.c | 33 | ||||
-rw-r--r-- | drivers/input/keyboard/matrix_keypad.c | 453 | ||||
-rw-r--r-- | drivers/input/misc/pcspkr.c | 8 | ||||
-rw-r--r-- | drivers/input/misc/wistron_btns.c | 25 | ||||
-rw-r--r-- | drivers/input/mouse/gpio_mouse.c | 11 | ||||
-rw-r--r-- | drivers/input/serio/hp_sdc_mlc.c | 2 | ||||
-rw-r--r-- | drivers/input/serio/i8042-x86ia64io.h | 36 | ||||
-rw-r--r-- | drivers/input/serio/i8042.c | 7 | ||||
-rw-r--r-- | drivers/input/serio/serio.c | 7 | ||||
-rw-r--r-- | drivers/input/tablet/wacom_wac.c | 6 |
16 files changed, 778 insertions, 200 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 114efd8dc8f5..1148140d08a1 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c | |||
@@ -608,8 +608,7 @@ static long evdev_do_ioctl(struct file *file, unsigned int cmd, | |||
608 | p, compat_mode); | 608 | p, compat_mode); |
609 | 609 | ||
610 | if (_IOC_NR(cmd) == _IOC_NR(EVIOCGNAME(0))) | 610 | if (_IOC_NR(cmd) == _IOC_NR(EVIOCGNAME(0))) |
611 | return str_to_user(dev_name(&evdev->dev), | 611 | return str_to_user(dev->name, _IOC_SIZE(cmd), p); |
612 | _IOC_SIZE(cmd), p); | ||
613 | 612 | ||
614 | if (_IOC_NR(cmd) == _IOC_NR(EVIOCGPHYS(0))) | 613 | if (_IOC_NR(cmd) == _IOC_NR(EVIOCGPHYS(0))) |
615 | return str_to_user(dev->phys, _IOC_SIZE(cmd), p); | 614 | return str_to_user(dev->phys, _IOC_SIZE(cmd), p); |
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index 0e12f89276a3..4cfd084fa897 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c | |||
@@ -536,7 +536,7 @@ static int joydev_ioctl_common(struct joydev *joydev, | |||
536 | default: | 536 | default: |
537 | if ((cmd & ~IOCSIZE_MASK) == JSIOCGNAME(0)) { | 537 | if ((cmd & ~IOCSIZE_MASK) == JSIOCGNAME(0)) { |
538 | int len; | 538 | int len; |
539 | const char *name = dev_name(&dev->dev); | 539 | const char *name = dev->name; |
540 | 540 | ||
541 | if (!name) | 541 | if (!name) |
542 | return 0; | 542 | return 0; |
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index b868b8d5fbb3..f155ad8cdae7 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c | |||
@@ -470,20 +470,20 @@ static void xpad_irq_out(struct urb *urb) | |||
470 | status = urb->status; | 470 | status = urb->status; |
471 | 471 | ||
472 | switch (status) { | 472 | switch (status) { |
473 | case 0: | 473 | case 0: |
474 | /* success */ | 474 | /* success */ |
475 | break; | 475 | return; |
476 | case -ECONNRESET: | 476 | |
477 | case -ENOENT: | 477 | case -ECONNRESET: |
478 | case -ESHUTDOWN: | 478 | case -ENOENT: |
479 | /* this urb is terminated, clean up */ | 479 | case -ESHUTDOWN: |
480 | dbg("%s - urb shutting down with status: %d", | 480 | /* this urb is terminated, clean up */ |
481 | __func__, status); | 481 | dbg("%s - urb shutting down with status: %d", __func__, status); |
482 | return; | 482 | return; |
483 | default: | 483 | |
484 | dbg("%s - nonzero urb status received: %d", | 484 | default: |
485 | __func__, status); | 485 | dbg("%s - nonzero urb status received: %d", __func__, status); |
486 | goto exit; | 486 | goto exit; |
487 | } | 487 | } |
488 | 488 | ||
489 | exit: | 489 | exit: |
diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig index 9d8f796c6745..a6b989a9dc07 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig | |||
@@ -12,6 +12,42 @@ menuconfig INPUT_KEYBOARD | |||
12 | 12 | ||
13 | if INPUT_KEYBOARD | 13 | if INPUT_KEYBOARD |
14 | 14 | ||
15 | config KEYBOARD_AAED2000 | ||
16 | tristate "AAED-2000 keyboard" | ||
17 | depends on MACH_AAED2000 | ||
18 | select INPUT_POLLDEV | ||
19 | default y | ||
20 | help | ||
21 | Say Y here to enable the keyboard on the Agilent AAED-2000 | ||
22 | development board. | ||
23 | |||
24 | To compile this driver as a module, choose M here: the | ||
25 | module will be called aaed2000_kbd. | ||
26 | |||
27 | config KEYBOARD_AMIGA | ||
28 | tristate "Amiga keyboard" | ||
29 | depends on AMIGA | ||
30 | help | ||
31 | Say Y here if you are running Linux on any AMIGA and have a keyboard | ||
32 | attached. | ||
33 | |||
34 | To compile this driver as a module, choose M here: the | ||
35 | module will be called amikbd. | ||
36 | |||
37 | config ATARI_KBD_CORE | ||
38 | bool | ||
39 | |||
40 | config KEYBOARD_ATARI | ||
41 | tristate "Atari keyboard" | ||
42 | depends on ATARI | ||
43 | select ATARI_KBD_CORE | ||
44 | help | ||
45 | Say Y here if you are running Linux on any Atari and have a keyboard | ||
46 | attached. | ||
47 | |||
48 | To compile this driver as a module, choose M here: the | ||
49 | module will be called atakbd. | ||
50 | |||
15 | config KEYBOARD_ATKBD | 51 | config KEYBOARD_ATKBD |
16 | tristate "AT keyboard" if EMBEDDED || !X86 | 52 | tristate "AT keyboard" if EMBEDDED || !X86 |
17 | default y | 53 | default y |
@@ -68,69 +104,14 @@ config KEYBOARD_ATKBD_RDI_KEYCODES | |||
68 | right-hand column will be interpreted as the key shown in the | 104 | right-hand column will be interpreted as the key shown in the |
69 | left-hand column. | 105 | left-hand column. |
70 | 106 | ||
71 | config KEYBOARD_SUNKBD | 107 | config KEYBOARD_BFIN |
72 | tristate "Sun Type 4 and Type 5 keyboard" | 108 | tristate "Blackfin BF54x keypad support" |
73 | select SERIO | 109 | depends on (BF54x && !BF544) |
74 | help | ||
75 | Say Y here if you want to use a Sun Type 4 or Type 5 keyboard, | ||
76 | connected either to the Sun keyboard connector or to an serial | ||
77 | (RS-232) port via a simple adapter. | ||
78 | |||
79 | To compile this driver as a module, choose M here: the | ||
80 | module will be called sunkbd. | ||
81 | |||
82 | config KEYBOARD_LKKBD | ||
83 | tristate "DECstation/VAXstation LK201/LK401 keyboard" | ||
84 | select SERIO | ||
85 | help | ||
86 | Say Y here if you want to use a LK201 or LK401 style serial | ||
87 | keyboard. This keyboard is also useable on PCs if you attach | ||
88 | it with the inputattach program. The connector pinout is | ||
89 | described within lkkbd.c. | ||
90 | |||
91 | To compile this driver as a module, choose M here: the | ||
92 | module will be called lkkbd. | ||
93 | |||
94 | config KEYBOARD_LOCOMO | ||
95 | tristate "LoCoMo Keyboard Support" | ||
96 | depends on SHARP_LOCOMO && INPUT_KEYBOARD | ||
97 | help | ||
98 | Say Y here if you are running Linux on a Sharp Zaurus Collie or Poodle based PDA | ||
99 | |||
100 | To compile this driver as a module, choose M here: the | ||
101 | module will be called locomokbd. | ||
102 | |||
103 | config KEYBOARD_XTKBD | ||
104 | tristate "XT keyboard" | ||
105 | select SERIO | ||
106 | help | ||
107 | Say Y here if you want to use the old IBM PC/XT keyboard (or | ||
108 | compatible) on your system. This is only possible with a | ||
109 | parallel port keyboard adapter, you cannot connect it to the | ||
110 | keyboard port on a PC that runs Linux. | ||
111 | |||
112 | To compile this driver as a module, choose M here: the | ||
113 | module will be called xtkbd. | ||
114 | |||
115 | config KEYBOARD_NEWTON | ||
116 | tristate "Newton keyboard" | ||
117 | select SERIO | ||
118 | help | ||
119 | Say Y here if you have a Newton keyboard on a serial port. | ||
120 | |||
121 | To compile this driver as a module, choose M here: the | ||
122 | module will be called newtonkbd. | ||
123 | |||
124 | config KEYBOARD_STOWAWAY | ||
125 | tristate "Stowaway keyboard" | ||
126 | select SERIO | ||
127 | help | 110 | help |
128 | Say Y here if you have a Stowaway keyboard on a serial port. | 111 | Say Y here if you want to use the BF54x keypad. |
129 | Stowaway compatible keyboards like Dicota Input-PDA keyboard | ||
130 | are also supported by this driver. | ||
131 | 112 | ||
132 | To compile this driver as a module, choose M here: the | 113 | To compile this driver as a module, choose M here: the |
133 | module will be called stowaway. | 114 | module will be called bf54x-keys. |
134 | 115 | ||
135 | config KEYBOARD_CORGI | 116 | config KEYBOARD_CORGI |
136 | tristate "Corgi keyboard" | 117 | tristate "Corgi keyboard" |
@@ -143,61 +124,50 @@ config KEYBOARD_CORGI | |||
143 | To compile this driver as a module, choose M here: the | 124 | To compile this driver as a module, choose M here: the |
144 | module will be called corgikbd. | 125 | module will be called corgikbd. |
145 | 126 | ||
146 | config KEYBOARD_SPITZ | 127 | config KEYBOARD_LKKBD |
147 | tristate "Spitz keyboard" | 128 | tristate "DECstation/VAXstation LK201/LK401 keyboard" |
148 | depends on PXA_SHARPSL | 129 | select SERIO |
149 | default y | ||
150 | help | 130 | help |
151 | Say Y here to enable the keyboard on the Sharp Zaurus SL-C1000, | 131 | Say Y here if you want to use a LK201 or LK401 style serial |
152 | SL-C3000 and Sl-C3100 series of PDAs. | 132 | keyboard. This keyboard is also useable on PCs if you attach |
133 | it with the inputattach program. The connector pinout is | ||
134 | described within lkkbd.c. | ||
153 | 135 | ||
154 | To compile this driver as a module, choose M here: the | 136 | To compile this driver as a module, choose M here: the |
155 | module will be called spitzkbd. | 137 | module will be called lkkbd. |
156 | 138 | ||
157 | config KEYBOARD_TOSA | 139 | config KEYBOARD_EP93XX |
158 | tristate "Tosa keyboard" | 140 | tristate "EP93xx Matrix Keypad support" |
159 | depends on MACH_TOSA | 141 | depends on ARCH_EP93XX |
160 | default y | ||
161 | help | 142 | help |
162 | Say Y here to enable the keyboard on the Sharp Zaurus SL-6000x (Tosa) | 143 | Say Y here to enable the matrix keypad on the Cirrus EP93XX. |
163 | 144 | ||
164 | To compile this driver as a module, choose M here: the | 145 | To compile this driver as a module, choose M here: the |
165 | module will be called tosakbd. | 146 | module will be called ep93xx_keypad. |
166 | 147 | ||
167 | config KEYBOARD_TOSA_USE_EXT_KEYCODES | 148 | config KEYBOARD_GPIO |
168 | bool "Tosa keyboard: use extended keycodes" | 149 | tristate "GPIO Buttons" |
169 | depends on KEYBOARD_TOSA | 150 | depends on GENERIC_GPIO |
170 | default n | ||
171 | help | 151 | help |
172 | Say Y here to enable the tosa keyboard driver to generate extended | 152 | This driver implements support for buttons connected |
173 | (>= 127) keycodes. Be aware, that they can't be correctly interpreted | 153 | to GPIO pins of various CPUs (and some other chips). |
174 | by either console keyboard driver or by Kdrive keybd driver. | ||
175 | |||
176 | Say Y only if you know, what you are doing! | ||
177 | 154 | ||
178 | config KEYBOARD_AMIGA | 155 | Say Y here if your device has buttons connected |
179 | tristate "Amiga keyboard" | 156 | directly to such GPIO pins. Your board-specific |
180 | depends on AMIGA | 157 | setup logic must also provide a platform device, |
181 | help | 158 | with configuration data saying which GPIOs are used. |
182 | Say Y here if you are running Linux on any AMIGA and have a keyboard | ||
183 | attached. | ||
184 | 159 | ||
185 | To compile this driver as a module, choose M here: the | 160 | To compile this driver as a module, choose M here: the |
186 | module will be called amikbd. | 161 | module will be called gpio_keys. |
187 | 162 | ||
188 | config ATARI_KBD_CORE | 163 | config KEYBOARD_MATRIX |
189 | bool | 164 | tristate "GPIO driven matrix keypad support" |
190 | 165 | depends on GENERIC_GPIO | |
191 | config KEYBOARD_ATARI | ||
192 | tristate "Atari keyboard" | ||
193 | depends on ATARI | ||
194 | select ATARI_KBD_CORE | ||
195 | help | 166 | help |
196 | Say Y here if you are running Linux on any Atari and have a keyboard | 167 | Enable support for GPIO driven matrix keypad. |
197 | attached. | ||
198 | 168 | ||
199 | To compile this driver as a module, choose M here: the | 169 | To compile this driver as a module, choose M here: the |
200 | module will be called atakbd. | 170 | module will be called matrix_keypad. |
201 | 171 | ||
202 | config KEYBOARD_HIL_OLD | 172 | config KEYBOARD_HIL_OLD |
203 | tristate "HP HIL keyboard support (simple driver)" | 173 | tristate "HP HIL keyboard support (simple driver)" |
@@ -261,20 +231,39 @@ config KEYBOARD_LM8323 | |||
261 | To compile this driver as a module, choose M here: the | 231 | To compile this driver as a module, choose M here: the |
262 | module will be called lm8323. | 232 | module will be called lm8323. |
263 | 233 | ||
264 | config KEYBOARD_OMAP | 234 | config KEYBOARD_LOCOMO |
265 | tristate "TI OMAP keypad support" | 235 | tristate "LoCoMo Keyboard Support" |
266 | depends on (ARCH_OMAP1 || ARCH_OMAP2) | 236 | depends on SHARP_LOCOMO |
267 | help | 237 | help |
268 | Say Y here if you want to use the OMAP keypad. | 238 | Say Y here if you are running Linux on a Sharp Zaurus Collie or Poodle based PDA |
269 | 239 | ||
270 | To compile this driver as a module, choose M here: the | 240 | To compile this driver as a module, choose M here: the |
271 | module will be called omap-keypad. | 241 | module will be called locomokbd. |
242 | |||
243 | config KEYBOARD_MAPLE | ||
244 | tristate "Maple bus keyboard" | ||
245 | depends on SH_DREAMCAST && MAPLE | ||
246 | help | ||
247 | Say Y here if you have a Dreamcast console running Linux and have | ||
248 | a keyboard attached to its Maple bus. | ||
249 | |||
250 | To compile this driver as a module, choose M here: the | ||
251 | module will be called maple_keyb. | ||
252 | |||
253 | config KEYBOARD_NEWTON | ||
254 | tristate "Newton keyboard" | ||
255 | select SERIO | ||
256 | help | ||
257 | Say Y here if you have a Newton keyboard on a serial port. | ||
258 | |||
259 | To compile this driver as a module, choose M here: the | ||
260 | module will be called newtonkbd. | ||
272 | 261 | ||
273 | config KEYBOARD_PXA27x | 262 | config KEYBOARD_PXA27x |
274 | tristate "PXA27x/PXA3xx keypad support" | 263 | tristate "PXA27x/PXA3xx keypad support" |
275 | depends on PXA27x || PXA3xx | 264 | depends on PXA27x || PXA3xx |
276 | help | 265 | help |
277 | Enable support for PXA27x/PXA3xx keypad controller | 266 | Enable support for PXA27x/PXA3xx keypad controller. |
278 | 267 | ||
279 | To compile this driver as a module, choose M here: the | 268 | To compile this driver as a module, choose M here: the |
280 | module will be called pxa27x_keypad. | 269 | module will be called pxa27x_keypad. |
@@ -288,51 +277,38 @@ config KEYBOARD_PXA930_ROTARY | |||
288 | To compile this driver as a module, choose M here: the | 277 | To compile this driver as a module, choose M here: the |
289 | module will be called pxa930_rotary. | 278 | module will be called pxa930_rotary. |
290 | 279 | ||
291 | config KEYBOARD_AAED2000 | 280 | config KEYBOARD_SPITZ |
292 | tristate "AAED-2000 keyboard" | 281 | tristate "Spitz keyboard" |
293 | depends on MACH_AAED2000 | 282 | depends on PXA_SHARPSL |
294 | select INPUT_POLLDEV | ||
295 | default y | 283 | default y |
296 | help | 284 | help |
297 | Say Y here to enable the keyboard on the Agilent AAED-2000 | 285 | Say Y here to enable the keyboard on the Sharp Zaurus SL-C1000, |
298 | development board. | 286 | SL-C3000 and Sl-C3100 series of PDAs. |
299 | |||
300 | To compile this driver as a module, choose M here: the | ||
301 | module will be called aaed2000_kbd. | ||
302 | |||
303 | config KEYBOARD_GPIO | ||
304 | tristate "GPIO Buttons" | ||
305 | depends on GENERIC_GPIO | ||
306 | help | ||
307 | This driver implements support for buttons connected | ||
308 | to GPIO pins of various CPUs (and some other chips). | ||
309 | |||
310 | Say Y here if your device has buttons connected | ||
311 | directly to such GPIO pins. Your board-specific | ||
312 | setup logic must also provide a platform device, | ||
313 | with configuration data saying which GPIOs are used. | ||
314 | 287 | ||
315 | To compile this driver as a module, choose M here: the | 288 | To compile this driver as a module, choose M here: the |
316 | module will be called gpio-keys. | 289 | module will be called spitzkbd. |
317 | 290 | ||
318 | config KEYBOARD_MAPLE | 291 | config KEYBOARD_STOWAWAY |
319 | tristate "Maple bus keyboard" | 292 | tristate "Stowaway keyboard" |
320 | depends on SH_DREAMCAST && MAPLE | 293 | select SERIO |
321 | help | 294 | help |
322 | Say Y here if you have a Dreamcast console running Linux and have | 295 | Say Y here if you have a Stowaway keyboard on a serial port. |
323 | a keyboard attached to its Maple bus. | 296 | Stowaway compatible keyboards like Dicota Input-PDA keyboard |
297 | are also supported by this driver. | ||
324 | 298 | ||
325 | To compile this driver as a module, choose M here: the | 299 | To compile this driver as a module, choose M here: the |
326 | module will be called maple_keyb. | 300 | module will be called stowaway. |
327 | 301 | ||
328 | config KEYBOARD_BFIN | 302 | config KEYBOARD_SUNKBD |
329 | tristate "Blackfin BF54x keypad support" | 303 | tristate "Sun Type 4 and Type 5 keyboard" |
330 | depends on (BF54x && !BF544) | 304 | select SERIO |
331 | help | 305 | help |
332 | Say Y here if you want to use the BF54x keypad. | 306 | Say Y here if you want to use a Sun Type 4 or Type 5 keyboard, |
307 | connected either to the Sun keyboard connector or to an serial | ||
308 | (RS-232) port via a simple adapter. | ||
333 | 309 | ||
334 | To compile this driver as a module, choose M here: the | 310 | To compile this driver as a module, choose M here: the |
335 | module will be called bf54x-keys. | 311 | module will be called sunkbd. |
336 | 312 | ||
337 | config KEYBOARD_SH_KEYSC | 313 | config KEYBOARD_SH_KEYSC |
338 | tristate "SuperH KEYSC keypad support" | 314 | tristate "SuperH KEYSC keypad support" |
@@ -344,13 +320,45 @@ config KEYBOARD_SH_KEYSC | |||
344 | To compile this driver as a module, choose M here: the | 320 | To compile this driver as a module, choose M here: the |
345 | module will be called sh_keysc. | 321 | module will be called sh_keysc. |
346 | 322 | ||
347 | config KEYBOARD_EP93XX | 323 | config KEYBOARD_OMAP |
348 | tristate "EP93xx Matrix Keypad support" | 324 | tristate "TI OMAP keypad support" |
349 | depends on ARCH_EP93XX | 325 | depends on (ARCH_OMAP1 || ARCH_OMAP2) |
350 | help | 326 | help |
351 | Say Y here to enable the matrix keypad on the Cirrus EP93XX. | 327 | Say Y here if you want to use the OMAP keypad. |
352 | 328 | ||
353 | To compile this driver as a module, choose M here: the | 329 | To compile this driver as a module, choose M here: the |
354 | module will be called ep93xx_keypad. | 330 | module will be called omap-keypad. |
331 | |||
332 | config KEYBOARD_TOSA | ||
333 | tristate "Tosa keyboard" | ||
334 | depends on MACH_TOSA | ||
335 | default y | ||
336 | help | ||
337 | Say Y here to enable the keyboard on the Sharp Zaurus SL-6000x (Tosa) | ||
338 | |||
339 | To compile this driver as a module, choose M here: the | ||
340 | module will be called tosakbd. | ||
341 | |||
342 | config KEYBOARD_TOSA_USE_EXT_KEYCODES | ||
343 | bool "Tosa keyboard: use extended keycodes" | ||
344 | depends on KEYBOARD_TOSA | ||
345 | help | ||
346 | Say Y here to enable the tosa keyboard driver to generate extended | ||
347 | (>= 127) keycodes. Be aware, that they can't be correctly interpreted | ||
348 | by either console keyboard driver or by Kdrive keybd driver. | ||
349 | |||
350 | Say Y only if you know, what you are doing! | ||
351 | |||
352 | config KEYBOARD_XTKBD | ||
353 | tristate "XT keyboard" | ||
354 | select SERIO | ||
355 | help | ||
356 | Say Y here if you want to use the old IBM PC/XT keyboard (or | ||
357 | compatible) on your system. This is only possible with a | ||
358 | parallel port keyboard adapter, you cannot connect it to the | ||
359 | keyboard port on a PC that runs Linux. | ||
360 | |||
361 | To compile this driver as a module, choose M here: the | ||
362 | module will be called xtkbd. | ||
355 | 363 | ||
356 | endif | 364 | endif |
diff --git a/drivers/input/keyboard/Makefile b/drivers/input/keyboard/Makefile index 156b647a259b..b5b5eae9724f 100644 --- a/drivers/input/keyboard/Makefile +++ b/drivers/input/keyboard/Makefile | |||
@@ -4,29 +4,30 @@ | |||
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_ATKBD) += atkbd.o | 7 | obj-$(CONFIG_KEYBOARD_AAED2000) += aaed2000_kbd.o |
8 | obj-$(CONFIG_KEYBOARD_SUNKBD) += sunkbd.o | ||
9 | obj-$(CONFIG_KEYBOARD_LKKBD) += lkkbd.o | ||
10 | obj-$(CONFIG_KEYBOARD_XTKBD) += xtkbd.o | ||
11 | obj-$(CONFIG_KEYBOARD_AMIGA) += amikbd.o | 8 | obj-$(CONFIG_KEYBOARD_AMIGA) += amikbd.o |
12 | obj-$(CONFIG_KEYBOARD_ATARI) += atakbd.o | 9 | obj-$(CONFIG_KEYBOARD_ATARI) += atakbd.o |
13 | obj-$(CONFIG_KEYBOARD_LOCOMO) += locomokbd.o | 10 | obj-$(CONFIG_KEYBOARD_ATKBD) += atkbd.o |
14 | obj-$(CONFIG_KEYBOARD_NEWTON) += newtonkbd.o | 11 | obj-$(CONFIG_KEYBOARD_BFIN) += bf54x-keys.o |
15 | obj-$(CONFIG_KEYBOARD_STOWAWAY) += stowaway.o | ||
16 | obj-$(CONFIG_KEYBOARD_CORGI) += corgikbd.o | 12 | obj-$(CONFIG_KEYBOARD_CORGI) += corgikbd.o |
17 | obj-$(CONFIG_KEYBOARD_SPITZ) += spitzkbd.o | 13 | obj-$(CONFIG_KEYBOARD_EP93XX) += ep93xx_keypad.o |
18 | obj-$(CONFIG_KEYBOARD_TOSA) += tosakbd.o | 14 | obj-$(CONFIG_KEYBOARD_GPIO) += gpio_keys.o |
19 | obj-$(CONFIG_KEYBOARD_HIL) += hil_kbd.o | 15 | obj-$(CONFIG_KEYBOARD_HIL) += hil_kbd.o |
20 | obj-$(CONFIG_KEYBOARD_HIL_OLD) += hilkbd.o | 16 | obj-$(CONFIG_KEYBOARD_HIL_OLD) += hilkbd.o |
17 | obj-$(CONFIG_KEYBOARD_HP6XX) += jornada680_kbd.o | ||
18 | obj-$(CONFIG_KEYBOARD_HP7XX) += jornada720_kbd.o | ||
19 | obj-$(CONFIG_KEYBOARD_LKKBD) += lkkbd.o | ||
21 | obj-$(CONFIG_KEYBOARD_LM8323) += lm8323.o | 20 | obj-$(CONFIG_KEYBOARD_LM8323) += lm8323.o |
21 | obj-$(CONFIG_KEYBOARD_LOCOMO) += locomokbd.o | ||
22 | obj-$(CONFIG_KEYBOARD_MAPLE) += maple_keyb.o | ||
23 | obj-$(CONFIG_KEYBOARD_MATRIX) += matrix_keypad.o | ||
24 | obj-$(CONFIG_KEYBOARD_NEWTON) += newtonkbd.o | ||
22 | obj-$(CONFIG_KEYBOARD_OMAP) += omap-keypad.o | 25 | obj-$(CONFIG_KEYBOARD_OMAP) += omap-keypad.o |
23 | obj-$(CONFIG_KEYBOARD_PXA27x) += pxa27x_keypad.o | 26 | obj-$(CONFIG_KEYBOARD_PXA27x) += pxa27x_keypad.o |
24 | obj-$(CONFIG_KEYBOARD_PXA930_ROTARY) += pxa930_rotary.o | 27 | obj-$(CONFIG_KEYBOARD_PXA930_ROTARY) += pxa930_rotary.o |
25 | obj-$(CONFIG_KEYBOARD_AAED2000) += aaed2000_kbd.o | ||
26 | obj-$(CONFIG_KEYBOARD_GPIO) += gpio_keys.o | ||
27 | obj-$(CONFIG_KEYBOARD_HP6XX) += jornada680_kbd.o | ||
28 | obj-$(CONFIG_KEYBOARD_HP7XX) += jornada720_kbd.o | ||
29 | obj-$(CONFIG_KEYBOARD_MAPLE) += maple_keyb.o | ||
30 | obj-$(CONFIG_KEYBOARD_BFIN) += bf54x-keys.o | ||
31 | obj-$(CONFIG_KEYBOARD_SH_KEYSC) += sh_keysc.o | 28 | obj-$(CONFIG_KEYBOARD_SH_KEYSC) += sh_keysc.o |
32 | obj-$(CONFIG_KEYBOARD_EP93XX) += ep93xx_keypad.o | 29 | obj-$(CONFIG_KEYBOARD_SPITZ) += spitzkbd.o |
30 | obj-$(CONFIG_KEYBOARD_STOWAWAY) += stowaway.o | ||
31 | obj-$(CONFIG_KEYBOARD_SUNKBD) += sunkbd.o | ||
32 | obj-$(CONFIG_KEYBOARD_TOSA) += tosakbd.o | ||
33 | obj-$(CONFIG_KEYBOARD_XTKBD) += xtkbd.o | ||
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index df3f8aa68115..95fe0452dae4 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c | |||
@@ -895,6 +895,13 @@ static unsigned int atkbd_amilo_pa1510_forced_release_keys[] = { | |||
895 | }; | 895 | }; |
896 | 896 | ||
897 | /* | 897 | /* |
898 | * Amilo Pi 3525 key release for Fn+Volume keys not working | ||
899 | */ | ||
900 | static unsigned int atkbd_amilo_pi3525_forced_release_keys[] = { | ||
901 | 0x20, 0xa0, 0x2e, 0xae, 0x30, 0xb0, -1U | ||
902 | }; | ||
903 | |||
904 | /* | ||
898 | * Amilo Xi 3650 key release for light touch bar not working | 905 | * Amilo Xi 3650 key release for light touch bar not working |
899 | */ | 906 | */ |
900 | static unsigned int atkbd_amilo_xi3650_forced_release_keys[] = { | 907 | static unsigned int atkbd_amilo_xi3650_forced_release_keys[] = { |
@@ -902,6 +909,13 @@ static unsigned int atkbd_amilo_xi3650_forced_release_keys[] = { | |||
902 | }; | 909 | }; |
903 | 910 | ||
904 | /* | 911 | /* |
912 | * Soltech TA12 system with broken key release on volume keys and mute key | ||
913 | */ | ||
914 | static unsigned int atkdb_soltech_ta12_forced_release_keys[] = { | ||
915 | 0xa0, 0xae, 0xb0, -1U | ||
916 | }; | ||
917 | |||
918 | /* | ||
905 | * atkbd_set_keycode_table() initializes keyboard's keycode table | 919 | * atkbd_set_keycode_table() initializes keyboard's keycode table |
906 | * according to the selected scancode set | 920 | * according to the selected scancode set |
907 | */ | 921 | */ |
@@ -1568,6 +1582,15 @@ static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = { | |||
1568 | .driver_data = atkbd_amilo_pa1510_forced_release_keys, | 1582 | .driver_data = atkbd_amilo_pa1510_forced_release_keys, |
1569 | }, | 1583 | }, |
1570 | { | 1584 | { |
1585 | .ident = "Fujitsu Amilo Pi 3525", | ||
1586 | .matches = { | ||
1587 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), | ||
1588 | DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pi 3525"), | ||
1589 | }, | ||
1590 | .callback = atkbd_setup_forced_release, | ||
1591 | .driver_data = atkbd_amilo_pi3525_forced_release_keys, | ||
1592 | }, | ||
1593 | { | ||
1571 | .ident = "Fujitsu Amilo Xi 3650", | 1594 | .ident = "Fujitsu Amilo Xi 3650", |
1572 | .matches = { | 1595 | .matches = { |
1573 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), | 1596 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), |
@@ -1576,6 +1599,15 @@ static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = { | |||
1576 | .callback = atkbd_setup_forced_release, | 1599 | .callback = atkbd_setup_forced_release, |
1577 | .driver_data = atkbd_amilo_xi3650_forced_release_keys, | 1600 | .driver_data = atkbd_amilo_xi3650_forced_release_keys, |
1578 | }, | 1601 | }, |
1602 | { | ||
1603 | .ident = "Soltech Corporation TA12", | ||
1604 | .matches = { | ||
1605 | DMI_MATCH(DMI_SYS_VENDOR, "Soltech Corporation"), | ||
1606 | DMI_MATCH(DMI_PRODUCT_NAME, "TA12"), | ||
1607 | }, | ||
1608 | .callback = atkbd_setup_forced_release, | ||
1609 | .driver_data = atkdb_soltech_ta12_forced_release_keys, | ||
1610 | }, | ||
1579 | { } | 1611 | { } |
1580 | }; | 1612 | }; |
1581 | 1613 | ||
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index 2157cd7de00c..efed0c9e242e 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c | |||
@@ -29,7 +29,8 @@ | |||
29 | struct gpio_button_data { | 29 | struct gpio_button_data { |
30 | struct gpio_keys_button *button; | 30 | struct gpio_keys_button *button; |
31 | struct input_dev *input; | 31 | struct input_dev *input; |
32 | struct delayed_work work; | 32 | struct timer_list timer; |
33 | struct work_struct work; | ||
33 | }; | 34 | }; |
34 | 35 | ||
35 | struct gpio_keys_drvdata { | 36 | struct gpio_keys_drvdata { |
@@ -40,7 +41,7 @@ struct gpio_keys_drvdata { | |||
40 | static void gpio_keys_report_event(struct work_struct *work) | 41 | static void gpio_keys_report_event(struct work_struct *work) |
41 | { | 42 | { |
42 | struct gpio_button_data *bdata = | 43 | struct gpio_button_data *bdata = |
43 | container_of(work, struct gpio_button_data, work.work); | 44 | container_of(work, struct gpio_button_data, work); |
44 | struct gpio_keys_button *button = bdata->button; | 45 | struct gpio_keys_button *button = bdata->button; |
45 | struct input_dev *input = bdata->input; | 46 | struct input_dev *input = bdata->input; |
46 | unsigned int type = button->type ?: EV_KEY; | 47 | unsigned int type = button->type ?: EV_KEY; |
@@ -50,17 +51,25 @@ static void gpio_keys_report_event(struct work_struct *work) | |||
50 | input_sync(input); | 51 | input_sync(input); |
51 | } | 52 | } |
52 | 53 | ||
54 | static void gpio_keys_timer(unsigned long _data) | ||
55 | { | ||
56 | struct gpio_button_data *data = (struct gpio_button_data *)_data; | ||
57 | |||
58 | schedule_work(&data->work); | ||
59 | } | ||
60 | |||
53 | static irqreturn_t gpio_keys_isr(int irq, void *dev_id) | 61 | static irqreturn_t gpio_keys_isr(int irq, void *dev_id) |
54 | { | 62 | { |
55 | struct gpio_button_data *bdata = dev_id; | 63 | struct gpio_button_data *bdata = dev_id; |
56 | struct gpio_keys_button *button = bdata->button; | 64 | struct gpio_keys_button *button = bdata->button; |
57 | unsigned long delay; | ||
58 | 65 | ||
59 | BUG_ON(irq != gpio_to_irq(button->gpio)); | 66 | BUG_ON(irq != gpio_to_irq(button->gpio)); |
60 | 67 | ||
61 | delay = button->debounce_interval ? | 68 | if (button->debounce_interval) |
62 | msecs_to_jiffies(button->debounce_interval) : 0; | 69 | mod_timer(&bdata->timer, |
63 | schedule_delayed_work(&bdata->work, delay); | 70 | jiffies + msecs_to_jiffies(button->debounce_interval)); |
71 | else | ||
72 | schedule_work(&bdata->work); | ||
64 | 73 | ||
65 | return IRQ_HANDLED; | 74 | return IRQ_HANDLED; |
66 | } | 75 | } |
@@ -107,7 +116,9 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev) | |||
107 | 116 | ||
108 | bdata->input = input; | 117 | bdata->input = input; |
109 | bdata->button = button; | 118 | bdata->button = button; |
110 | INIT_DELAYED_WORK(&bdata->work, gpio_keys_report_event); | 119 | setup_timer(&bdata->timer, |
120 | gpio_keys_timer, (unsigned long)bdata); | ||
121 | INIT_WORK(&bdata->work, gpio_keys_report_event); | ||
111 | 122 | ||
112 | error = gpio_request(button->gpio, button->desc ?: "gpio_keys"); | 123 | error = gpio_request(button->gpio, button->desc ?: "gpio_keys"); |
113 | if (error < 0) { | 124 | if (error < 0) { |
@@ -166,7 +177,9 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev) | |||
166 | fail2: | 177 | fail2: |
167 | while (--i >= 0) { | 178 | while (--i >= 0) { |
168 | free_irq(gpio_to_irq(pdata->buttons[i].gpio), &ddata->data[i]); | 179 | free_irq(gpio_to_irq(pdata->buttons[i].gpio), &ddata->data[i]); |
169 | cancel_delayed_work_sync(&ddata->data[i].work); | 180 | if (pdata->buttons[i].debounce_interval) |
181 | del_timer_sync(&ddata->data[i].timer); | ||
182 | cancel_work_sync(&ddata->data[i].work); | ||
170 | gpio_free(pdata->buttons[i].gpio); | 183 | gpio_free(pdata->buttons[i].gpio); |
171 | } | 184 | } |
172 | 185 | ||
@@ -190,7 +203,9 @@ static int __devexit gpio_keys_remove(struct platform_device *pdev) | |||
190 | for (i = 0; i < pdata->nbuttons; i++) { | 203 | for (i = 0; i < pdata->nbuttons; i++) { |
191 | int irq = gpio_to_irq(pdata->buttons[i].gpio); | 204 | int irq = gpio_to_irq(pdata->buttons[i].gpio); |
192 | free_irq(irq, &ddata->data[i]); | 205 | free_irq(irq, &ddata->data[i]); |
193 | cancel_delayed_work_sync(&ddata->data[i].work); | 206 | if (pdata->buttons[i].debounce_interval) |
207 | del_timer_sync(&ddata->data[i].timer); | ||
208 | cancel_work_sync(&ddata->data[i].work); | ||
194 | gpio_free(pdata->buttons[i].gpio); | 209 | gpio_free(pdata->buttons[i].gpio); |
195 | } | 210 | } |
196 | 211 | ||
diff --git a/drivers/input/keyboard/matrix_keypad.c b/drivers/input/keyboard/matrix_keypad.c new file mode 100644 index 000000000000..541b981ff075 --- /dev/null +++ b/drivers/input/keyboard/matrix_keypad.c | |||
@@ -0,0 +1,453 @@ | |||
1 | /* | ||
2 | * GPIO driven matrix keyboard driver | ||
3 | * | ||
4 | * Copyright (c) 2008 Marek Vasut <marek.vasut@gmail.com> | ||
5 | * | ||
6 | * Based on corgikbd.c | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | #include <linux/types.h> | ||
15 | #include <linux/delay.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/init.h> | ||
18 | #include <linux/input.h> | ||
19 | #include <linux/irq.h> | ||
20 | #include <linux/interrupt.h> | ||
21 | #include <linux/jiffies.h> | ||
22 | #include <linux/module.h> | ||
23 | #include <linux/gpio.h> | ||
24 | #include <linux/input/matrix_keypad.h> | ||
25 | |||
26 | struct matrix_keypad { | ||
27 | const struct matrix_keypad_platform_data *pdata; | ||
28 | struct input_dev *input_dev; | ||
29 | unsigned short *keycodes; | ||
30 | unsigned int row_shift; | ||
31 | |||
32 | uint32_t last_key_state[MATRIX_MAX_COLS]; | ||
33 | struct delayed_work work; | ||
34 | bool scan_pending; | ||
35 | bool stopped; | ||
36 | spinlock_t lock; | ||
37 | }; | ||
38 | |||
39 | /* | ||
40 | * NOTE: normally the GPIO has to be put into HiZ when de-activated to cause | ||
41 | * minmal side effect when scanning other columns, here it is configured to | ||
42 | * be input, and it should work on most platforms. | ||
43 | */ | ||
44 | static void __activate_col(const struct matrix_keypad_platform_data *pdata, | ||
45 | int col, bool on) | ||
46 | { | ||
47 | bool level_on = !pdata->active_low; | ||
48 | |||
49 | if (on) { | ||
50 | gpio_direction_output(pdata->col_gpios[col], level_on); | ||
51 | } else { | ||
52 | gpio_set_value_cansleep(pdata->col_gpios[col], !level_on); | ||
53 | gpio_direction_input(pdata->col_gpios[col]); | ||
54 | } | ||
55 | } | ||
56 | |||
57 | static void activate_col(const struct matrix_keypad_platform_data *pdata, | ||
58 | int col, bool on) | ||
59 | { | ||
60 | __activate_col(pdata, col, on); | ||
61 | |||
62 | if (on && pdata->col_scan_delay_us) | ||
63 | udelay(pdata->col_scan_delay_us); | ||
64 | } | ||
65 | |||
66 | static void activate_all_cols(const struct matrix_keypad_platform_data *pdata, | ||
67 | bool on) | ||
68 | { | ||
69 | int col; | ||
70 | |||
71 | for (col = 0; col < pdata->num_col_gpios; col++) | ||
72 | __activate_col(pdata, col, on); | ||
73 | } | ||
74 | |||
75 | static bool row_asserted(const struct matrix_keypad_platform_data *pdata, | ||
76 | int row) | ||
77 | { | ||
78 | return gpio_get_value_cansleep(pdata->row_gpios[row]) ? | ||
79 | !pdata->active_low : pdata->active_low; | ||
80 | } | ||
81 | |||
82 | static void enable_row_irqs(struct matrix_keypad *keypad) | ||
83 | { | ||
84 | const struct matrix_keypad_platform_data *pdata = keypad->pdata; | ||
85 | int i; | ||
86 | |||
87 | for (i = 0; i < pdata->num_row_gpios; i++) | ||
88 | enable_irq(gpio_to_irq(pdata->row_gpios[i])); | ||
89 | } | ||
90 | |||
91 | static void disable_row_irqs(struct matrix_keypad *keypad) | ||
92 | { | ||
93 | const struct matrix_keypad_platform_data *pdata = keypad->pdata; | ||
94 | int i; | ||
95 | |||
96 | for (i = 0; i < pdata->num_row_gpios; i++) | ||
97 | disable_irq_nosync(gpio_to_irq(pdata->row_gpios[i])); | ||
98 | } | ||
99 | |||
100 | /* | ||
101 | * This gets the keys from keyboard and reports it to input subsystem | ||
102 | */ | ||
103 | static void matrix_keypad_scan(struct work_struct *work) | ||
104 | { | ||
105 | struct matrix_keypad *keypad = | ||
106 | container_of(work, struct matrix_keypad, work.work); | ||
107 | struct input_dev *input_dev = keypad->input_dev; | ||
108 | const struct matrix_keypad_platform_data *pdata = keypad->pdata; | ||
109 | uint32_t new_state[MATRIX_MAX_COLS]; | ||
110 | int row, col, code; | ||
111 | |||
112 | /* de-activate all columns for scanning */ | ||
113 | activate_all_cols(pdata, false); | ||
114 | |||
115 | memset(new_state, 0, sizeof(new_state)); | ||
116 | |||
117 | /* assert each column and read the row status out */ | ||
118 | for (col = 0; col < pdata->num_col_gpios; col++) { | ||
119 | |||
120 | activate_col(pdata, col, true); | ||
121 | |||
122 | for (row = 0; row < pdata->num_row_gpios; row++) | ||
123 | new_state[col] |= | ||
124 | row_asserted(pdata, row) ? (1 << row) : 0; | ||
125 | |||
126 | activate_col(pdata, col, false); | ||
127 | } | ||
128 | |||
129 | for (col = 0; col < pdata->num_col_gpios; col++) { | ||
130 | uint32_t bits_changed; | ||
131 | |||
132 | bits_changed = keypad->last_key_state[col] ^ new_state[col]; | ||
133 | if (bits_changed == 0) | ||
134 | continue; | ||
135 | |||
136 | for (row = 0; row < pdata->num_row_gpios; row++) { | ||
137 | if ((bits_changed & (1 << row)) == 0) | ||
138 | continue; | ||
139 | |||
140 | code = MATRIX_SCAN_CODE(row, col, keypad->row_shift); | ||
141 | input_event(input_dev, EV_MSC, MSC_SCAN, code); | ||
142 | input_report_key(input_dev, | ||
143 | keypad->keycodes[code], | ||
144 | new_state[col] & (1 << row)); | ||
145 | } | ||
146 | } | ||
147 | input_sync(input_dev); | ||
148 | |||
149 | memcpy(keypad->last_key_state, new_state, sizeof(new_state)); | ||
150 | |||
151 | activate_all_cols(pdata, true); | ||
152 | |||
153 | /* Enable IRQs again */ | ||
154 | spin_lock_irq(&keypad->lock); | ||
155 | keypad->scan_pending = false; | ||
156 | enable_row_irqs(keypad); | ||
157 | spin_unlock_irq(&keypad->lock); | ||
158 | } | ||
159 | |||
160 | static irqreturn_t matrix_keypad_interrupt(int irq, void *id) | ||
161 | { | ||
162 | struct matrix_keypad *keypad = id; | ||
163 | unsigned long flags; | ||
164 | |||
165 | spin_lock_irqsave(&keypad->lock, flags); | ||
166 | |||
167 | /* | ||
168 | * See if another IRQ beaten us to it and scheduled the | ||
169 | * scan already. In that case we should not try to | ||
170 | * disable IRQs again. | ||
171 | */ | ||
172 | if (unlikely(keypad->scan_pending || keypad->stopped)) | ||
173 | goto out; | ||
174 | |||
175 | disable_row_irqs(keypad); | ||
176 | keypad->scan_pending = true; | ||
177 | schedule_delayed_work(&keypad->work, | ||
178 | msecs_to_jiffies(keypad->pdata->debounce_ms)); | ||
179 | |||
180 | out: | ||
181 | spin_unlock_irqrestore(&keypad->lock, flags); | ||
182 | return IRQ_HANDLED; | ||
183 | } | ||
184 | |||
185 | static int matrix_keypad_start(struct input_dev *dev) | ||
186 | { | ||
187 | struct matrix_keypad *keypad = input_get_drvdata(dev); | ||
188 | |||
189 | keypad->stopped = false; | ||
190 | mb(); | ||
191 | |||
192 | /* | ||
193 | * Schedule an immediate key scan to capture current key state; | ||
194 | * columns will be activated and IRQs be enabled after the scan. | ||
195 | */ | ||
196 | schedule_delayed_work(&keypad->work, 0); | ||
197 | |||
198 | return 0; | ||
199 | } | ||
200 | |||
201 | static void matrix_keypad_stop(struct input_dev *dev) | ||
202 | { | ||
203 | struct matrix_keypad *keypad = input_get_drvdata(dev); | ||
204 | |||
205 | keypad->stopped = true; | ||
206 | mb(); | ||
207 | flush_work(&keypad->work.work); | ||
208 | /* | ||
209 | * matrix_keypad_scan() will leave IRQs enabled; | ||
210 | * we should disable them now. | ||
211 | */ | ||
212 | disable_row_irqs(keypad); | ||
213 | } | ||
214 | |||
215 | #ifdef CONFIG_PM | ||
216 | static int matrix_keypad_suspend(struct platform_device *pdev, pm_message_t state) | ||
217 | { | ||
218 | struct matrix_keypad *keypad = platform_get_drvdata(pdev); | ||
219 | const struct matrix_keypad_platform_data *pdata = keypad->pdata; | ||
220 | int i; | ||
221 | |||
222 | matrix_keypad_stop(keypad->input_dev); | ||
223 | |||
224 | if (device_may_wakeup(&pdev->dev)) | ||
225 | for (i = 0; i < pdata->num_row_gpios; i++) | ||
226 | enable_irq_wake(gpio_to_irq(pdata->row_gpios[i])); | ||
227 | |||
228 | return 0; | ||
229 | } | ||
230 | |||
231 | static int matrix_keypad_resume(struct platform_device *pdev) | ||
232 | { | ||
233 | struct matrix_keypad *keypad = platform_get_drvdata(pdev); | ||
234 | const struct matrix_keypad_platform_data *pdata = keypad->pdata; | ||
235 | int i; | ||
236 | |||
237 | if (device_may_wakeup(&pdev->dev)) | ||
238 | for (i = 0; i < pdata->num_row_gpios; i++) | ||
239 | disable_irq_wake(gpio_to_irq(pdata->row_gpios[i])); | ||
240 | |||
241 | matrix_keypad_start(keypad->input_dev); | ||
242 | |||
243 | return 0; | ||
244 | } | ||
245 | #else | ||
246 | #define matrix_keypad_suspend NULL | ||
247 | #define matrix_keypad_resume NULL | ||
248 | #endif | ||
249 | |||
250 | static int __devinit init_matrix_gpio(struct platform_device *pdev, | ||
251 | struct matrix_keypad *keypad) | ||
252 | { | ||
253 | const struct matrix_keypad_platform_data *pdata = keypad->pdata; | ||
254 | int i, err = -EINVAL; | ||
255 | |||
256 | /* initialized strobe lines as outputs, activated */ | ||
257 | for (i = 0; i < pdata->num_col_gpios; i++) { | ||
258 | err = gpio_request(pdata->col_gpios[i], "matrix_kbd_col"); | ||
259 | if (err) { | ||
260 | dev_err(&pdev->dev, | ||
261 | "failed to request GPIO%d for COL%d\n", | ||
262 | pdata->col_gpios[i], i); | ||
263 | goto err_free_cols; | ||
264 | } | ||
265 | |||
266 | gpio_direction_output(pdata->col_gpios[i], !pdata->active_low); | ||
267 | } | ||
268 | |||
269 | for (i = 0; i < pdata->num_row_gpios; i++) { | ||
270 | err = gpio_request(pdata->row_gpios[i], "matrix_kbd_row"); | ||
271 | if (err) { | ||
272 | dev_err(&pdev->dev, | ||
273 | "failed to request GPIO%d for ROW%d\n", | ||
274 | pdata->row_gpios[i], i); | ||
275 | goto err_free_rows; | ||
276 | } | ||
277 | |||
278 | gpio_direction_input(pdata->row_gpios[i]); | ||
279 | } | ||
280 | |||
281 | for (i = 0; i < pdata->num_row_gpios; i++) { | ||
282 | err = request_irq(gpio_to_irq(pdata->row_gpios[i]), | ||
283 | matrix_keypad_interrupt, | ||
284 | IRQF_DISABLED | | ||
285 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, | ||
286 | "matrix-keypad", keypad); | ||
287 | if (err) { | ||
288 | dev_err(&pdev->dev, | ||
289 | "Unable to acquire interrupt for GPIO line %i\n", | ||
290 | pdata->row_gpios[i]); | ||
291 | goto err_free_irqs; | ||
292 | } | ||
293 | } | ||
294 | |||
295 | /* initialized as disabled - enabled by input->open */ | ||
296 | disable_row_irqs(keypad); | ||
297 | return 0; | ||
298 | |||
299 | err_free_irqs: | ||
300 | while (--i >= 0) | ||
301 | free_irq(gpio_to_irq(pdata->row_gpios[i]), keypad); | ||
302 | i = pdata->num_row_gpios; | ||
303 | err_free_rows: | ||
304 | while (--i >= 0) | ||
305 | gpio_free(pdata->row_gpios[i]); | ||
306 | i = pdata->num_col_gpios; | ||
307 | err_free_cols: | ||
308 | while (--i >= 0) | ||
309 | gpio_free(pdata->col_gpios[i]); | ||
310 | |||
311 | return err; | ||
312 | } | ||
313 | |||
314 | static int __devinit matrix_keypad_probe(struct platform_device *pdev) | ||
315 | { | ||
316 | const struct matrix_keypad_platform_data *pdata; | ||
317 | const struct matrix_keymap_data *keymap_data; | ||
318 | struct matrix_keypad *keypad; | ||
319 | struct input_dev *input_dev; | ||
320 | unsigned short *keycodes; | ||
321 | unsigned int row_shift; | ||
322 | int i; | ||
323 | int err; | ||
324 | |||
325 | pdata = pdev->dev.platform_data; | ||
326 | if (!pdata) { | ||
327 | dev_err(&pdev->dev, "no platform data defined\n"); | ||
328 | return -EINVAL; | ||
329 | } | ||
330 | |||
331 | keymap_data = pdata->keymap_data; | ||
332 | if (!keymap_data) { | ||
333 | dev_err(&pdev->dev, "no keymap data defined\n"); | ||
334 | return -EINVAL; | ||
335 | } | ||
336 | |||
337 | row_shift = get_count_order(pdata->num_col_gpios); | ||
338 | |||
339 | keypad = kzalloc(sizeof(struct matrix_keypad), GFP_KERNEL); | ||
340 | keycodes = kzalloc((pdata->num_row_gpios << row_shift) * | ||
341 | sizeof(*keycodes), | ||
342 | GFP_KERNEL); | ||
343 | input_dev = input_allocate_device(); | ||
344 | if (!keypad || !keycodes || !input_dev) { | ||
345 | err = -ENOMEM; | ||
346 | goto err_free_mem; | ||
347 | } | ||
348 | |||
349 | keypad->input_dev = input_dev; | ||
350 | keypad->pdata = pdata; | ||
351 | keypad->keycodes = keycodes; | ||
352 | keypad->row_shift = row_shift; | ||
353 | keypad->stopped = true; | ||
354 | INIT_DELAYED_WORK(&keypad->work, matrix_keypad_scan); | ||
355 | spin_lock_init(&keypad->lock); | ||
356 | |||
357 | input_dev->name = pdev->name; | ||
358 | input_dev->id.bustype = BUS_HOST; | ||
359 | input_dev->dev.parent = &pdev->dev; | ||
360 | input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP); | ||
361 | input_dev->open = matrix_keypad_start; | ||
362 | input_dev->close = matrix_keypad_stop; | ||
363 | |||
364 | input_dev->keycode = keycodes; | ||
365 | input_dev->keycodesize = sizeof(*keycodes); | ||
366 | input_dev->keycodemax = pdata->num_row_gpios << keypad->row_shift; | ||
367 | |||
368 | for (i = 0; i < keymap_data->keymap_size; i++) { | ||
369 | unsigned int key = keymap_data->keymap[i]; | ||
370 | unsigned int row = KEY_ROW(key); | ||
371 | unsigned int col = KEY_COL(key); | ||
372 | unsigned short code = KEY_VAL(key); | ||
373 | |||
374 | keycodes[MATRIX_SCAN_CODE(row, col, row_shift)] = code; | ||
375 | __set_bit(code, input_dev->keybit); | ||
376 | } | ||
377 | __clear_bit(KEY_RESERVED, input_dev->keybit); | ||
378 | |||
379 | input_set_capability(input_dev, EV_MSC, MSC_SCAN); | ||
380 | input_set_drvdata(input_dev, keypad); | ||
381 | |||
382 | err = init_matrix_gpio(pdev, keypad); | ||
383 | if (err) | ||
384 | goto err_free_mem; | ||
385 | |||
386 | err = input_register_device(keypad->input_dev); | ||
387 | if (err) | ||
388 | goto err_free_mem; | ||
389 | |||
390 | device_init_wakeup(&pdev->dev, pdata->wakeup); | ||
391 | platform_set_drvdata(pdev, keypad); | ||
392 | |||
393 | return 0; | ||
394 | |||
395 | err_free_mem: | ||
396 | input_free_device(input_dev); | ||
397 | kfree(keycodes); | ||
398 | kfree(keypad); | ||
399 | return err; | ||
400 | } | ||
401 | |||
402 | static int __devexit matrix_keypad_remove(struct platform_device *pdev) | ||
403 | { | ||
404 | struct matrix_keypad *keypad = platform_get_drvdata(pdev); | ||
405 | const struct matrix_keypad_platform_data *pdata = keypad->pdata; | ||
406 | int i; | ||
407 | |||
408 | device_init_wakeup(&pdev->dev, 0); | ||
409 | |||
410 | for (i = 0; i < pdata->num_row_gpios; i++) { | ||
411 | free_irq(gpio_to_irq(pdata->row_gpios[i]), keypad); | ||
412 | gpio_free(pdata->row_gpios[i]); | ||
413 | } | ||
414 | |||
415 | for (i = 0; i < pdata->num_col_gpios; i++) | ||
416 | gpio_free(pdata->col_gpios[i]); | ||
417 | |||
418 | input_unregister_device(keypad->input_dev); | ||
419 | platform_set_drvdata(pdev, NULL); | ||
420 | kfree(keypad->keycodes); | ||
421 | kfree(keypad); | ||
422 | |||
423 | return 0; | ||
424 | } | ||
425 | |||
426 | static struct platform_driver matrix_keypad_driver = { | ||
427 | .probe = matrix_keypad_probe, | ||
428 | .remove = __devexit_p(matrix_keypad_remove), | ||
429 | .suspend = matrix_keypad_suspend, | ||
430 | .resume = matrix_keypad_resume, | ||
431 | .driver = { | ||
432 | .name = "matrix-keypad", | ||
433 | .owner = THIS_MODULE, | ||
434 | }, | ||
435 | }; | ||
436 | |||
437 | static int __init matrix_keypad_init(void) | ||
438 | { | ||
439 | return platform_driver_register(&matrix_keypad_driver); | ||
440 | } | ||
441 | |||
442 | static void __exit matrix_keypad_exit(void) | ||
443 | { | ||
444 | platform_driver_unregister(&matrix_keypad_driver); | ||
445 | } | ||
446 | |||
447 | module_init(matrix_keypad_init); | ||
448 | module_exit(matrix_keypad_exit); | ||
449 | |||
450 | MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>"); | ||
451 | MODULE_DESCRIPTION("GPIO Driven Matrix Keypad Driver"); | ||
452 | MODULE_LICENSE("GPL v2"); | ||
453 | MODULE_ALIAS("platform:matrix-keypad"); | ||
diff --git a/drivers/input/misc/pcspkr.c b/drivers/input/misc/pcspkr.c index 6d67af5387ad..21cb755a54fb 100644 --- a/drivers/input/misc/pcspkr.c +++ b/drivers/input/misc/pcspkr.c | |||
@@ -114,7 +114,7 @@ static int __devexit pcspkr_remove(struct platform_device *dev) | |||
114 | return 0; | 114 | return 0; |
115 | } | 115 | } |
116 | 116 | ||
117 | static int pcspkr_suspend(struct platform_device *dev, pm_message_t state) | 117 | static int pcspkr_suspend(struct device *dev) |
118 | { | 118 | { |
119 | pcspkr_event(NULL, EV_SND, SND_BELL, 0); | 119 | pcspkr_event(NULL, EV_SND, SND_BELL, 0); |
120 | 120 | ||
@@ -127,14 +127,18 @@ static void pcspkr_shutdown(struct platform_device *dev) | |||
127 | pcspkr_event(NULL, EV_SND, SND_BELL, 0); | 127 | pcspkr_event(NULL, EV_SND, SND_BELL, 0); |
128 | } | 128 | } |
129 | 129 | ||
130 | static struct dev_pm_ops pcspkr_pm_ops = { | ||
131 | .suspend = pcspkr_suspend, | ||
132 | }; | ||
133 | |||
130 | static struct platform_driver pcspkr_platform_driver = { | 134 | static struct platform_driver pcspkr_platform_driver = { |
131 | .driver = { | 135 | .driver = { |
132 | .name = "pcspkr", | 136 | .name = "pcspkr", |
133 | .owner = THIS_MODULE, | 137 | .owner = THIS_MODULE, |
138 | .pm = &pcspkr_pm_ops, | ||
134 | }, | 139 | }, |
135 | .probe = pcspkr_probe, | 140 | .probe = pcspkr_probe, |
136 | .remove = __devexit_p(pcspkr_remove), | 141 | .remove = __devexit_p(pcspkr_remove), |
137 | .suspend = pcspkr_suspend, | ||
138 | .shutdown = pcspkr_shutdown, | 142 | .shutdown = pcspkr_shutdown, |
139 | }; | 143 | }; |
140 | 144 | ||
diff --git a/drivers/input/misc/wistron_btns.c b/drivers/input/misc/wistron_btns.c index 7c8957dd22c0..27ee976eb54c 100644 --- a/drivers/input/misc/wistron_btns.c +++ b/drivers/input/misc/wistron_btns.c | |||
@@ -611,6 +611,20 @@ static struct key_entry keymap_wistron_generic[] __initdata = { | |||
611 | { KE_END, 0 } | 611 | { KE_END, 0 } |
612 | }; | 612 | }; |
613 | 613 | ||
614 | static struct key_entry keymap_prestigio[] __initdata = { | ||
615 | { KE_KEY, 0x11, {KEY_PROG1} }, | ||
616 | { KE_KEY, 0x12, {KEY_PROG2} }, | ||
617 | { KE_WIFI, 0x30 }, | ||
618 | { KE_KEY, 0x22, {KEY_REWIND} }, | ||
619 | { KE_KEY, 0x23, {KEY_FORWARD} }, | ||
620 | { KE_KEY, 0x24, {KEY_PLAYPAUSE} }, | ||
621 | { KE_KEY, 0x25, {KEY_STOPCD} }, | ||
622 | { KE_KEY, 0x31, {KEY_MAIL} }, | ||
623 | { KE_KEY, 0x36, {KEY_WWW} }, | ||
624 | { KE_END, 0 } | ||
625 | }; | ||
626 | |||
627 | |||
614 | /* | 628 | /* |
615 | * If your machine is not here (which is currently rather likely), please send | 629 | * If your machine is not here (which is currently rather likely), please send |
616 | * a list of buttons and their key codes (reported when loading this module | 630 | * a list of buttons and their key codes (reported when loading this module |
@@ -646,6 +660,15 @@ static struct dmi_system_id dmi_ids[] __initdata = { | |||
646 | }, | 660 | }, |
647 | { | 661 | { |
648 | .callback = dmi_matched, | 662 | .callback = dmi_matched, |
663 | .ident = "Maxdata Pro 7000 DX", | ||
664 | .matches = { | ||
665 | DMI_MATCH(DMI_SYS_VENDOR, "MAXDATA"), | ||
666 | DMI_MATCH(DMI_PRODUCT_NAME, "Pro 7000"), | ||
667 | }, | ||
668 | .driver_data = keymap_fs_amilo_pro_v2000 | ||
669 | }, | ||
670 | { | ||
671 | .callback = dmi_matched, | ||
649 | .ident = "Fujitsu N3510", | 672 | .ident = "Fujitsu N3510", |
650 | .matches = { | 673 | .matches = { |
651 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), | 674 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), |
@@ -962,6 +985,8 @@ static int __init select_keymap(void) | |||
962 | if (keymap_name != NULL) { | 985 | if (keymap_name != NULL) { |
963 | if (strcmp (keymap_name, "1557/MS2141") == 0) | 986 | if (strcmp (keymap_name, "1557/MS2141") == 0) |
964 | keymap = keymap_wistron_ms2141; | 987 | keymap = keymap_wistron_ms2141; |
988 | else if (strcmp (keymap_name, "prestigio") == 0) | ||
989 | keymap = keymap_prestigio; | ||
965 | else if (strcmp (keymap_name, "generic") == 0) | 990 | else if (strcmp (keymap_name, "generic") == 0) |
966 | keymap = keymap_wistron_generic; | 991 | keymap = keymap_wistron_generic; |
967 | else { | 992 | else { |
diff --git a/drivers/input/mouse/gpio_mouse.c b/drivers/input/mouse/gpio_mouse.c index 5e5eb88d8d1e..7b6ce178f1b6 100644 --- a/drivers/input/mouse/gpio_mouse.c +++ b/drivers/input/mouse/gpio_mouse.c | |||
@@ -46,7 +46,7 @@ static void gpio_mouse_scan(struct input_polled_dev *dev) | |||
46 | input_sync(input); | 46 | input_sync(input); |
47 | } | 47 | } |
48 | 48 | ||
49 | static int __init gpio_mouse_probe(struct platform_device *pdev) | 49 | static int __devinit gpio_mouse_probe(struct platform_device *pdev) |
50 | { | 50 | { |
51 | struct gpio_mouse_platform_data *pdata = pdev->dev.platform_data; | 51 | struct gpio_mouse_platform_data *pdata = pdev->dev.platform_data; |
52 | struct input_polled_dev *input_poll; | 52 | struct input_polled_dev *input_poll; |
@@ -170,10 +170,8 @@ static int __devexit gpio_mouse_remove(struct platform_device *pdev) | |||
170 | return 0; | 170 | return 0; |
171 | } | 171 | } |
172 | 172 | ||
173 | /* work with hotplug and coldplug */ | ||
174 | MODULE_ALIAS("platform:gpio_mouse"); | ||
175 | |||
176 | static struct platform_driver gpio_mouse_device_driver = { | 173 | static struct platform_driver gpio_mouse_device_driver = { |
174 | .probe = gpio_mouse_probe, | ||
177 | .remove = __devexit_p(gpio_mouse_remove), | 175 | .remove = __devexit_p(gpio_mouse_remove), |
178 | .driver = { | 176 | .driver = { |
179 | .name = "gpio_mouse", | 177 | .name = "gpio_mouse", |
@@ -183,8 +181,7 @@ static struct platform_driver gpio_mouse_device_driver = { | |||
183 | 181 | ||
184 | static int __init gpio_mouse_init(void) | 182 | static int __init gpio_mouse_init(void) |
185 | { | 183 | { |
186 | return platform_driver_probe(&gpio_mouse_device_driver, | 184 | return platform_driver_register(&gpio_mouse_device_driver); |
187 | gpio_mouse_probe); | ||
188 | } | 185 | } |
189 | module_init(gpio_mouse_init); | 186 | module_init(gpio_mouse_init); |
190 | 187 | ||
@@ -197,3 +194,5 @@ module_exit(gpio_mouse_exit); | |||
197 | MODULE_AUTHOR("Hans-Christian Egtvedt <hcegtvedt@atmel.com>"); | 194 | MODULE_AUTHOR("Hans-Christian Egtvedt <hcegtvedt@atmel.com>"); |
198 | MODULE_DESCRIPTION("GPIO mouse driver"); | 195 | MODULE_DESCRIPTION("GPIO mouse driver"); |
199 | MODULE_LICENSE("GPL"); | 196 | MODULE_LICENSE("GPL"); |
197 | MODULE_ALIAS("platform:gpio_mouse"); /* work with hotplug and coldplug */ | ||
198 | |||
diff --git a/drivers/input/serio/hp_sdc_mlc.c b/drivers/input/serio/hp_sdc_mlc.c index b587e2d576ac..820e51673b26 100644 --- a/drivers/input/serio/hp_sdc_mlc.c +++ b/drivers/input/serio/hp_sdc_mlc.c | |||
@@ -296,7 +296,7 @@ static void hp_sdc_mlc_out(hil_mlc *mlc) | |||
296 | priv->tseq[3] = 0; | 296 | priv->tseq[3] = 0; |
297 | if (mlc->opacket & HIL_CTRL_APE) { | 297 | if (mlc->opacket & HIL_CTRL_APE) { |
298 | priv->tseq[3] |= HP_SDC_LPC_APE_IPF; | 298 | priv->tseq[3] |= HP_SDC_LPC_APE_IPF; |
299 | down_trylock(&mlc->csem); | 299 | BUG_ON(down_trylock(&mlc->csem)); |
300 | } | 300 | } |
301 | enqueue: | 301 | enqueue: |
302 | hp_sdc_enqueue_transaction(&priv->trans); | 302 | hp_sdc_enqueue_transaction(&priv->trans); |
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index fb8a3cd3ffd0..ae04d8a494e5 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h | |||
@@ -78,6 +78,14 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = { | |||
78 | }, | 78 | }, |
79 | }, | 79 | }, |
80 | { | 80 | { |
81 | .ident = "ASUS G1S", | ||
82 | .matches = { | ||
83 | DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer Inc."), | ||
84 | DMI_MATCH(DMI_BOARD_NAME, "G1S"), | ||
85 | DMI_MATCH(DMI_BOARD_VERSION, "1.0"), | ||
86 | }, | ||
87 | }, | ||
88 | { | ||
81 | /* AUX LOOP command does not raise AUX IRQ */ | 89 | /* AUX LOOP command does not raise AUX IRQ */ |
82 | .ident = "ASUS P65UP5", | 90 | .ident = "ASUS P65UP5", |
83 | .matches = { | 91 | .matches = { |
@@ -392,6 +400,34 @@ static struct dmi_system_id __initdata i8042_dmi_reset_table[] = { | |||
392 | DMI_MATCH(DMI_BOARD_VENDOR, "LG Electronics Inc."), | 400 | DMI_MATCH(DMI_BOARD_VENDOR, "LG Electronics Inc."), |
393 | }, | 401 | }, |
394 | }, | 402 | }, |
403 | { | ||
404 | .ident = "Acer Aspire One 150", | ||
405 | .matches = { | ||
406 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | ||
407 | DMI_MATCH(DMI_PRODUCT_NAME, "AOA150"), | ||
408 | }, | ||
409 | }, | ||
410 | { | ||
411 | .ident = "Advent 4211", | ||
412 | .matches = { | ||
413 | DMI_MATCH(DMI_SYS_VENDOR, "DIXONSXP"), | ||
414 | DMI_MATCH(DMI_PRODUCT_NAME, "Advent 4211"), | ||
415 | }, | ||
416 | }, | ||
417 | { | ||
418 | .ident = "Medion Akoya Mini E1210", | ||
419 | .matches = { | ||
420 | DMI_MATCH(DMI_SYS_VENDOR, "MEDION"), | ||
421 | DMI_MATCH(DMI_PRODUCT_NAME, "E1210"), | ||
422 | }, | ||
423 | }, | ||
424 | { | ||
425 | .ident = "Mivvy M310", | ||
426 | .matches = { | ||
427 | DMI_MATCH(DMI_SYS_VENDOR, "VIOOO"), | ||
428 | DMI_MATCH(DMI_PRODUCT_NAME, "N10"), | ||
429 | }, | ||
430 | }, | ||
395 | { } | 431 | { } |
396 | }; | 432 | }; |
397 | 433 | ||
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index f919bf57293c..582245c497eb 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c | |||
@@ -934,10 +934,11 @@ static bool i8042_suspended; | |||
934 | 934 | ||
935 | static int i8042_suspend(struct platform_device *dev, pm_message_t state) | 935 | static int i8042_suspend(struct platform_device *dev, pm_message_t state) |
936 | { | 936 | { |
937 | if (!i8042_suspended && state.event == PM_EVENT_SUSPEND) { | 937 | if (!i8042_suspended && state.event == PM_EVENT_SUSPEND) |
938 | i8042_controller_reset(); | 938 | i8042_controller_reset(); |
939 | i8042_suspended = true; | 939 | |
940 | } | 940 | i8042_suspended = state.event == PM_EVENT_SUSPEND || |
941 | state.event == PM_EVENT_FREEZE; | ||
941 | 942 | ||
942 | return 0; | 943 | return 0; |
943 | } | 944 | } |
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c index fb17573f8f2d..d66f4944f2a0 100644 --- a/drivers/input/serio/serio.c +++ b/drivers/input/serio/serio.c | |||
@@ -935,10 +935,11 @@ static int serio_suspend(struct device *dev, pm_message_t state) | |||
935 | { | 935 | { |
936 | struct serio *serio = to_serio_port(dev); | 936 | struct serio *serio = to_serio_port(dev); |
937 | 937 | ||
938 | if (!serio->suspended && state.event == PM_EVENT_SUSPEND) { | 938 | if (!serio->suspended && state.event == PM_EVENT_SUSPEND) |
939 | serio_cleanup(serio); | 939 | serio_cleanup(serio); |
940 | serio->suspended = true; | 940 | |
941 | } | 941 | serio->suspended = state.event == PM_EVENT_SUSPEND || |
942 | state.event == PM_EVENT_FREEZE; | ||
942 | 943 | ||
943 | return 0; | 944 | return 0; |
944 | } | 945 | } |
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index 38bf86384aeb..c896d6a21b7e 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c | |||
@@ -384,6 +384,8 @@ static int wacom_intuos_inout(struct wacom_wac *wacom, void *wcombo) | |||
384 | wacom_report_key(wcombo, BTN_STYLUS2, 0); | 384 | wacom_report_key(wcombo, BTN_STYLUS2, 0); |
385 | wacom_report_key(wcombo, BTN_TOUCH, 0); | 385 | wacom_report_key(wcombo, BTN_TOUCH, 0); |
386 | wacom_report_abs(wcombo, ABS_WHEEL, 0); | 386 | wacom_report_abs(wcombo, ABS_WHEEL, 0); |
387 | if (wacom->features->type >= INTUOS3S) | ||
388 | wacom_report_abs(wcombo, ABS_Z, 0); | ||
387 | } | 389 | } |
388 | wacom_report_key(wcombo, wacom->tool[idx], 0); | 390 | wacom_report_key(wcombo, wacom->tool[idx], 0); |
389 | wacom_report_abs(wcombo, ABS_MISC, 0); /* reset tool id */ | 391 | wacom_report_abs(wcombo, ABS_MISC, 0); /* reset tool id */ |
@@ -836,6 +838,7 @@ static struct wacom_features wacom_features[] = { | |||
836 | { "Wacom DTU710", 8, 34080, 27660, 511, 0, PL }, | 838 | { "Wacom DTU710", 8, 34080, 27660, 511, 0, PL }, |
837 | { "Wacom DTF521", 8, 6282, 4762, 511, 0, PL }, | 839 | { "Wacom DTF521", 8, 6282, 4762, 511, 0, PL }, |
838 | { "Wacom DTF720", 8, 6858, 5506, 511, 0, PL }, | 840 | { "Wacom DTF720", 8, 6858, 5506, 511, 0, PL }, |
841 | { "Wacom DTF720a", 8, 6858, 5506, 511, 0, PL }, | ||
839 | { "Wacom Cintiq Partner",8, 20480, 15360, 511, 0, PTU }, | 842 | { "Wacom Cintiq Partner",8, 20480, 15360, 511, 0, PTU }, |
840 | { "Wacom Intuos2 4x5", 10, 12700, 10600, 1023, 31, INTUOS }, | 843 | { "Wacom Intuos2 4x5", 10, 12700, 10600, 1023, 31, INTUOS }, |
841 | { "Wacom Intuos2 6x8", 10, 20320, 16240, 1023, 31, INTUOS }, | 844 | { "Wacom Intuos2 6x8", 10, 20320, 16240, 1023, 31, INTUOS }, |
@@ -897,8 +900,9 @@ static struct usb_device_id wacom_ids[] = { | |||
897 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x37) }, | 900 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x37) }, |
898 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x38) }, | 901 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x38) }, |
899 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x39) }, | 902 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x39) }, |
900 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC0) }, | ||
901 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC4) }, | 903 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC4) }, |
904 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC0) }, | ||
905 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC2) }, | ||
902 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x03) }, | 906 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x03) }, |
903 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x41) }, | 907 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x41) }, |
904 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x42) }, | 908 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x42) }, |