aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-07-08 12:32:41 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-07-08 12:32:41 -0400
commit5e75c5f5d723074b1ceefe916c3005888e431d12 (patch)
treed929d72d9e4f0abcd74cd65922b35123cd3455d5 /drivers
parentd6d4655172f9c5b9402bb453ed9145a7ab5c46d0 (diff)
parenteeafa5ef6de5acf678624a21f7dba7d43ba73845 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: gpio_mouse - use standard driver registration method Input: mark serio and i8042 as suspended when hibernating too Input: add support for generic GPIO-based matrix keypad Input: arrange keyboards alphabetically Input: gpio-keys - avoid possibility of sleeping in timer function Input: gpio-keys - revert 'change timer to workqueue' Input: dm355evm_keys - fix kconfig symbol names Input: wacom - add DTF720a support and fix rotation on Intuos3 Input: i8042 - more reset quirks for MSI Wind-clone netbooks
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/keyboard/Kconfig294
-rw-r--r--drivers/input/keyboard/Makefile33
-rw-r--r--drivers/input/keyboard/gpio_keys.c33
-rw-r--r--drivers/input/keyboard/matrix_keypad.c453
-rw-r--r--drivers/input/mouse/gpio_mouse.c11
-rw-r--r--drivers/input/serio/i8042-x86ia64io.h28
-rw-r--r--drivers/input/serio/i8042.c7
-rw-r--r--drivers/input/serio/serio.c7
-rw-r--r--drivers/input/tablet/wacom_wac.c6
-rw-r--r--drivers/mfd/dm355evm_msp.c3
10 files changed, 692 insertions, 183 deletions
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
13if INPUT_KEYBOARD 13if INPUT_KEYBOARD
14 14
15config 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
27config 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
37config ATARI_KBD_CORE
38 bool
39
40config 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
15config KEYBOARD_ATKBD 51config 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
71config KEYBOARD_SUNKBD 107config 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
82config 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
94config 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
103config 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
115config 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
124config 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
135config KEYBOARD_CORGI 116config 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
146config KEYBOARD_SPITZ 127config 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
157config KEYBOARD_TOSA 139config 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
167config KEYBOARD_TOSA_USE_EXT_KEYCODES 148config 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
178config 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
188config ATARI_KBD_CORE 163config KEYBOARD_MATRIX
189 bool 164 tristate "GPIO driven matrix keypad support"
190 165 depends on GENERIC_GPIO
191config 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
202config KEYBOARD_HIL_OLD 172config 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
264config KEYBOARD_OMAP 234config 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
243config 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
253config 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
273config KEYBOARD_PXA27x 262config 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
291config KEYBOARD_AAED2000 280config 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
303config 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
318config KEYBOARD_MAPLE 291config 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
328config KEYBOARD_BFIN 302config 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
337config KEYBOARD_SH_KEYSC 313config 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
347config KEYBOARD_EP93XX 323config 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
332config 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
342config 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
352config 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
356endif 364endif
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
7obj-$(CONFIG_KEYBOARD_ATKBD) += atkbd.o 7obj-$(CONFIG_KEYBOARD_AAED2000) += aaed2000_kbd.o
8obj-$(CONFIG_KEYBOARD_SUNKBD) += sunkbd.o
9obj-$(CONFIG_KEYBOARD_LKKBD) += lkkbd.o
10obj-$(CONFIG_KEYBOARD_XTKBD) += xtkbd.o
11obj-$(CONFIG_KEYBOARD_AMIGA) += amikbd.o 8obj-$(CONFIG_KEYBOARD_AMIGA) += amikbd.o
12obj-$(CONFIG_KEYBOARD_ATARI) += atakbd.o 9obj-$(CONFIG_KEYBOARD_ATARI) += atakbd.o
13obj-$(CONFIG_KEYBOARD_LOCOMO) += locomokbd.o 10obj-$(CONFIG_KEYBOARD_ATKBD) += atkbd.o
14obj-$(CONFIG_KEYBOARD_NEWTON) += newtonkbd.o 11obj-$(CONFIG_KEYBOARD_BFIN) += bf54x-keys.o
15obj-$(CONFIG_KEYBOARD_STOWAWAY) += stowaway.o
16obj-$(CONFIG_KEYBOARD_CORGI) += corgikbd.o 12obj-$(CONFIG_KEYBOARD_CORGI) += corgikbd.o
17obj-$(CONFIG_KEYBOARD_SPITZ) += spitzkbd.o 13obj-$(CONFIG_KEYBOARD_EP93XX) += ep93xx_keypad.o
18obj-$(CONFIG_KEYBOARD_TOSA) += tosakbd.o 14obj-$(CONFIG_KEYBOARD_GPIO) += gpio_keys.o
19obj-$(CONFIG_KEYBOARD_HIL) += hil_kbd.o 15obj-$(CONFIG_KEYBOARD_HIL) += hil_kbd.o
20obj-$(CONFIG_KEYBOARD_HIL_OLD) += hilkbd.o 16obj-$(CONFIG_KEYBOARD_HIL_OLD) += hilkbd.o
17obj-$(CONFIG_KEYBOARD_HP6XX) += jornada680_kbd.o
18obj-$(CONFIG_KEYBOARD_HP7XX) += jornada720_kbd.o
19obj-$(CONFIG_KEYBOARD_LKKBD) += lkkbd.o
21obj-$(CONFIG_KEYBOARD_LM8323) += lm8323.o 20obj-$(CONFIG_KEYBOARD_LM8323) += lm8323.o
21obj-$(CONFIG_KEYBOARD_LOCOMO) += locomokbd.o
22obj-$(CONFIG_KEYBOARD_MAPLE) += maple_keyb.o
23obj-$(CONFIG_KEYBOARD_MATRIX) += matrix_keypad.o
24obj-$(CONFIG_KEYBOARD_NEWTON) += newtonkbd.o
22obj-$(CONFIG_KEYBOARD_OMAP) += omap-keypad.o 25obj-$(CONFIG_KEYBOARD_OMAP) += omap-keypad.o
23obj-$(CONFIG_KEYBOARD_PXA27x) += pxa27x_keypad.o 26obj-$(CONFIG_KEYBOARD_PXA27x) += pxa27x_keypad.o
24obj-$(CONFIG_KEYBOARD_PXA930_ROTARY) += pxa930_rotary.o 27obj-$(CONFIG_KEYBOARD_PXA930_ROTARY) += pxa930_rotary.o
25obj-$(CONFIG_KEYBOARD_AAED2000) += aaed2000_kbd.o
26obj-$(CONFIG_KEYBOARD_GPIO) += gpio_keys.o
27obj-$(CONFIG_KEYBOARD_HP6XX) += jornada680_kbd.o
28obj-$(CONFIG_KEYBOARD_HP7XX) += jornada720_kbd.o
29obj-$(CONFIG_KEYBOARD_MAPLE) += maple_keyb.o
30obj-$(CONFIG_KEYBOARD_BFIN) += bf54x-keys.o
31obj-$(CONFIG_KEYBOARD_SH_KEYSC) += sh_keysc.o 28obj-$(CONFIG_KEYBOARD_SH_KEYSC) += sh_keysc.o
32obj-$(CONFIG_KEYBOARD_EP93XX) += ep93xx_keypad.o 29obj-$(CONFIG_KEYBOARD_SPITZ) += spitzkbd.o
30obj-$(CONFIG_KEYBOARD_STOWAWAY) += stowaway.o
31obj-$(CONFIG_KEYBOARD_SUNKBD) += sunkbd.o
32obj-$(CONFIG_KEYBOARD_TOSA) += tosakbd.o
33obj-$(CONFIG_KEYBOARD_XTKBD) += xtkbd.o
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 @@
29struct gpio_button_data { 29struct 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
35struct gpio_keys_drvdata { 36struct gpio_keys_drvdata {
@@ -40,7 +41,7 @@ struct gpio_keys_drvdata {
40static void gpio_keys_report_event(struct work_struct *work) 41static 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
54static 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
53static irqreturn_t gpio_keys_isr(int irq, void *dev_id) 61static 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..e9b2e7cb05be
--- /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
26struct matrix_keypad {
27 const struct matrix_keypad_platform_data *pdata;
28 struct input_dev *input_dev;
29 unsigned short *keycodes;
30
31 uint32_t last_key_state[MATRIX_MAX_COLS];
32 struct delayed_work work;
33 bool scan_pending;
34 bool stopped;
35 spinlock_t lock;
36};
37
38/*
39 * NOTE: normally the GPIO has to be put into HiZ when de-activated to cause
40 * minmal side effect when scanning other columns, here it is configured to
41 * be input, and it should work on most platforms.
42 */
43static void __activate_col(const struct matrix_keypad_platform_data *pdata,
44 int col, bool on)
45{
46 bool level_on = !pdata->active_low;
47
48 if (on) {
49 gpio_direction_output(pdata->col_gpios[col], level_on);
50 } else {
51 gpio_set_value_cansleep(pdata->col_gpios[col], !level_on);
52 gpio_direction_input(pdata->col_gpios[col]);
53 }
54}
55
56static void activate_col(const struct matrix_keypad_platform_data *pdata,
57 int col, bool on)
58{
59 __activate_col(pdata, col, on);
60
61 if (on && pdata->col_scan_delay_us)
62 udelay(pdata->col_scan_delay_us);
63}
64
65static void activate_all_cols(const struct matrix_keypad_platform_data *pdata,
66 bool on)
67{
68 int col;
69
70 for (col = 0; col < pdata->num_col_gpios; col++)
71 __activate_col(pdata, col, on);
72}
73
74static bool row_asserted(const struct matrix_keypad_platform_data *pdata,
75 int row)
76{
77 return gpio_get_value_cansleep(pdata->row_gpios[row]) ?
78 !pdata->active_low : pdata->active_low;
79}
80
81static void enable_row_irqs(struct matrix_keypad *keypad)
82{
83 const struct matrix_keypad_platform_data *pdata = keypad->pdata;
84 int i;
85
86 for (i = 0; i < pdata->num_row_gpios; i++)
87 enable_irq(gpio_to_irq(pdata->row_gpios[i]));
88}
89
90static void disable_row_irqs(struct matrix_keypad *keypad)
91{
92 const struct matrix_keypad_platform_data *pdata = keypad->pdata;
93 int i;
94
95 for (i = 0; i < pdata->num_row_gpios; i++)
96 disable_irq_nosync(gpio_to_irq(pdata->row_gpios[i]));
97}
98
99/*
100 * This gets the keys from keyboard and reports it to input subsystem
101 */
102static void matrix_keypad_scan(struct work_struct *work)
103{
104 struct matrix_keypad *keypad =
105 container_of(work, struct matrix_keypad, work.work);
106 struct input_dev *input_dev = keypad->input_dev;
107 const struct matrix_keypad_platform_data *pdata = keypad->pdata;
108 uint32_t new_state[MATRIX_MAX_COLS];
109 int row, col, code;
110
111 /* de-activate all columns for scanning */
112 activate_all_cols(pdata, false);
113
114 memset(new_state, 0, sizeof(new_state));
115
116 /* assert each column and read the row status out */
117 for (col = 0; col < pdata->num_col_gpios; col++) {
118
119 activate_col(pdata, col, true);
120
121 for (row = 0; row < pdata->num_row_gpios; row++)
122 new_state[col] |=
123 row_asserted(pdata, row) ? (1 << row) : 0;
124
125 activate_col(pdata, col, false);
126 }
127
128 for (col = 0; col < pdata->num_col_gpios; col++) {
129 uint32_t bits_changed;
130
131 bits_changed = keypad->last_key_state[col] ^ new_state[col];
132 if (bits_changed == 0)
133 continue;
134
135 for (row = 0; row < pdata->num_row_gpios; row++) {
136 if ((bits_changed & (1 << row)) == 0)
137 continue;
138
139 code = (row << 4) + col;
140 input_event(input_dev, EV_MSC, MSC_SCAN, code);
141 input_report_key(input_dev,
142 keypad->keycodes[code],
143 new_state[col] & (1 << row));
144 }
145 }
146 input_sync(input_dev);
147
148 memcpy(keypad->last_key_state, new_state, sizeof(new_state));
149
150 activate_all_cols(pdata, true);
151
152 /* Enable IRQs again */
153 spin_lock_irq(&keypad->lock);
154 keypad->scan_pending = false;
155 enable_row_irqs(keypad);
156 spin_unlock_irq(&keypad->lock);
157}
158
159static irqreturn_t matrix_keypad_interrupt(int irq, void *id)
160{
161 struct matrix_keypad *keypad = id;
162 unsigned long flags;
163
164 spin_lock_irqsave(&keypad->lock, flags);
165
166 /*
167 * See if another IRQ beaten us to it and scheduled the
168 * scan already. In that case we should not try to
169 * disable IRQs again.
170 */
171 if (unlikely(keypad->scan_pending || keypad->stopped))
172 goto out;
173
174 disable_row_irqs(keypad);
175 keypad->scan_pending = true;
176 schedule_delayed_work(&keypad->work,
177 msecs_to_jiffies(keypad->pdata->debounce_ms));
178
179out:
180 spin_unlock_irqrestore(&keypad->lock, flags);
181 return IRQ_HANDLED;
182}
183
184static int matrix_keypad_start(struct input_dev *dev)
185{
186 struct matrix_keypad *keypad = input_get_drvdata(dev);
187
188 keypad->stopped = false;
189 mb();
190
191 /*
192 * Schedule an immediate key scan to capture current key state;
193 * columns will be activated and IRQs be enabled after the scan.
194 */
195 schedule_delayed_work(&keypad->work, 0);
196
197 return 0;
198}
199
200static void matrix_keypad_stop(struct input_dev *dev)
201{
202 struct matrix_keypad *keypad = input_get_drvdata(dev);
203
204 keypad->stopped = true;
205 mb();
206 flush_work(&keypad->work.work);
207 /*
208 * matrix_keypad_scan() will leave IRQs enabled;
209 * we should disable them now.
210 */
211 disable_row_irqs(keypad);
212}
213
214#ifdef CONFIG_PM
215static int matrix_keypad_suspend(struct platform_device *pdev, pm_message_t state)
216{
217 struct matrix_keypad *keypad = platform_get_drvdata(pdev);
218 const struct matrix_keypad_platform_data *pdata = keypad->pdata;
219 int i;
220
221 matrix_keypad_stop(keypad->input_dev);
222
223 if (device_may_wakeup(&pdev->dev))
224 for (i = 0; i < pdata->num_row_gpios; i++)
225 enable_irq_wake(gpio_to_irq(pdata->row_gpios[i]));
226
227 return 0;
228}
229
230static int matrix_keypad_resume(struct platform_device *pdev)
231{
232 struct matrix_keypad *keypad = platform_get_drvdata(pdev);
233 const struct matrix_keypad_platform_data *pdata = keypad->pdata;
234 int i;
235
236 if (device_may_wakeup(&pdev->dev))
237 for (i = 0; i < pdata->num_row_gpios; i++)
238 disable_irq_wake(gpio_to_irq(pdata->row_gpios[i]));
239
240 matrix_keypad_start(keypad->input_dev);
241
242 return 0;
243}
244#else
245#define matrix_keypad_suspend NULL
246#define matrix_keypad_resume NULL
247#endif
248
249static int __devinit init_matrix_gpio(struct platform_device *pdev,
250 struct matrix_keypad *keypad)
251{
252 const struct matrix_keypad_platform_data *pdata = keypad->pdata;
253 int i, err = -EINVAL;
254
255 /* initialized strobe lines as outputs, activated */
256 for (i = 0; i < pdata->num_col_gpios; i++) {
257 err = gpio_request(pdata->col_gpios[i], "matrix_kbd_col");
258 if (err) {
259 dev_err(&pdev->dev,
260 "failed to request GPIO%d for COL%d\n",
261 pdata->col_gpios[i], i);
262 goto err_free_cols;
263 }
264
265 gpio_direction_output(pdata->col_gpios[i], !pdata->active_low);
266 }
267
268 for (i = 0; i < pdata->num_row_gpios; i++) {
269 err = gpio_request(pdata->row_gpios[i], "matrix_kbd_row");
270 if (err) {
271 dev_err(&pdev->dev,
272 "failed to request GPIO%d for ROW%d\n",
273 pdata->row_gpios[i], i);
274 goto err_free_rows;
275 }
276
277 gpio_direction_input(pdata->row_gpios[i]);
278 }
279
280 for (i = 0; i < pdata->num_row_gpios; i++) {
281 err = request_irq(gpio_to_irq(pdata->row_gpios[i]),
282 matrix_keypad_interrupt,
283 IRQF_DISABLED |
284 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
285 "matrix-keypad", keypad);
286 if (err) {
287 dev_err(&pdev->dev,
288 "Unable to acquire interrupt for GPIO line %i\n",
289 pdata->row_gpios[i]);
290 goto err_free_irqs;
291 }
292 }
293
294 /* initialized as disabled - enabled by input->open */
295 disable_row_irqs(keypad);
296 return 0;
297
298err_free_irqs:
299 while (--i >= 0)
300 free_irq(gpio_to_irq(pdata->row_gpios[i]), keypad);
301 i = pdata->num_row_gpios;
302err_free_rows:
303 while (--i >= 0)
304 gpio_free(pdata->row_gpios[i]);
305 i = pdata->num_col_gpios;
306err_free_cols:
307 while (--i >= 0)
308 gpio_free(pdata->col_gpios[i]);
309
310 return err;
311}
312
313static int __devinit matrix_keypad_probe(struct platform_device *pdev)
314{
315 const struct matrix_keypad_platform_data *pdata;
316 const struct matrix_keymap_data *keymap_data;
317 struct matrix_keypad *keypad;
318 struct input_dev *input_dev;
319 unsigned short *keycodes;
320 int i;
321 int err;
322
323 pdata = pdev->dev.platform_data;
324 if (!pdata) {
325 dev_err(&pdev->dev, "no platform data defined\n");
326 return -EINVAL;
327 }
328
329 keymap_data = pdata->keymap_data;
330 if (!keymap_data) {
331 dev_err(&pdev->dev, "no keymap data defined\n");
332 return -EINVAL;
333 }
334
335 if (!keymap_data->max_keymap_size) {
336 dev_err(&pdev->dev, "invalid keymap data supplied\n");
337 return -EINVAL;
338 }
339
340 keypad = kzalloc(sizeof(struct matrix_keypad), GFP_KERNEL);
341 keycodes = kzalloc(keymap_data->max_keymap_size *
342 sizeof(keypad->keycodes),
343 GFP_KERNEL);
344 input_dev = input_allocate_device();
345 if (!keypad || !keycodes || !input_dev) {
346 err = -ENOMEM;
347 goto err_free_mem;
348 }
349
350 keypad->input_dev = input_dev;
351 keypad->pdata = pdata;
352 keypad->keycodes = keycodes;
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 = keymap_data->max_keymap_size;
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[(row << 4) + col] = 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
395err_free_mem:
396 input_free_device(input_dev);
397 kfree(keycodes);
398 kfree(keypad);
399 return err;
400}
401
402static 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
426static 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
437static int __init matrix_keypad_init(void)
438{
439 return platform_driver_register(&matrix_keypad_driver);
440}
441
442static void __exit matrix_keypad_exit(void)
443{
444 platform_driver_unregister(&matrix_keypad_driver);
445}
446
447module_init(matrix_keypad_init);
448module_exit(matrix_keypad_exit);
449
450MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>");
451MODULE_DESCRIPTION("GPIO Driven Matrix Keypad Driver");
452MODULE_LICENSE("GPL v2");
453MODULE_ALIAS("platform:matrix-keypad");
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
49static int __init gpio_mouse_probe(struct platform_device *pdev) 49static 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 */
174MODULE_ALIAS("platform:gpio_mouse");
175
176static struct platform_driver gpio_mouse_device_driver = { 173static 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
184static int __init gpio_mouse_init(void) 182static 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}
189module_init(gpio_mouse_init); 186module_init(gpio_mouse_init);
190 187
@@ -197,3 +194,5 @@ module_exit(gpio_mouse_exit);
197MODULE_AUTHOR("Hans-Christian Egtvedt <hcegtvedt@atmel.com>"); 194MODULE_AUTHOR("Hans-Christian Egtvedt <hcegtvedt@atmel.com>");
198MODULE_DESCRIPTION("GPIO mouse driver"); 195MODULE_DESCRIPTION("GPIO mouse driver");
199MODULE_LICENSE("GPL"); 196MODULE_LICENSE("GPL");
197MODULE_ALIAS("platform:gpio_mouse"); /* work with hotplug and coldplug */
198
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
index fb8a3cd3ffd0..924e8ed7f2cf 100644
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -392,6 +392,34 @@ static struct dmi_system_id __initdata i8042_dmi_reset_table[] = {
392 DMI_MATCH(DMI_BOARD_VENDOR, "LG Electronics Inc."), 392 DMI_MATCH(DMI_BOARD_VENDOR, "LG Electronics Inc."),
393 }, 393 },
394 }, 394 },
395 {
396 .ident = "Acer Aspire One 150",
397 .matches = {
398 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
399 DMI_MATCH(DMI_PRODUCT_NAME, "AOA150"),
400 },
401 },
402 {
403 .ident = "Advent 4211",
404 .matches = {
405 DMI_MATCH(DMI_SYS_VENDOR, "DIXONSXP"),
406 DMI_MATCH(DMI_PRODUCT_NAME, "Advent 4211"),
407 },
408 },
409 {
410 .ident = "Medion Akoya Mini E1210",
411 .matches = {
412 DMI_MATCH(DMI_SYS_VENDOR, "MEDION"),
413 DMI_MATCH(DMI_PRODUCT_NAME, "E1210"),
414 },
415 },
416 {
417 .ident = "Mivvy M310",
418 .matches = {
419 DMI_MATCH(DMI_SYS_VENDOR, "VIOOO"),
420 DMI_MATCH(DMI_PRODUCT_NAME, "N10"),
421 },
422 },
395 { } 423 { }
396}; 424};
397 425
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
935static int i8042_suspend(struct platform_device *dev, pm_message_t state) 935static 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) },
diff --git a/drivers/mfd/dm355evm_msp.c b/drivers/mfd/dm355evm_msp.c
index 7ac12cb0be4a..5b6e58a3ba46 100644
--- a/drivers/mfd/dm355evm_msp.c
+++ b/drivers/mfd/dm355evm_msp.c
@@ -32,8 +32,7 @@
32 * This driver was tested with firmware revision A4. 32 * This driver was tested with firmware revision A4.
33 */ 33 */
34 34
35#if defined(CONFIG_KEYBOARD_DM355EVM) \ 35#if defined(CONFIG_INPUT_DM355EVM) || defined(CONFIG_INPUT_DM355EVM_MODULE)
36 || defined(CONFIG_KEYBOARD_DM355EVM_MODULE)
37#define msp_has_keyboard() true 36#define msp_has_keyboard() true
38#else 37#else
39#define msp_has_keyboard() false 38#define msp_has_keyboard() false