GNU Linux-libre 4.19.314-gnu1
[releases.git] / drivers / input / serio / i8042-x86ia64io.h
1 #ifndef _I8042_X86IA64IO_H
2 #define _I8042_X86IA64IO_H
3
4 /*
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License version 2 as published by
7  * the Free Software Foundation.
8  */
9
10 #ifdef CONFIG_X86
11 #include <asm/x86_init.h>
12 #endif
13
14 /*
15  * Names.
16  */
17
18 #define I8042_KBD_PHYS_DESC "isa0060/serio0"
19 #define I8042_AUX_PHYS_DESC "isa0060/serio1"
20 #define I8042_MUX_PHYS_DESC "isa0060/serio%d"
21
22 /*
23  * IRQs.
24  */
25
26 #if defined(__ia64__)
27 # define I8042_MAP_IRQ(x)       isa_irq_to_vector((x))
28 #else
29 # define I8042_MAP_IRQ(x)       (x)
30 #endif
31
32 #define I8042_KBD_IRQ   i8042_kbd_irq
33 #define I8042_AUX_IRQ   i8042_aux_irq
34
35 static int i8042_kbd_irq;
36 static int i8042_aux_irq;
37
38 /*
39  * Register numbers.
40  */
41
42 #define I8042_COMMAND_REG       i8042_command_reg
43 #define I8042_STATUS_REG        i8042_command_reg
44 #define I8042_DATA_REG          i8042_data_reg
45
46 static int i8042_command_reg = 0x64;
47 static int i8042_data_reg = 0x60;
48
49
50 static inline int i8042_read_data(void)
51 {
52         return inb(I8042_DATA_REG);
53 }
54
55 static inline int i8042_read_status(void)
56 {
57         return inb(I8042_STATUS_REG);
58 }
59
60 static inline void i8042_write_data(int val)
61 {
62         outb(val, I8042_DATA_REG);
63 }
64
65 static inline void i8042_write_command(int val)
66 {
67         outb(val, I8042_COMMAND_REG);
68 }
69
70 #ifdef CONFIG_X86
71
72 #include <linux/dmi.h>
73
74 #define SERIO_QUIRK_NOKBD               BIT(0)
75 #define SERIO_QUIRK_NOAUX               BIT(1)
76 #define SERIO_QUIRK_NOMUX               BIT(2)
77 #define SERIO_QUIRK_FORCEMUX            BIT(3)
78 #define SERIO_QUIRK_UNLOCK              BIT(4)
79 #define SERIO_QUIRK_PROBE_DEFER         BIT(5)
80 #define SERIO_QUIRK_RESET_ALWAYS        BIT(6)
81 #define SERIO_QUIRK_RESET_NEVER         BIT(7)
82 #define SERIO_QUIRK_DIECT               BIT(8)
83 #define SERIO_QUIRK_DUMBKBD             BIT(9)
84 #define SERIO_QUIRK_NOLOOP              BIT(10)
85 #define SERIO_QUIRK_NOTIMEOUT           BIT(11)
86 #define SERIO_QUIRK_KBDRESET            BIT(12)
87 #define SERIO_QUIRK_DRITEK              BIT(13)
88 #define SERIO_QUIRK_NOPNP               BIT(14)
89
90 /* Quirk table for different mainboards. Options similar or identical to i8042
91  * module parameters.
92  * ORDERING IS IMPORTANT! The first match will be apllied and the rest ignored.
93  * This allows entries to overwrite vendor wide quirks on a per device basis.
94  * Where this is irrelevant, entries are sorted case sensitive by DMI_SYS_VENDOR
95  * and/or DMI_BOARD_VENDOR to make it easier to avoid dublicate entries.
96  */
97 static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
98         {
99                 .matches = {
100                         DMI_MATCH(DMI_SYS_VENDOR, "ALIENWARE"),
101                         DMI_MATCH(DMI_PRODUCT_NAME, "Sentia"),
102                 },
103                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
104         },
105         {
106                 .matches = {
107                         DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
108                         DMI_MATCH(DMI_PRODUCT_NAME, "X750LN"),
109                 },
110                 .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
111         },
112         {
113                 /* Asus X450LCP */
114                 .matches = {
115                         DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
116                         DMI_MATCH(DMI_PRODUCT_NAME, "X450LCP"),
117                 },
118                 .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_NEVER)
119         },
120         {
121                 /* ASUS ZenBook UX425UA */
122                 .matches = {
123                         DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
124                         DMI_MATCH(DMI_PRODUCT_NAME, "ZenBook UX425UA"),
125                 },
126                 .driver_data = (void *)(SERIO_QUIRK_PROBE_DEFER | SERIO_QUIRK_RESET_NEVER)
127         },
128         {
129                 /* ASUS ZenBook UM325UA */
130                 .matches = {
131                         DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
132                         DMI_MATCH(DMI_PRODUCT_NAME, "ZenBook UX325UA_UM325UA"),
133                 },
134                 .driver_data = (void *)(SERIO_QUIRK_PROBE_DEFER | SERIO_QUIRK_RESET_NEVER)
135         },
136         /*
137          * On some Asus laptops, just running self tests cause problems.
138          */
139         {
140                 .matches = {
141                         DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
142                         DMI_MATCH(DMI_CHASSIS_TYPE, "10"), /* Notebook */
143                 },
144                 .driver_data = (void *)(SERIO_QUIRK_RESET_NEVER)
145         },
146         {
147                 .matches = {
148                         DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
149                         DMI_MATCH(DMI_CHASSIS_TYPE, "31"), /* Convertible Notebook */
150                 },
151                 .driver_data = (void *)(SERIO_QUIRK_RESET_NEVER)
152         },
153         {
154                 /* ASUS P65UP5 - AUX LOOP command does not raise AUX IRQ */
155                 .matches = {
156                         DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
157                         DMI_MATCH(DMI_BOARD_NAME, "P/I-P65UP5"),
158                         DMI_MATCH(DMI_BOARD_VERSION, "REV 2.X"),
159                 },
160                 .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
161         },
162         {
163                 /* ASUS G1S */
164                 .matches = {
165                         DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer Inc."),
166                         DMI_MATCH(DMI_BOARD_NAME, "G1S"),
167                         DMI_MATCH(DMI_BOARD_VERSION, "1.0"),
168                 },
169                 .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
170         },
171         {
172                 .matches = {
173                         DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
174                         DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 1360"),
175                 },
176                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
177         },
178         {
179                 /* Acer Aspire 5710 */
180                 .matches = {
181                         DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
182                         DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5710"),
183                 },
184                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
185         },
186         {
187                 /* Acer Aspire 7738 */
188                 .matches = {
189                         DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
190                         DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 7738"),
191                 },
192                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
193         },
194         {
195                 /* Acer Aspire 5536 */
196                 .matches = {
197                         DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
198                         DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5536"),
199                         DMI_MATCH(DMI_PRODUCT_VERSION, "0100"),
200                 },
201                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
202         },
203         {
204                 /*
205                  * Acer Aspire 5738z
206                  * Touchpad stops working in mux mode when dis- + re-enabled
207                  * with the touchpad enable/disable toggle hotkey
208                  */
209                 .matches = {
210                         DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
211                         DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5738"),
212                 },
213                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
214         },
215         {
216                 /* Acer Aspire One 150 */
217                 .matches = {
218                         DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
219                         DMI_MATCH(DMI_PRODUCT_NAME, "AOA150"),
220                 },
221                 .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
222         },
223         {
224                 .matches = {
225                         DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
226                         DMI_MATCH(DMI_PRODUCT_NAME, "Aspire A114-31"),
227                 },
228                 .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
229         },
230         {
231                 .matches = {
232                         DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
233                         DMI_MATCH(DMI_PRODUCT_NAME, "Aspire A314-31"),
234                 },
235                 .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
236         },
237         {
238                 .matches = {
239                         DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
240                         DMI_MATCH(DMI_PRODUCT_NAME, "Aspire A315-31"),
241                 },
242                 .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
243         },
244         {
245                 .matches = {
246                         DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
247                         DMI_MATCH(DMI_PRODUCT_NAME, "Aspire ES1-132"),
248                 },
249                 .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
250         },
251         {
252                 .matches = {
253                         DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
254                         DMI_MATCH(DMI_PRODUCT_NAME, "Aspire ES1-332"),
255                 },
256                 .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
257         },
258         {
259                 .matches = {
260                         DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
261                         DMI_MATCH(DMI_PRODUCT_NAME, "Aspire ES1-432"),
262                 },
263                 .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
264         },
265         {
266                 .matches = {
267                         DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
268                         DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate Spin B118-RN"),
269                 },
270                 .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
271         },
272         /*
273          * Some Wistron based laptops need us to explicitly enable the 'Dritek
274          * keyboard extension' to make their extra keys start generating scancodes.
275          * Originally, this was just confined to older laptops, but a few Acer laptops
276          * have turned up in 2007 that also need this again.
277          */
278         {
279                 /* Acer Aspire 5100 */
280                 .matches = {
281                         DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
282                         DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5100"),
283                 },
284                 .driver_data = (void *)(SERIO_QUIRK_DRITEK)
285         },
286         {
287                 /* Acer Aspire 5610 */
288                 .matches = {
289                         DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
290                         DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5610"),
291                 },
292                 .driver_data = (void *)(SERIO_QUIRK_DRITEK)
293         },
294         {
295                 /* Acer Aspire 5630 */
296                 .matches = {
297                         DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
298                         DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5630"),
299                 },
300                 .driver_data = (void *)(SERIO_QUIRK_DRITEK)
301         },
302         {
303                 /* Acer Aspire 5650 */
304                 .matches = {
305                         DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
306                         DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5650"),
307                 },
308                 .driver_data = (void *)(SERIO_QUIRK_DRITEK)
309         },
310         {
311                 /* Acer Aspire 5680 */
312                 .matches = {
313                         DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
314                         DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5680"),
315                 },
316                 .driver_data = (void *)(SERIO_QUIRK_DRITEK)
317         },
318         {
319                 /* Acer Aspire 5720 */
320                 .matches = {
321                         DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
322                         DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5720"),
323                 },
324                 .driver_data = (void *)(SERIO_QUIRK_DRITEK)
325         },
326         {
327                 /* Acer Aspire 9110 */
328                 .matches = {
329                         DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
330                         DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 9110"),
331                 },
332                 .driver_data = (void *)(SERIO_QUIRK_DRITEK)
333         },
334         {
335                 /* Acer TravelMate 660 */
336                 .matches = {
337                         DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
338                         DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 660"),
339                 },
340                 .driver_data = (void *)(SERIO_QUIRK_DRITEK)
341         },
342         {
343                 /* Acer TravelMate 2490 */
344                 .matches = {
345                         DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
346                         DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 2490"),
347                 },
348                 .driver_data = (void *)(SERIO_QUIRK_DRITEK)
349         },
350         {
351                 /* Acer TravelMate 4280 */
352                 .matches = {
353                         DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
354                         DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 4280"),
355                 },
356                 .driver_data = (void *)(SERIO_QUIRK_DRITEK)
357         },
358         {
359                 /* Acer TravelMate P459-G2-M */
360                 .matches = {
361                         DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
362                         DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate P459-G2-M"),
363                 },
364                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
365         },
366         {
367                 /* Amoi M636/A737 */
368                 .matches = {
369                         DMI_MATCH(DMI_SYS_VENDOR, "Amoi Electronics CO.,LTD."),
370                         DMI_MATCH(DMI_PRODUCT_NAME, "M636/A737 platform"),
371                 },
372                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
373         },
374         {
375                 .matches = {
376                         DMI_MATCH(DMI_SYS_VENDOR, "ByteSpeed LLC"),
377                         DMI_MATCH(DMI_PRODUCT_NAME, "ByteSpeed Laptop C15B"),
378                 },
379                 .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
380         },
381         {
382                 /* Compal HEL80I */
383                 .matches = {
384                         DMI_MATCH(DMI_SYS_VENDOR, "COMPAL"),
385                         DMI_MATCH(DMI_PRODUCT_NAME, "HEL80I"),
386                 },
387                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
388         },
389         {
390                 .matches = {
391                         DMI_MATCH(DMI_SYS_VENDOR, "Compaq"),
392                         DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant"),
393                         DMI_MATCH(DMI_PRODUCT_VERSION, "8500"),
394                 },
395                 .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
396         },
397         {
398                 .matches = {
399                         DMI_MATCH(DMI_SYS_VENDOR, "Compaq"),
400                         DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant"),
401                         DMI_MATCH(DMI_PRODUCT_VERSION, "DL760"),
402                 },
403                 .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
404         },
405         {
406                 /* Advent 4211 */
407                 .matches = {
408                         DMI_MATCH(DMI_SYS_VENDOR, "DIXONSXP"),
409                         DMI_MATCH(DMI_PRODUCT_NAME, "Advent 4211"),
410                 },
411                 .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
412         },
413         {
414                 /* Dell Embedded Box PC 3000 */
415                 .matches = {
416                         DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
417                         DMI_MATCH(DMI_PRODUCT_NAME, "Embedded Box PC 3000"),
418                 },
419                 .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
420         },
421         {
422                 /* Dell XPS M1530 */
423                 .matches = {
424                         DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
425                         DMI_MATCH(DMI_PRODUCT_NAME, "XPS M1530"),
426                 },
427                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
428         },
429         {
430                 /* Dell Vostro 1510 */
431                 .matches = {
432                         DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
433                         DMI_MATCH(DMI_PRODUCT_NAME, "Vostro1510"),
434                 },
435                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
436         },
437         {
438                 /* Dell Vostro V13 */
439                 .matches = {
440                         DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
441                         DMI_MATCH(DMI_PRODUCT_NAME, "Vostro V13"),
442                 },
443                 .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_NOTIMEOUT)
444         },
445         {
446                 /* Dell Vostro 1320 */
447                 .matches = {
448                         DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
449                         DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 1320"),
450                 },
451                 .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
452         },
453         {
454                 /* Dell Vostro 1520 */
455                 .matches = {
456                         DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
457                         DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 1520"),
458                 },
459                 .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
460         },
461         {
462                 /* Dell Vostro 1720 */
463                 .matches = {
464                         DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
465                         DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 1720"),
466                 },
467                 .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
468         },
469         {
470                 /* Entroware Proteus */
471                 .matches = {
472                         DMI_MATCH(DMI_SYS_VENDOR, "Entroware"),
473                         DMI_MATCH(DMI_PRODUCT_NAME, "Proteus"),
474                         DMI_MATCH(DMI_PRODUCT_VERSION, "EL07R4"),
475                 },
476                 .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS)
477         },
478         /*
479          * Some Fujitsu notebooks are having trouble with touchpads if
480          * active multiplexing mode is activated. Luckily they don't have
481          * external PS/2 ports so we can safely disable it.
482          * ... apparently some Toshibas don't like MUX mode either and
483          * die horrible death on reboot.
484          */
485         {
486                 /* Fujitsu Lifebook P7010/P7010D */
487                 .matches = {
488                         DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
489                         DMI_MATCH(DMI_PRODUCT_NAME, "P7010"),
490                 },
491                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
492         },
493         {
494                 /* Fujitsu Lifebook P5020D */
495                 .matches = {
496                         DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
497                         DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook P Series"),
498                 },
499                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
500         },
501         {
502                 /* Fujitsu Lifebook S2000 */
503                 .matches = {
504                         DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
505                         DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook S Series"),
506                 },
507                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
508         },
509         {
510                 /* Fujitsu Lifebook S6230 */
511                 .matches = {
512                         DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
513                         DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook S6230"),
514                 },
515                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
516         },
517         {
518                 /* Fujitsu Lifebook T725 laptop */
519                 .matches = {
520                         DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
521                         DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK T725"),
522                 },
523                 .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_NOTIMEOUT)
524         },
525         {
526                 /* Fujitsu Lifebook U745 */
527                 .matches = {
528                         DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
529                         DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK U745"),
530                 },
531                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
532         },
533         {
534                 /* Fujitsu T70H */
535                 .matches = {
536                         DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
537                         DMI_MATCH(DMI_PRODUCT_NAME, "FMVLT70H"),
538                 },
539                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
540         },
541         {
542                 /* Fujitsu A544 laptop */
543                 /* https://bugzilla.redhat.com/show_bug.cgi?id=1111138 */
544                 .matches = {
545                         DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
546                         DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK A544"),
547                 },
548                 .driver_data = (void *)(SERIO_QUIRK_NOTIMEOUT)
549         },
550         {
551                 /* Fujitsu AH544 laptop */
552                 /* https://bugzilla.kernel.org/show_bug.cgi?id=69731 */
553                 .matches = {
554                         DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
555                         DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK AH544"),
556                 },
557                 .driver_data = (void *)(SERIO_QUIRK_NOTIMEOUT)
558         },
559         {
560                 /* Fujitsu U574 laptop */
561                 /* https://bugzilla.kernel.org/show_bug.cgi?id=69731 */
562                 .matches = {
563                         DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
564                         DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK U574"),
565                 },
566                 .driver_data = (void *)(SERIO_QUIRK_NOTIMEOUT)
567         },
568         {
569                 /* Fujitsu UH554 laptop */
570                 .matches = {
571                         DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
572                         DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK UH544"),
573                 },
574                 .driver_data = (void *)(SERIO_QUIRK_NOTIMEOUT)
575         },
576         {
577                 /* Fujitsu Lifebook P7010 */
578                 .matches = {
579                         DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
580                         DMI_MATCH(DMI_PRODUCT_NAME, "0000000000"),
581                 },
582                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
583         },
584         {
585                 /* Fujitsu-Siemens Lifebook T3010 */
586                 .matches = {
587                         DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
588                         DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK T3010"),
589                 },
590                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
591         },
592         {
593                 /* Fujitsu-Siemens Lifebook E4010 */
594                 .matches = {
595                         DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
596                         DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK E4010"),
597                 },
598                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
599         },
600         {
601                 /* Fujitsu-Siemens Amilo Pro 2010 */
602                 .matches = {
603                         DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
604                         DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pro V2010"),
605                 },
606                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
607         },
608         {
609                 /* Fujitsu-Siemens Amilo Pro 2030 */
610                 .matches = {
611                         DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
612                         DMI_MATCH(DMI_PRODUCT_NAME, "AMILO PRO V2030"),
613                 },
614                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
615         },
616         {
617                 /* Fujitsu Lifebook A574/H */
618                 .matches = {
619                         DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
620                         DMI_MATCH(DMI_PRODUCT_NAME, "FMVA0501PZ"),
621                 },
622                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
623         },
624         {
625                 /* Fujitsu Lifebook E5411 */
626                 .matches = {
627                         DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU CLIENT COMPUTING LIMITED"),
628                         DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK E5411"),
629                 },
630                 .driver_data = (void *)(SERIO_QUIRK_NOAUX)
631         },
632         {
633                 /* Gigabyte M912 */
634                 .matches = {
635                         DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
636                         DMI_MATCH(DMI_PRODUCT_NAME, "M912"),
637                         DMI_MATCH(DMI_PRODUCT_VERSION, "01"),
638                 },
639                 .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
640         },
641         {
642                 /* Gigabyte Spring Peak - defines wrong chassis type */
643                 .matches = {
644                         DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
645                         DMI_MATCH(DMI_PRODUCT_NAME, "Spring Peak"),
646                 },
647                 .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
648         },
649         {
650                 /* Gigabyte T1005 - defines wrong chassis type ("Other") */
651                 .matches = {
652                         DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
653                         DMI_MATCH(DMI_PRODUCT_NAME, "T1005"),
654                 },
655                 .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
656         },
657         {
658                 /* Gigabyte T1005M/P - defines wrong chassis type ("Other") */
659                 .matches = {
660                         DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
661                         DMI_MATCH(DMI_PRODUCT_NAME, "T1005M/P"),
662                 },
663                 .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
664         },
665         /*
666          * Some laptops need keyboard reset before probing for the trackpad to get
667          * it detected, initialised & finally work.
668          */
669         {
670                 /* Gigabyte P35 v2 - Elantech touchpad */
671                 .matches = {
672                         DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
673                         DMI_MATCH(DMI_PRODUCT_NAME, "P35V2"),
674                 },
675                 .driver_data = (void *)(SERIO_QUIRK_KBDRESET)
676         },
677                 {
678                 /* Aorus branded Gigabyte X3 Plus - Elantech touchpad */
679                 .matches = {
680                         DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
681                         DMI_MATCH(DMI_PRODUCT_NAME, "X3"),
682                 },
683                 .driver_data = (void *)(SERIO_QUIRK_KBDRESET)
684         },
685         {
686                 /* Gigabyte P34 - Elantech touchpad */
687                 .matches = {
688                         DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
689                         DMI_MATCH(DMI_PRODUCT_NAME, "P34"),
690                 },
691                 .driver_data = (void *)(SERIO_QUIRK_KBDRESET)
692         },
693         {
694                 /* Gigabyte P57 - Elantech touchpad */
695                 .matches = {
696                         DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
697                         DMI_MATCH(DMI_PRODUCT_NAME, "P57"),
698                 },
699                 .driver_data = (void *)(SERIO_QUIRK_KBDRESET)
700         },
701         {
702                 /* Gericom Bellagio */
703                 .matches = {
704                         DMI_MATCH(DMI_SYS_VENDOR, "Gericom"),
705                         DMI_MATCH(DMI_PRODUCT_NAME, "N34AS6"),
706                 },
707                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
708         },
709         {
710                 /* Gigabyte M1022M netbook */
711                 .matches = {
712                         DMI_MATCH(DMI_BOARD_VENDOR, "Gigabyte Technology Co.,Ltd."),
713                         DMI_MATCH(DMI_BOARD_NAME, "M1022E"),
714                         DMI_MATCH(DMI_BOARD_VERSION, "1.02"),
715                 },
716                 .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
717         },
718         {
719                 .matches = {
720                         DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
721                         DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv9700"),
722                         DMI_MATCH(DMI_PRODUCT_VERSION, "Rev 1"),
723                 },
724                 .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
725         },
726         {
727                 /*
728                  * HP Pavilion DV4017EA -
729                  * errors on MUX ports are reported without raising AUXDATA
730                  * causing "spurious NAK" messages.
731                  */
732                 .matches = {
733                         DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
734                         DMI_MATCH(DMI_PRODUCT_NAME, "Pavilion dv4000 (EA032EA#ABF)"),
735                 },
736                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
737         },
738         {
739                 /*
740                  * HP Pavilion ZT1000 -
741                  * like DV4017EA does not raise AUXERR for errors on MUX ports.
742                  */
743                 .matches = {
744                         DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
745                         DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion Notebook PC"),
746                         DMI_MATCH(DMI_PRODUCT_VERSION, "HP Pavilion Notebook ZT1000"),
747                 },
748                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
749         },
750         {
751                 /*
752                  * HP Pavilion DV4270ca -
753                  * like DV4017EA does not raise AUXERR for errors on MUX ports.
754                  */
755                 .matches = {
756                         DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
757                         DMI_MATCH(DMI_PRODUCT_NAME, "Pavilion dv4000 (EH476UA#ABL)"),
758                 },
759                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
760         },
761         {
762                 /* Newer HP Pavilion dv4 models */
763                 .matches = {
764                         DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
765                         DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv4 Notebook PC"),
766                 },
767                 .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_NOTIMEOUT)
768         },
769         {
770                 /* IBM 2656 */
771                 .matches = {
772                         DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
773                         DMI_MATCH(DMI_PRODUCT_NAME, "2656"),
774                 },
775                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
776         },
777         {
778                 /* Avatar AVIU-145A6 */
779                 .matches = {
780                         DMI_MATCH(DMI_SYS_VENDOR, "Intel"),
781                         DMI_MATCH(DMI_PRODUCT_NAME, "IC4I"),
782                 },
783                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
784         },
785         {
786                 /* Intel MBO Desktop D845PESV */
787                 .matches = {
788                         DMI_MATCH(DMI_BOARD_VENDOR, "Intel Corporation"),
789                         DMI_MATCH(DMI_BOARD_NAME, "D845PESV"),
790                 },
791                 .driver_data = (void *)(SERIO_QUIRK_NOPNP)
792         },
793         {
794                 /*
795                  * Intel NUC D54250WYK - does not have i8042 controller but
796                  * declares PS/2 devices in DSDT.
797                  */
798                 .matches = {
799                         DMI_MATCH(DMI_BOARD_VENDOR, "Intel Corporation"),
800                         DMI_MATCH(DMI_BOARD_NAME, "D54250WYK"),
801                 },
802                 .driver_data = (void *)(SERIO_QUIRK_NOPNP)
803         },
804         {
805                 /* Lenovo 3000 n100 */
806                 .matches = {
807                         DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
808                         DMI_MATCH(DMI_PRODUCT_NAME, "076804U"),
809                 },
810                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
811         },
812         {
813                 /* Lenovo XiaoXin Air 12 */
814                 .matches = {
815                         DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
816                         DMI_MATCH(DMI_PRODUCT_NAME, "80UN"),
817                 },
818                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
819         },
820         {
821                 /* Lenovo LaVie Z */
822                 .matches = {
823                         DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
824                         DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo LaVie Z"),
825                 },
826                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
827         },
828         {
829                 /* Lenovo Ideapad U455 */
830                 .matches = {
831                         DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
832                         DMI_MATCH(DMI_PRODUCT_NAME, "20046"),
833                 },
834                 .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
835         },
836         {
837                 /* Lenovo ThinkPad L460 */
838                 .matches = {
839                         DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
840                         DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad L460"),
841                 },
842                 .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
843         },
844         {
845                 /* Lenovo ThinkPad Twist S230u */
846                 .matches = {
847                         DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
848                         DMI_MATCH(DMI_PRODUCT_NAME, "33474HU"),
849                 },
850                 .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
851         },
852         {
853                 /* LG Electronics X110 */
854                 .matches = {
855                         DMI_MATCH(DMI_BOARD_VENDOR, "LG Electronics Inc."),
856                         DMI_MATCH(DMI_BOARD_NAME, "X110"),
857                 },
858                 .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
859         },
860         {
861                 /* Medion Akoya Mini E1210 */
862                 .matches = {
863                         DMI_MATCH(DMI_SYS_VENDOR, "MEDION"),
864                         DMI_MATCH(DMI_PRODUCT_NAME, "E1210"),
865                 },
866                 .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
867         },
868         {
869                 /* Medion Akoya E1222 */
870                 .matches = {
871                         DMI_MATCH(DMI_SYS_VENDOR, "MEDION"),
872                         DMI_MATCH(DMI_PRODUCT_NAME, "E122X"),
873                 },
874                 .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
875         },
876         {
877                 /* MSI Wind U-100 */
878                 .matches = {
879                         DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"),
880                         DMI_MATCH(DMI_BOARD_NAME, "U-100"),
881                 },
882                 .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS | SERIO_QUIRK_NOPNP)
883         },
884         {
885                 /*
886                  * No data is coming from the touchscreen unless KBC
887                  * is in legacy mode.
888                  */
889                 /* Panasonic CF-29 */
890                 .matches = {
891                         DMI_MATCH(DMI_SYS_VENDOR, "Matsushita"),
892                         DMI_MATCH(DMI_PRODUCT_NAME, "CF-29"),
893                 },
894                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
895         },
896         {
897                 /* Medion Akoya E7225 */
898                 .matches = {
899                         DMI_MATCH(DMI_SYS_VENDOR, "Medion"),
900                         DMI_MATCH(DMI_PRODUCT_NAME, "Akoya E7225"),
901                         DMI_MATCH(DMI_PRODUCT_VERSION, "1.0"),
902                 },
903                 .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
904         },
905         {
906                 /* Microsoft Virtual Machine */
907                 .matches = {
908                         DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
909                         DMI_MATCH(DMI_PRODUCT_NAME, "Virtual Machine"),
910                         DMI_MATCH(DMI_PRODUCT_VERSION, "VS2005R2"),
911                 },
912                 .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
913         },
914         {
915                 /* Medion MAM 2070 */
916                 .matches = {
917                         DMI_MATCH(DMI_SYS_VENDOR, "Notebook"),
918                         DMI_MATCH(DMI_PRODUCT_NAME, "MAM 2070"),
919                         DMI_MATCH(DMI_PRODUCT_VERSION, "5a"),
920                 },
921                 .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
922         },
923         {
924                 /* TUXEDO BU1406 */
925                 .matches = {
926                         DMI_MATCH(DMI_SYS_VENDOR, "Notebook"),
927                         DMI_MATCH(DMI_PRODUCT_NAME, "N24_25BU"),
928                 },
929                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
930         },
931         {
932                 /* Clevo P650RS, 650RP6, Sager NP8152-S, and others */
933                 .matches = {
934                         DMI_MATCH(DMI_SYS_VENDOR, "Notebook"),
935                         DMI_MATCH(DMI_PRODUCT_NAME, "P65xRP"),
936                 },
937                 .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
938         },
939         {
940                 /* OQO Model 01 */
941                 .matches = {
942                         DMI_MATCH(DMI_SYS_VENDOR, "OQO"),
943                         DMI_MATCH(DMI_PRODUCT_NAME, "ZEPTO"),
944                         DMI_MATCH(DMI_PRODUCT_VERSION, "00"),
945                 },
946                 .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
947         },
948         {
949                 .matches = {
950                         DMI_MATCH(DMI_SYS_VENDOR, "PEGATRON CORPORATION"),
951                         DMI_MATCH(DMI_PRODUCT_NAME, "C15B"),
952                 },
953                 .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
954         },
955         {
956                 /* Acer Aspire 5 A515 */
957                 .matches = {
958                         DMI_MATCH(DMI_BOARD_VENDOR, "PK"),
959                         DMI_MATCH(DMI_BOARD_NAME, "Grumpy_PK"),
960                 },
961                 .driver_data = (void *)(SERIO_QUIRK_NOPNP)
962         },
963         {
964                 /* ULI EV4873 - AUX LOOP does not work properly */
965                 .matches = {
966                         DMI_MATCH(DMI_SYS_VENDOR, "ULI"),
967                         DMI_MATCH(DMI_PRODUCT_NAME, "EV4873"),
968                         DMI_MATCH(DMI_PRODUCT_VERSION, "5a"),
969                 },
970                 .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
971         },
972         {
973                 /*
974                  * Arima-Rioworks HDAMB -
975                  * AUX LOOP command does not raise AUX IRQ
976                  */
977                 .matches = {
978                         DMI_MATCH(DMI_BOARD_VENDOR, "RIOWORKS"),
979                         DMI_MATCH(DMI_BOARD_NAME, "HDAMB"),
980                         DMI_MATCH(DMI_BOARD_VERSION, "Rev E"),
981                 },
982                 .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
983         },
984         {
985                 /* Sharp Actius MM20 */
986                 .matches = {
987                         DMI_MATCH(DMI_SYS_VENDOR, "SHARP"),
988                         DMI_MATCH(DMI_PRODUCT_NAME, "PC-MM20 Series"),
989                 },
990                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
991         },
992         {
993                 /*
994                  * Sony Vaio FZ-240E -
995                  * reset and GET ID commands issued via KBD port are
996                  * sometimes being delivered to AUX3.
997                  */
998                 .matches = {
999                         DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
1000                         DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FZ240E"),
1001                 },
1002                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
1003         },
1004         {
1005                 /*
1006                  * Most (all?) VAIOs do not have external PS/2 ports nor
1007                  * they implement active multiplexing properly, and
1008                  * MUX discovery usually messes up keyboard/touchpad.
1009                  */
1010                 .matches = {
1011                         DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
1012                         DMI_MATCH(DMI_BOARD_NAME, "VAIO"),
1013                 },
1014                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
1015         },
1016         {
1017                 /* Sony Vaio FS-115b */
1018                 .matches = {
1019                         DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
1020                         DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FS115B"),
1021                 },
1022                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
1023         },
1024         {
1025                 /*
1026                  * Sony Vaio VGN-CS series require MUX or the touch sensor
1027                  * buttons will disturb touchpad operation
1028                  */
1029                 .matches = {
1030                         DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
1031                         DMI_MATCH(DMI_PRODUCT_NAME, "VGN-CS"),
1032                 },
1033                 .driver_data = (void *)(SERIO_QUIRK_FORCEMUX)
1034         },
1035         {
1036                 .matches = {
1037                         DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
1038                         DMI_MATCH(DMI_PRODUCT_NAME, "Satellite P10"),
1039                 },
1040                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
1041         },
1042         {
1043                 .matches = {
1044                         DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
1045                         DMI_MATCH(DMI_PRODUCT_NAME, "EQUIUM A110"),
1046                 },
1047                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
1048         },
1049         {
1050                 .matches = {
1051                         DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
1052                         DMI_MATCH(DMI_PRODUCT_NAME, "SATELLITE C850D"),
1053                 },
1054                 .driver_data = (void *)(SERIO_QUIRK_NOMUX)
1055         },
1056         /*
1057          * A lot of modern Clevo barebones have touchpad and/or keyboard issues
1058          * after suspend fixable with nomux + reset + noloop + nopnp. Luckily,
1059          * none of them have an external PS/2 port so this can safely be set for
1060          * all of them. These two are based on a Clevo design, but have the
1061          * board_name changed.
1062          */
1063         {
1064                 .matches = {
1065                         DMI_MATCH(DMI_BOARD_VENDOR, "TUXEDO"),
1066                         DMI_MATCH(DMI_BOARD_NAME, "AURA1501"),
1067                 },
1068                 .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1069                                         SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1070         },
1071         {
1072                 .matches = {
1073                         DMI_MATCH(DMI_BOARD_VENDOR, "TUXEDO"),
1074                         DMI_MATCH(DMI_BOARD_NAME, "EDUBOOK1502"),
1075                 },
1076                 .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1077                                         SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1078         },
1079         {
1080                 /* Mivvy M310 */
1081                 .matches = {
1082                         DMI_MATCH(DMI_SYS_VENDOR, "VIOOO"),
1083                         DMI_MATCH(DMI_PRODUCT_NAME, "N10"),
1084                 },
1085                 .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
1086         },
1087         /*
1088          * Some laptops need keyboard reset before probing for the trackpad to get
1089          * it detected, initialised & finally work.
1090          */
1091         {
1092                 /* Schenker XMG C504 - Elantech touchpad */
1093                 .matches = {
1094                         DMI_MATCH(DMI_SYS_VENDOR, "XMG"),
1095                         DMI_MATCH(DMI_PRODUCT_NAME, "C504"),
1096                 },
1097                 .driver_data = (void *)(SERIO_QUIRK_KBDRESET)
1098         },
1099         {
1100                 /* Blue FB5601 */
1101                 .matches = {
1102                         DMI_MATCH(DMI_SYS_VENDOR, "blue"),
1103                         DMI_MATCH(DMI_PRODUCT_NAME, "FB5601"),
1104                         DMI_MATCH(DMI_PRODUCT_VERSION, "M606"),
1105                 },
1106                 .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
1107         },
1108         /*
1109          * A lot of modern Clevo barebones have touchpad and/or keyboard issues
1110          * after suspend fixable with nomux + reset + noloop + nopnp. Luckily,
1111          * none of them have an external PS/2 port so this can safely be set for
1112          * all of them.
1113          * Clevo barebones come with board_vendor and/or system_vendor set to
1114          * either the very generic string "Notebook" and/or a different value
1115          * for each individual reseller. The only somewhat universal way to
1116          * identify them is by board_name.
1117          */
1118         {
1119                 .matches = {
1120                         DMI_MATCH(DMI_BOARD_NAME, "LAPQC71A"),
1121                 },
1122                 .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1123                                         SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1124         },
1125         {
1126                 .matches = {
1127                         DMI_MATCH(DMI_BOARD_NAME, "LAPQC71B"),
1128                 },
1129                 .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1130                                         SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1131         },
1132         {
1133                 .matches = {
1134                         DMI_MATCH(DMI_BOARD_NAME, "N140CU"),
1135                 },
1136                 .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1137                                         SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1138         },
1139         {
1140                 .matches = {
1141                         DMI_MATCH(DMI_BOARD_NAME, "N141CU"),
1142                 },
1143                 .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1144                                         SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1145         },
1146         {
1147                 .matches = {
1148                         DMI_MATCH(DMI_BOARD_NAME, "NH5xAx"),
1149                 },
1150                 .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1151                                         SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1152         },
1153         {
1154                 .matches = {
1155                         DMI_MATCH(DMI_BOARD_NAME, "NL5xRU"),
1156                 },
1157                 .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1158                                         SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1159         },
1160         /*
1161          * At least one modern Clevo barebone has the touchpad connected both
1162          * via PS/2 and i2c interface. This causes a race condition between the
1163          * psmouse and i2c-hid driver. Since the full capability of the touchpad
1164          * is available via the i2c interface and the device has no external
1165          * PS/2 port, it is safe to just ignore all ps2 mouses here to avoid
1166          * this issue. The known affected device is the
1167          * TUXEDO InfinityBook S17 Gen6 / Clevo NS70MU which comes with one of
1168          * the two different dmi strings below. NS50MU is not a typo!
1169          */
1170         {
1171                 .matches = {
1172                         DMI_MATCH(DMI_BOARD_NAME, "NS50MU"),
1173                 },
1174                 .driver_data = (void *)(SERIO_QUIRK_NOAUX | SERIO_QUIRK_NOMUX |
1175                                         SERIO_QUIRK_RESET_ALWAYS | SERIO_QUIRK_NOLOOP |
1176                                         SERIO_QUIRK_NOPNP)
1177         },
1178         {
1179                 .matches = {
1180                         DMI_MATCH(DMI_BOARD_NAME, "NS50_70MU"),
1181                 },
1182                 .driver_data = (void *)(SERIO_QUIRK_NOAUX | SERIO_QUIRK_NOMUX |
1183                                         SERIO_QUIRK_RESET_ALWAYS | SERIO_QUIRK_NOLOOP |
1184                                         SERIO_QUIRK_NOPNP)
1185         },
1186         {
1187                 .matches = {
1188                         DMI_MATCH(DMI_BOARD_NAME, "NS5x_7xPU"),
1189                 },
1190                 .driver_data = (void *)(SERIO_QUIRK_NOAUX)
1191         },
1192         {
1193                 .matches = {
1194                         DMI_MATCH(DMI_BOARD_NAME, "NJ50_70CU"),
1195                 },
1196                 .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1197                                         SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1198         },
1199         {
1200                 .matches = {
1201                         DMI_MATCH(DMI_BOARD_NAME, "PB50_70DFx,DDx"),
1202                 },
1203                 .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1204                                         SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1205         },
1206         {
1207                 .matches = {
1208                         DMI_MATCH(DMI_BOARD_NAME, "PCX0DX"),
1209                 },
1210                 .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1211                                         SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1212         },
1213         /* See comment on TUXEDO InfinityBook S17 Gen6 / Clevo NS70MU above */
1214         {
1215                 .matches = {
1216                         DMI_MATCH(DMI_BOARD_NAME, "PD5x_7xPNP_PNR_PNN_PNT"),
1217                 },
1218                 .driver_data = (void *)(SERIO_QUIRK_NOAUX)
1219         },
1220         {
1221                 .matches = {
1222                         DMI_MATCH(DMI_BOARD_NAME, "X170SM"),
1223                 },
1224                 .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1225                                         SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1226         },
1227         {
1228                 .matches = {
1229                         DMI_MATCH(DMI_BOARD_NAME, "X170KM-G"),
1230                 },
1231                 .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1232                                         SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1233         },
1234         { }
1235 };
1236
1237 #ifdef CONFIG_PNP
1238 static const struct dmi_system_id i8042_dmi_laptop_table[] __initconst = {
1239         {
1240                 .matches = {
1241                         DMI_MATCH(DMI_CHASSIS_TYPE, "8"), /* Portable */
1242                 },
1243         },
1244         {
1245                 .matches = {
1246                         DMI_MATCH(DMI_CHASSIS_TYPE, "9"), /* Laptop */
1247                 },
1248         },
1249         {
1250                 .matches = {
1251                         DMI_MATCH(DMI_CHASSIS_TYPE, "10"), /* Notebook */
1252                 },
1253         },
1254         {
1255                 .matches = {
1256                         DMI_MATCH(DMI_CHASSIS_TYPE, "14"), /* Sub-Notebook */
1257                 },
1258         },
1259         { }
1260 };
1261 #endif
1262
1263 #endif /* CONFIG_X86 */
1264
1265 #ifdef CONFIG_PNP
1266 #include <linux/pnp.h>
1267
1268 static bool i8042_pnp_kbd_registered;
1269 static unsigned int i8042_pnp_kbd_devices;
1270 static bool i8042_pnp_aux_registered;
1271 static unsigned int i8042_pnp_aux_devices;
1272
1273 static int i8042_pnp_command_reg;
1274 static int i8042_pnp_data_reg;
1275 static int i8042_pnp_kbd_irq;
1276 static int i8042_pnp_aux_irq;
1277
1278 static char i8042_pnp_kbd_name[32];
1279 static char i8042_pnp_aux_name[32];
1280
1281 static void i8042_pnp_id_to_string(struct pnp_id *id, char *dst, int dst_size)
1282 {
1283         strlcpy(dst, "PNP:", dst_size);
1284
1285         while (id) {
1286                 strlcat(dst, " ", dst_size);
1287                 strlcat(dst, id->id, dst_size);
1288                 id = id->next;
1289         }
1290 }
1291
1292 static int i8042_pnp_kbd_probe(struct pnp_dev *dev, const struct pnp_device_id *did)
1293 {
1294         if (pnp_port_valid(dev, 0) && pnp_port_len(dev, 0) == 1)
1295                 i8042_pnp_data_reg = pnp_port_start(dev,0);
1296
1297         if (pnp_port_valid(dev, 1) && pnp_port_len(dev, 1) == 1)
1298                 i8042_pnp_command_reg = pnp_port_start(dev, 1);
1299
1300         if (pnp_irq_valid(dev,0))
1301                 i8042_pnp_kbd_irq = pnp_irq(dev, 0);
1302
1303         strlcpy(i8042_pnp_kbd_name, did->id, sizeof(i8042_pnp_kbd_name));
1304         if (strlen(pnp_dev_name(dev))) {
1305                 strlcat(i8042_pnp_kbd_name, ":", sizeof(i8042_pnp_kbd_name));
1306                 strlcat(i8042_pnp_kbd_name, pnp_dev_name(dev), sizeof(i8042_pnp_kbd_name));
1307         }
1308         i8042_pnp_id_to_string(dev->id, i8042_kbd_firmware_id,
1309                                sizeof(i8042_kbd_firmware_id));
1310
1311         /* Keyboard ports are always supposed to be wakeup-enabled */
1312         device_set_wakeup_enable(&dev->dev, true);
1313
1314         i8042_pnp_kbd_devices++;
1315         return 0;
1316 }
1317
1318 static int i8042_pnp_aux_probe(struct pnp_dev *dev, const struct pnp_device_id *did)
1319 {
1320         if (pnp_port_valid(dev, 0) && pnp_port_len(dev, 0) == 1)
1321                 i8042_pnp_data_reg = pnp_port_start(dev,0);
1322
1323         if (pnp_port_valid(dev, 1) && pnp_port_len(dev, 1) == 1)
1324                 i8042_pnp_command_reg = pnp_port_start(dev, 1);
1325
1326         if (pnp_irq_valid(dev, 0))
1327                 i8042_pnp_aux_irq = pnp_irq(dev, 0);
1328
1329         strlcpy(i8042_pnp_aux_name, did->id, sizeof(i8042_pnp_aux_name));
1330         if (strlen(pnp_dev_name(dev))) {
1331                 strlcat(i8042_pnp_aux_name, ":", sizeof(i8042_pnp_aux_name));
1332                 strlcat(i8042_pnp_aux_name, pnp_dev_name(dev), sizeof(i8042_pnp_aux_name));
1333         }
1334         i8042_pnp_id_to_string(dev->id, i8042_aux_firmware_id,
1335                                sizeof(i8042_aux_firmware_id));
1336
1337         i8042_pnp_aux_devices++;
1338         return 0;
1339 }
1340
1341 static const struct pnp_device_id pnp_kbd_devids[] = {
1342         { .id = "PNP0300", .driver_data = 0 },
1343         { .id = "PNP0301", .driver_data = 0 },
1344         { .id = "PNP0302", .driver_data = 0 },
1345         { .id = "PNP0303", .driver_data = 0 },
1346         { .id = "PNP0304", .driver_data = 0 },
1347         { .id = "PNP0305", .driver_data = 0 },
1348         { .id = "PNP0306", .driver_data = 0 },
1349         { .id = "PNP0309", .driver_data = 0 },
1350         { .id = "PNP030a", .driver_data = 0 },
1351         { .id = "PNP030b", .driver_data = 0 },
1352         { .id = "PNP0320", .driver_data = 0 },
1353         { .id = "PNP0343", .driver_data = 0 },
1354         { .id = "PNP0344", .driver_data = 0 },
1355         { .id = "PNP0345", .driver_data = 0 },
1356         { .id = "CPQA0D7", .driver_data = 0 },
1357         { .id = "", },
1358 };
1359 MODULE_DEVICE_TABLE(pnp, pnp_kbd_devids);
1360
1361 static struct pnp_driver i8042_pnp_kbd_driver = {
1362         .name           = "i8042 kbd",
1363         .id_table       = pnp_kbd_devids,
1364         .probe          = i8042_pnp_kbd_probe,
1365         .driver         = {
1366                 .probe_type = PROBE_FORCE_SYNCHRONOUS,
1367                 .suppress_bind_attrs = true,
1368         },
1369 };
1370
1371 static const struct pnp_device_id pnp_aux_devids[] = {
1372         { .id = "AUI0200", .driver_data = 0 },
1373         { .id = "FJC6000", .driver_data = 0 },
1374         { .id = "FJC6001", .driver_data = 0 },
1375         { .id = "PNP0f03", .driver_data = 0 },
1376         { .id = "PNP0f0b", .driver_data = 0 },
1377         { .id = "PNP0f0e", .driver_data = 0 },
1378         { .id = "PNP0f12", .driver_data = 0 },
1379         { .id = "PNP0f13", .driver_data = 0 },
1380         { .id = "PNP0f19", .driver_data = 0 },
1381         { .id = "PNP0f1c", .driver_data = 0 },
1382         { .id = "SYN0801", .driver_data = 0 },
1383         { .id = "", },
1384 };
1385 MODULE_DEVICE_TABLE(pnp, pnp_aux_devids);
1386
1387 static struct pnp_driver i8042_pnp_aux_driver = {
1388         .name           = "i8042 aux",
1389         .id_table       = pnp_aux_devids,
1390         .probe          = i8042_pnp_aux_probe,
1391         .driver         = {
1392                 .probe_type = PROBE_FORCE_SYNCHRONOUS,
1393                 .suppress_bind_attrs = true,
1394         },
1395 };
1396
1397 static void i8042_pnp_exit(void)
1398 {
1399         if (i8042_pnp_kbd_registered) {
1400                 i8042_pnp_kbd_registered = false;
1401                 pnp_unregister_driver(&i8042_pnp_kbd_driver);
1402         }
1403
1404         if (i8042_pnp_aux_registered) {
1405                 i8042_pnp_aux_registered = false;
1406                 pnp_unregister_driver(&i8042_pnp_aux_driver);
1407         }
1408 }
1409
1410 static int __init i8042_pnp_init(void)
1411 {
1412         char kbd_irq_str[4] = { 0 }, aux_irq_str[4] = { 0 };
1413         bool pnp_data_busted = false;
1414         int err;
1415
1416         if (i8042_nopnp) {
1417                 pr_info("PNP detection disabled\n");
1418                 return 0;
1419         }
1420
1421         err = pnp_register_driver(&i8042_pnp_kbd_driver);
1422         if (!err)
1423                 i8042_pnp_kbd_registered = true;
1424
1425         err = pnp_register_driver(&i8042_pnp_aux_driver);
1426         if (!err)
1427                 i8042_pnp_aux_registered = true;
1428
1429         if (!i8042_pnp_kbd_devices && !i8042_pnp_aux_devices) {
1430                 i8042_pnp_exit();
1431 #if defined(__ia64__)
1432                 return -ENODEV;
1433 #else
1434                 pr_info("PNP: No PS/2 controller found.\n");
1435                 if (x86_platform.legacy.i8042 !=
1436                                 X86_LEGACY_I8042_EXPECTED_PRESENT)
1437                         return -ENODEV;
1438                 pr_info("Probing ports directly.\n");
1439                 return 0;
1440 #endif
1441         }
1442
1443         if (i8042_pnp_kbd_devices)
1444                 snprintf(kbd_irq_str, sizeof(kbd_irq_str),
1445                         "%d", i8042_pnp_kbd_irq);
1446         if (i8042_pnp_aux_devices)
1447                 snprintf(aux_irq_str, sizeof(aux_irq_str),
1448                         "%d", i8042_pnp_aux_irq);
1449
1450         pr_info("PNP: PS/2 Controller [%s%s%s] at %#x,%#x irq %s%s%s\n",
1451                 i8042_pnp_kbd_name, (i8042_pnp_kbd_devices && i8042_pnp_aux_devices) ? "," : "",
1452                 i8042_pnp_aux_name,
1453                 i8042_pnp_data_reg, i8042_pnp_command_reg,
1454                 kbd_irq_str, (i8042_pnp_kbd_devices && i8042_pnp_aux_devices) ? "," : "",
1455                 aux_irq_str);
1456
1457 #if defined(__ia64__)
1458         if (!i8042_pnp_kbd_devices)
1459                 i8042_nokbd = true;
1460         if (!i8042_pnp_aux_devices)
1461                 i8042_noaux = true;
1462 #endif
1463
1464         if (((i8042_pnp_data_reg & ~0xf) == (i8042_data_reg & ~0xf) &&
1465               i8042_pnp_data_reg != i8042_data_reg) ||
1466             !i8042_pnp_data_reg) {
1467                 pr_warn("PNP: PS/2 controller has invalid data port %#x; using default %#x\n",
1468                         i8042_pnp_data_reg, i8042_data_reg);
1469                 i8042_pnp_data_reg = i8042_data_reg;
1470                 pnp_data_busted = true;
1471         }
1472
1473         if (((i8042_pnp_command_reg & ~0xf) == (i8042_command_reg & ~0xf) &&
1474               i8042_pnp_command_reg != i8042_command_reg) ||
1475             !i8042_pnp_command_reg) {
1476                 pr_warn("PNP: PS/2 controller has invalid command port %#x; using default %#x\n",
1477                         i8042_pnp_command_reg, i8042_command_reg);
1478                 i8042_pnp_command_reg = i8042_command_reg;
1479                 pnp_data_busted = true;
1480         }
1481
1482         if (!i8042_nokbd && !i8042_pnp_kbd_irq) {
1483                 pr_warn("PNP: PS/2 controller doesn't have KBD irq; using default %d\n",
1484                         i8042_kbd_irq);
1485                 i8042_pnp_kbd_irq = i8042_kbd_irq;
1486                 pnp_data_busted = true;
1487         }
1488
1489         if (!i8042_noaux && !i8042_pnp_aux_irq) {
1490                 if (!pnp_data_busted && i8042_pnp_kbd_irq) {
1491                         pr_warn("PNP: PS/2 appears to have AUX port disabled, "
1492                                 "if this is incorrect please boot with i8042.nopnp\n");
1493                         i8042_noaux = true;
1494                 } else {
1495                         pr_warn("PNP: PS/2 controller doesn't have AUX irq; using default %d\n",
1496                                 i8042_aux_irq);
1497                         i8042_pnp_aux_irq = i8042_aux_irq;
1498                 }
1499         }
1500
1501         i8042_data_reg = i8042_pnp_data_reg;
1502         i8042_command_reg = i8042_pnp_command_reg;
1503         i8042_kbd_irq = i8042_pnp_kbd_irq;
1504         i8042_aux_irq = i8042_pnp_aux_irq;
1505
1506 #ifdef CONFIG_X86
1507         i8042_bypass_aux_irq_test = !pnp_data_busted &&
1508                                     dmi_check_system(i8042_dmi_laptop_table);
1509 #endif
1510
1511         return 0;
1512 }
1513
1514 #else  /* !CONFIG_PNP */
1515 static inline int i8042_pnp_init(void) { return 0; }
1516 static inline void i8042_pnp_exit(void) { }
1517 #endif /* CONFIG_PNP */
1518
1519
1520 #ifdef CONFIG_X86
1521 static void __init i8042_check_quirks(void)
1522 {
1523         const struct dmi_system_id *device_quirk_info;
1524         uintptr_t quirks;
1525
1526         device_quirk_info = dmi_first_match(i8042_dmi_quirk_table);
1527         if (!device_quirk_info)
1528                 return;
1529
1530         quirks = (uintptr_t)device_quirk_info->driver_data;
1531
1532         if (quirks & SERIO_QUIRK_NOKBD)
1533                 i8042_nokbd = true;
1534         if (quirks & SERIO_QUIRK_NOAUX)
1535                 i8042_noaux = true;
1536         if (quirks & SERIO_QUIRK_NOMUX)
1537                 i8042_nomux = true;
1538         if (quirks & SERIO_QUIRK_FORCEMUX)
1539                 i8042_nomux = false;
1540         if (quirks & SERIO_QUIRK_UNLOCK)
1541                 i8042_unlock = true;
1542         if (quirks & SERIO_QUIRK_PROBE_DEFER)
1543                 i8042_probe_defer = true;
1544         /* Honor module parameter when value is not default */
1545         if (i8042_reset == I8042_RESET_DEFAULT) {
1546                 if (quirks & SERIO_QUIRK_RESET_ALWAYS)
1547                         i8042_reset = I8042_RESET_ALWAYS;
1548                 if (quirks & SERIO_QUIRK_RESET_NEVER)
1549                         i8042_reset = I8042_RESET_NEVER;
1550         }
1551         if (quirks & SERIO_QUIRK_DIECT)
1552                 i8042_direct = true;
1553         if (quirks & SERIO_QUIRK_DUMBKBD)
1554                 i8042_dumbkbd = true;
1555         if (quirks & SERIO_QUIRK_NOLOOP)
1556                 i8042_noloop = true;
1557         if (quirks & SERIO_QUIRK_NOTIMEOUT)
1558                 i8042_notimeout = true;
1559         if (quirks & SERIO_QUIRK_KBDRESET)
1560                 i8042_kbdreset = true;
1561         if (quirks & SERIO_QUIRK_DRITEK)
1562                 i8042_dritek = true;
1563 #ifdef CONFIG_PNP
1564         if (quirks & SERIO_QUIRK_NOPNP)
1565                 i8042_nopnp = true;
1566 #endif
1567 }
1568 #else
1569 static inline void i8042_check_quirks(void) {}
1570 #endif
1571
1572 static int __init i8042_platform_init(void)
1573 {
1574         int retval;
1575
1576 #ifdef CONFIG_X86
1577         u8 a20_on = 0xdf;
1578         /* Just return if platform does not have i8042 controller */
1579         if (x86_platform.legacy.i8042 == X86_LEGACY_I8042_PLATFORM_ABSENT)
1580                 return -ENODEV;
1581 #endif
1582
1583 /*
1584  * On ix86 platforms touching the i8042 data register region can do really
1585  * bad things. Because of this the region is always reserved on ix86 boxes.
1586  *
1587  *      if (!request_region(I8042_DATA_REG, 16, "i8042"))
1588  *              return -EBUSY;
1589  */
1590
1591         i8042_kbd_irq = I8042_MAP_IRQ(1);
1592         i8042_aux_irq = I8042_MAP_IRQ(12);
1593
1594 #if defined(__ia64__)
1595         i8042_reset = I8042_RESET_ALWAYS;
1596 #endif
1597
1598         i8042_check_quirks();
1599
1600         retval = i8042_pnp_init();
1601         if (retval)
1602                 return retval;
1603
1604 #ifdef CONFIG_X86
1605         /*
1606          * A20 was already enabled during early kernel init. But some buggy
1607          * BIOSes (in MSI Laptops) require A20 to be enabled using 8042 to
1608          * resume from S3. So we do it here and hope that nothing breaks.
1609          */
1610         i8042_command(&a20_on, 0x10d1);
1611         i8042_command(NULL, 0x00ff);    /* Null command for SMM firmware */
1612 #endif /* CONFIG_X86 */
1613
1614         return retval;
1615 }
1616
1617 static inline void i8042_platform_exit(void)
1618 {
1619         i8042_pnp_exit();
1620 }
1621
1622 #endif /* _I8042_X86IA64IO_H */