Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 #ifndef _I8042_X86IA64IO_H
0003 #define _I8042_X86IA64IO_H
0004 
0005 
0006 #ifdef CONFIG_X86
0007 #include <asm/x86_init.h>
0008 #endif
0009 
0010 /*
0011  * Names.
0012  */
0013 
0014 #define I8042_KBD_PHYS_DESC "isa0060/serio0"
0015 #define I8042_AUX_PHYS_DESC "isa0060/serio1"
0016 #define I8042_MUX_PHYS_DESC "isa0060/serio%d"
0017 
0018 /*
0019  * IRQs.
0020  */
0021 
0022 #if defined(__ia64__)
0023 # define I8042_MAP_IRQ(x)   isa_irq_to_vector((x))
0024 #else
0025 # define I8042_MAP_IRQ(x)   (x)
0026 #endif
0027 
0028 #define I8042_KBD_IRQ   i8042_kbd_irq
0029 #define I8042_AUX_IRQ   i8042_aux_irq
0030 
0031 static int i8042_kbd_irq;
0032 static int i8042_aux_irq;
0033 
0034 /*
0035  * Register numbers.
0036  */
0037 
0038 #define I8042_COMMAND_REG   i8042_command_reg
0039 #define I8042_STATUS_REG    i8042_command_reg
0040 #define I8042_DATA_REG      i8042_data_reg
0041 
0042 static int i8042_command_reg = 0x64;
0043 static int i8042_data_reg = 0x60;
0044 
0045 
0046 static inline int i8042_read_data(void)
0047 {
0048     return inb(I8042_DATA_REG);
0049 }
0050 
0051 static inline int i8042_read_status(void)
0052 {
0053     return inb(I8042_STATUS_REG);
0054 }
0055 
0056 static inline void i8042_write_data(int val)
0057 {
0058     outb(val, I8042_DATA_REG);
0059 }
0060 
0061 static inline void i8042_write_command(int val)
0062 {
0063     outb(val, I8042_COMMAND_REG);
0064 }
0065 
0066 #ifdef CONFIG_X86
0067 
0068 #include <linux/dmi.h>
0069 
0070 #define SERIO_QUIRK_NOKBD       BIT(0)
0071 #define SERIO_QUIRK_NOAUX       BIT(1)
0072 #define SERIO_QUIRK_NOMUX       BIT(2)
0073 #define SERIO_QUIRK_FORCEMUX        BIT(3)
0074 #define SERIO_QUIRK_UNLOCK      BIT(4)
0075 #define SERIO_QUIRK_PROBE_DEFER     BIT(5)
0076 #define SERIO_QUIRK_RESET_ALWAYS    BIT(6)
0077 #define SERIO_QUIRK_RESET_NEVER     BIT(7)
0078 #define SERIO_QUIRK_DIECT       BIT(8)
0079 #define SERIO_QUIRK_DUMBKBD     BIT(9)
0080 #define SERIO_QUIRK_NOLOOP      BIT(10)
0081 #define SERIO_QUIRK_NOTIMEOUT       BIT(11)
0082 #define SERIO_QUIRK_KBDRESET        BIT(12)
0083 #define SERIO_QUIRK_DRITEK      BIT(13)
0084 #define SERIO_QUIRK_NOPNP       BIT(14)
0085 
0086 /* Quirk table for different mainboards. Options similar or identical to i8042
0087  * module parameters.
0088  * ORDERING IS IMPORTANT! The first match will be apllied and the rest ignored.
0089  * This allows entries to overwrite vendor wide quirks on a per device basis.
0090  * Where this is irrelevant, entries are sorted case sensitive by DMI_SYS_VENDOR
0091  * and/or DMI_BOARD_VENDOR to make it easier to avoid dublicate entries.
0092  */
0093 static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
0094     {
0095         .matches = {
0096             DMI_MATCH(DMI_SYS_VENDOR, "ALIENWARE"),
0097             DMI_MATCH(DMI_PRODUCT_NAME, "Sentia"),
0098         },
0099         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0100     },
0101     {
0102         .matches = {
0103             DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
0104             DMI_MATCH(DMI_PRODUCT_NAME, "X750LN"),
0105         },
0106         .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
0107     },
0108     {
0109         /* Asus X450LCP */
0110         .matches = {
0111             DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
0112             DMI_MATCH(DMI_PRODUCT_NAME, "X450LCP"),
0113         },
0114         .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_NEVER)
0115     },
0116     {
0117         /* ASUS ZenBook UX425UA */
0118         .matches = {
0119             DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
0120             DMI_MATCH(DMI_PRODUCT_NAME, "ZenBook UX425UA"),
0121         },
0122         .driver_data = (void *)(SERIO_QUIRK_PROBE_DEFER | SERIO_QUIRK_RESET_NEVER)
0123     },
0124     {
0125         /* ASUS ZenBook UM325UA */
0126         .matches = {
0127             DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
0128             DMI_MATCH(DMI_PRODUCT_NAME, "ZenBook UX325UA_UM325UA"),
0129         },
0130         .driver_data = (void *)(SERIO_QUIRK_PROBE_DEFER | SERIO_QUIRK_RESET_NEVER)
0131     },
0132     /*
0133      * On some Asus laptops, just running self tests cause problems.
0134      */
0135     {
0136         .matches = {
0137             DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
0138             DMI_MATCH(DMI_CHASSIS_TYPE, "10"), /* Notebook */
0139         },
0140         .driver_data = (void *)(SERIO_QUIRK_RESET_NEVER)
0141     },
0142     {
0143         .matches = {
0144             DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
0145             DMI_MATCH(DMI_CHASSIS_TYPE, "31"), /* Convertible Notebook */
0146         },
0147         .driver_data = (void *)(SERIO_QUIRK_RESET_NEVER)
0148     },
0149     {
0150         /* ASUS P65UP5 - AUX LOOP command does not raise AUX IRQ */
0151         .matches = {
0152             DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
0153             DMI_MATCH(DMI_BOARD_NAME, "P/I-P65UP5"),
0154             DMI_MATCH(DMI_BOARD_VERSION, "REV 2.X"),
0155         },
0156         .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
0157     },
0158     {
0159         /* ASUS G1S */
0160         .matches = {
0161             DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer Inc."),
0162             DMI_MATCH(DMI_BOARD_NAME, "G1S"),
0163             DMI_MATCH(DMI_BOARD_VERSION, "1.0"),
0164         },
0165         .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
0166     },
0167     {
0168         .matches = {
0169             DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
0170             DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 1360"),
0171         },
0172         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0173     },
0174     {
0175         /* Acer Aspire 5710 */
0176         .matches = {
0177             DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
0178             DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5710"),
0179         },
0180         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0181     },
0182     {
0183         /* Acer Aspire 7738 */
0184         .matches = {
0185             DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
0186             DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 7738"),
0187         },
0188         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0189     },
0190     {
0191         /* Acer Aspire 5536 */
0192         .matches = {
0193             DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
0194             DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5536"),
0195             DMI_MATCH(DMI_PRODUCT_VERSION, "0100"),
0196         },
0197         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0198     },
0199     {
0200         /*
0201          * Acer Aspire 5738z
0202          * Touchpad stops working in mux mode when dis- + re-enabled
0203          * with the touchpad enable/disable toggle hotkey
0204          */
0205         .matches = {
0206             DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
0207             DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5738"),
0208         },
0209         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0210     },
0211     {
0212         /* Acer Aspire One 150 */
0213         .matches = {
0214             DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
0215             DMI_MATCH(DMI_PRODUCT_NAME, "AOA150"),
0216         },
0217         .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
0218     },
0219     {
0220         /* Acer Aspire One 532h */
0221         .matches = {
0222             DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
0223             DMI_MATCH(DMI_PRODUCT_NAME, "AO532h"),
0224         },
0225         .driver_data = (void *)(SERIO_QUIRK_DRITEK)
0226     },
0227     {
0228         .matches = {
0229             DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
0230             DMI_MATCH(DMI_PRODUCT_NAME, "Aspire A114-31"),
0231         },
0232         .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
0233     },
0234     {
0235         .matches = {
0236             DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
0237             DMI_MATCH(DMI_PRODUCT_NAME, "Aspire A314-31"),
0238         },
0239         .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
0240     },
0241     {
0242         .matches = {
0243             DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
0244             DMI_MATCH(DMI_PRODUCT_NAME, "Aspire A315-31"),
0245         },
0246         .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
0247     },
0248     {
0249         .matches = {
0250             DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
0251             DMI_MATCH(DMI_PRODUCT_NAME, "Aspire ES1-132"),
0252         },
0253         .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
0254     },
0255     {
0256         .matches = {
0257             DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
0258             DMI_MATCH(DMI_PRODUCT_NAME, "Aspire ES1-332"),
0259         },
0260         .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
0261     },
0262     {
0263         .matches = {
0264             DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
0265             DMI_MATCH(DMI_PRODUCT_NAME, "Aspire ES1-432"),
0266         },
0267         .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
0268     },
0269     {
0270         .matches = {
0271             DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
0272             DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate Spin B118-RN"),
0273         },
0274         .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
0275     },
0276     /*
0277      * Some Wistron based laptops need us to explicitly enable the 'Dritek
0278      * keyboard extension' to make their extra keys start generating scancodes.
0279      * Originally, this was just confined to older laptops, but a few Acer laptops
0280      * have turned up in 2007 that also need this again.
0281      */
0282     {
0283         /* Acer Aspire 5100 */
0284         .matches = {
0285             DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
0286             DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5100"),
0287         },
0288         .driver_data = (void *)(SERIO_QUIRK_DRITEK)
0289     },
0290     {
0291         /* Acer Aspire 5610 */
0292         .matches = {
0293             DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
0294             DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5610"),
0295         },
0296         .driver_data = (void *)(SERIO_QUIRK_DRITEK)
0297     },
0298     {
0299         /* Acer Aspire 5630 */
0300         .matches = {
0301             DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
0302             DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5630"),
0303         },
0304         .driver_data = (void *)(SERIO_QUIRK_DRITEK)
0305     },
0306     {
0307         /* Acer Aspire 5650 */
0308         .matches = {
0309             DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
0310             DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5650"),
0311         },
0312         .driver_data = (void *)(SERIO_QUIRK_DRITEK)
0313     },
0314     {
0315         /* Acer Aspire 5680 */
0316         .matches = {
0317             DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
0318             DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5680"),
0319         },
0320         .driver_data = (void *)(SERIO_QUIRK_DRITEK)
0321     },
0322     {
0323         /* Acer Aspire 5720 */
0324         .matches = {
0325             DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
0326             DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5720"),
0327         },
0328         .driver_data = (void *)(SERIO_QUIRK_DRITEK)
0329     },
0330     {
0331         /* Acer Aspire 9110 */
0332         .matches = {
0333             DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
0334             DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 9110"),
0335         },
0336         .driver_data = (void *)(SERIO_QUIRK_DRITEK)
0337     },
0338     {
0339         /* Acer TravelMate 660 */
0340         .matches = {
0341             DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
0342             DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 660"),
0343         },
0344         .driver_data = (void *)(SERIO_QUIRK_DRITEK)
0345     },
0346     {
0347         /* Acer TravelMate 2490 */
0348         .matches = {
0349             DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
0350             DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 2490"),
0351         },
0352         .driver_data = (void *)(SERIO_QUIRK_DRITEK)
0353     },
0354     {
0355         /* Acer TravelMate 4280 */
0356         .matches = {
0357             DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
0358             DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 4280"),
0359         },
0360         .driver_data = (void *)(SERIO_QUIRK_DRITEK)
0361     },
0362     {
0363         /* Amoi M636/A737 */
0364         .matches = {
0365             DMI_MATCH(DMI_SYS_VENDOR, "Amoi Electronics CO.,LTD."),
0366             DMI_MATCH(DMI_PRODUCT_NAME, "M636/A737 platform"),
0367         },
0368         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0369     },
0370     {
0371         .matches = {
0372             DMI_MATCH(DMI_SYS_VENDOR, "ByteSpeed LLC"),
0373             DMI_MATCH(DMI_PRODUCT_NAME, "ByteSpeed Laptop C15B"),
0374         },
0375         .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
0376     },
0377     {
0378         /* Compal HEL80I */
0379         .matches = {
0380             DMI_MATCH(DMI_SYS_VENDOR, "COMPAL"),
0381             DMI_MATCH(DMI_PRODUCT_NAME, "HEL80I"),
0382         },
0383         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0384     },
0385     {
0386         .matches = {
0387             DMI_MATCH(DMI_SYS_VENDOR, "Compaq"),
0388             DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant"),
0389             DMI_MATCH(DMI_PRODUCT_VERSION, "8500"),
0390         },
0391         .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
0392     },
0393     {
0394         .matches = {
0395             DMI_MATCH(DMI_SYS_VENDOR, "Compaq"),
0396             DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant"),
0397             DMI_MATCH(DMI_PRODUCT_VERSION, "DL760"),
0398         },
0399         .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
0400     },
0401     {
0402         /* Advent 4211 */
0403         .matches = {
0404             DMI_MATCH(DMI_SYS_VENDOR, "DIXONSXP"),
0405             DMI_MATCH(DMI_PRODUCT_NAME, "Advent 4211"),
0406         },
0407         .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
0408     },
0409     {
0410         /* Dell Embedded Box PC 3000 */
0411         .matches = {
0412             DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
0413             DMI_MATCH(DMI_PRODUCT_NAME, "Embedded Box PC 3000"),
0414         },
0415         .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
0416     },
0417     {
0418         /* Dell XPS M1530 */
0419         .matches = {
0420             DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
0421             DMI_MATCH(DMI_PRODUCT_NAME, "XPS M1530"),
0422         },
0423         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0424     },
0425     {
0426         /* Dell Vostro 1510 */
0427         .matches = {
0428             DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
0429             DMI_MATCH(DMI_PRODUCT_NAME, "Vostro1510"),
0430         },
0431         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0432     },
0433     {
0434         /* Dell Vostro V13 */
0435         .matches = {
0436             DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
0437             DMI_MATCH(DMI_PRODUCT_NAME, "Vostro V13"),
0438         },
0439         .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_NOTIMEOUT)
0440     },
0441     {
0442         /* Dell Vostro 1320 */
0443         .matches = {
0444             DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
0445             DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 1320"),
0446         },
0447         .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
0448     },
0449     {
0450         /* Dell Vostro 1520 */
0451         .matches = {
0452             DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
0453             DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 1520"),
0454         },
0455         .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
0456     },
0457     {
0458         /* Dell Vostro 1720 */
0459         .matches = {
0460             DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
0461             DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 1720"),
0462         },
0463         .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
0464     },
0465     {
0466         /* Entroware Proteus */
0467         .matches = {
0468             DMI_MATCH(DMI_SYS_VENDOR, "Entroware"),
0469             DMI_MATCH(DMI_PRODUCT_NAME, "Proteus"),
0470             DMI_MATCH(DMI_PRODUCT_VERSION, "EL07R4"),
0471         },
0472         .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS)
0473     },
0474     /*
0475      * Some Fujitsu notebooks are having trouble with touchpads if
0476      * active multiplexing mode is activated. Luckily they don't have
0477      * external PS/2 ports so we can safely disable it.
0478      * ... apparently some Toshibas don't like MUX mode either and
0479      * die horrible death on reboot.
0480      */
0481     {
0482         /* Fujitsu Lifebook P7010/P7010D */
0483         .matches = {
0484             DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
0485             DMI_MATCH(DMI_PRODUCT_NAME, "P7010"),
0486         },
0487         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0488     },
0489     {
0490         /* Fujitsu Lifebook P5020D */
0491         .matches = {
0492             DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
0493             DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook P Series"),
0494         },
0495         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0496     },
0497     {
0498         /* Fujitsu Lifebook S2000 */
0499         .matches = {
0500             DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
0501             DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook S Series"),
0502         },
0503         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0504     },
0505     {
0506         /* Fujitsu Lifebook S6230 */
0507         .matches = {
0508             DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
0509             DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook S6230"),
0510         },
0511         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0512     },
0513     {
0514         /* Fujitsu Lifebook T725 laptop */
0515         .matches = {
0516             DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
0517             DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK T725"),
0518         },
0519         .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_NOTIMEOUT)
0520     },
0521     {
0522         /* Fujitsu Lifebook U745 */
0523         .matches = {
0524             DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
0525             DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK U745"),
0526         },
0527         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0528     },
0529     {
0530         /* Fujitsu T70H */
0531         .matches = {
0532             DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
0533             DMI_MATCH(DMI_PRODUCT_NAME, "FMVLT70H"),
0534         },
0535         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0536     },
0537     {
0538         /* Fujitsu A544 laptop */
0539         /* https://bugzilla.redhat.com/show_bug.cgi?id=1111138 */
0540         .matches = {
0541             DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
0542             DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK A544"),
0543         },
0544         .driver_data = (void *)(SERIO_QUIRK_NOTIMEOUT)
0545     },
0546     {
0547         /* Fujitsu AH544 laptop */
0548         /* https://bugzilla.kernel.org/show_bug.cgi?id=69731 */
0549         .matches = {
0550             DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
0551             DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK AH544"),
0552         },
0553         .driver_data = (void *)(SERIO_QUIRK_NOTIMEOUT)
0554     },
0555     {
0556         /* Fujitsu U574 laptop */
0557         /* https://bugzilla.kernel.org/show_bug.cgi?id=69731 */
0558         .matches = {
0559             DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
0560             DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK U574"),
0561         },
0562         .driver_data = (void *)(SERIO_QUIRK_NOTIMEOUT)
0563     },
0564     {
0565         /* Fujitsu UH554 laptop */
0566         .matches = {
0567             DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
0568             DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK UH544"),
0569         },
0570         .driver_data = (void *)(SERIO_QUIRK_NOTIMEOUT)
0571     },
0572     {
0573         /* Fujitsu Lifebook P7010 */
0574         .matches = {
0575             DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
0576             DMI_MATCH(DMI_PRODUCT_NAME, "0000000000"),
0577         },
0578         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0579     },
0580     {
0581         /* Fujitsu-Siemens Lifebook T3010 */
0582         .matches = {
0583             DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
0584             DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK T3010"),
0585         },
0586         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0587     },
0588     {
0589         /* Fujitsu-Siemens Lifebook E4010 */
0590         .matches = {
0591             DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
0592             DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK E4010"),
0593         },
0594         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0595     },
0596     {
0597         /* Fujitsu-Siemens Amilo Pro 2010 */
0598         .matches = {
0599             DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
0600             DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pro V2010"),
0601         },
0602         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0603     },
0604     {
0605         /* Fujitsu-Siemens Amilo Pro 2030 */
0606         .matches = {
0607             DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
0608             DMI_MATCH(DMI_PRODUCT_NAME, "AMILO PRO V2030"),
0609         },
0610         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0611     },
0612     {
0613         /* Gigabyte M912 */
0614         .matches = {
0615             DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
0616             DMI_MATCH(DMI_PRODUCT_NAME, "M912"),
0617             DMI_MATCH(DMI_PRODUCT_VERSION, "01"),
0618         },
0619         .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
0620     },
0621     {
0622         /* Gigabyte Spring Peak - defines wrong chassis type */
0623         .matches = {
0624             DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
0625             DMI_MATCH(DMI_PRODUCT_NAME, "Spring Peak"),
0626         },
0627         .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
0628     },
0629     {
0630         /* Gigabyte T1005 - defines wrong chassis type ("Other") */
0631         .matches = {
0632             DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
0633             DMI_MATCH(DMI_PRODUCT_NAME, "T1005"),
0634         },
0635         .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
0636     },
0637     {
0638         /* Gigabyte T1005M/P - defines wrong chassis type ("Other") */
0639         .matches = {
0640             DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
0641             DMI_MATCH(DMI_PRODUCT_NAME, "T1005M/P"),
0642         },
0643         .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
0644     },
0645     /*
0646      * Some laptops need keyboard reset before probing for the trackpad to get
0647      * it detected, initialised & finally work.
0648      */
0649     {
0650         /* Gigabyte P35 v2 - Elantech touchpad */
0651         .matches = {
0652             DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
0653             DMI_MATCH(DMI_PRODUCT_NAME, "P35V2"),
0654         },
0655         .driver_data = (void *)(SERIO_QUIRK_KBDRESET)
0656     },
0657         {
0658         /* Aorus branded Gigabyte X3 Plus - Elantech touchpad */
0659         .matches = {
0660             DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
0661             DMI_MATCH(DMI_PRODUCT_NAME, "X3"),
0662         },
0663         .driver_data = (void *)(SERIO_QUIRK_KBDRESET)
0664     },
0665     {
0666         /* Gigabyte P34 - Elantech touchpad */
0667         .matches = {
0668             DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
0669             DMI_MATCH(DMI_PRODUCT_NAME, "P34"),
0670         },
0671         .driver_data = (void *)(SERIO_QUIRK_KBDRESET)
0672     },
0673     {
0674         /* Gigabyte P57 - Elantech touchpad */
0675         .matches = {
0676             DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
0677             DMI_MATCH(DMI_PRODUCT_NAME, "P57"),
0678         },
0679         .driver_data = (void *)(SERIO_QUIRK_KBDRESET)
0680     },
0681     {
0682         /* Gericom Bellagio */
0683         .matches = {
0684             DMI_MATCH(DMI_SYS_VENDOR, "Gericom"),
0685             DMI_MATCH(DMI_PRODUCT_NAME, "N34AS6"),
0686         },
0687         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0688     },
0689     {
0690         /* Gigabyte M1022M netbook */
0691         .matches = {
0692             DMI_MATCH(DMI_BOARD_VENDOR, "Gigabyte Technology Co.,Ltd."),
0693             DMI_MATCH(DMI_BOARD_NAME, "M1022E"),
0694             DMI_MATCH(DMI_BOARD_VERSION, "1.02"),
0695         },
0696         .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
0697     },
0698     {
0699         .matches = {
0700             DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
0701             DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv9700"),
0702             DMI_MATCH(DMI_PRODUCT_VERSION, "Rev 1"),
0703         },
0704         .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
0705     },
0706     {
0707         /*
0708          * HP Pavilion DV4017EA -
0709          * errors on MUX ports are reported without raising AUXDATA
0710          * causing "spurious NAK" messages.
0711          */
0712         .matches = {
0713             DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
0714             DMI_MATCH(DMI_PRODUCT_NAME, "Pavilion dv4000 (EA032EA#ABF)"),
0715         },
0716         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0717     },
0718     {
0719         /*
0720          * HP Pavilion ZT1000 -
0721          * like DV4017EA does not raise AUXERR for errors on MUX ports.
0722          */
0723         .matches = {
0724             DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
0725             DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion Notebook PC"),
0726             DMI_MATCH(DMI_PRODUCT_VERSION, "HP Pavilion Notebook ZT1000"),
0727         },
0728         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0729     },
0730     {
0731         /*
0732          * HP Pavilion DV4270ca -
0733          * like DV4017EA does not raise AUXERR for errors on MUX ports.
0734          */
0735         .matches = {
0736             DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
0737             DMI_MATCH(DMI_PRODUCT_NAME, "Pavilion dv4000 (EH476UA#ABL)"),
0738         },
0739         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0740     },
0741     {
0742         /* Newer HP Pavilion dv4 models */
0743         .matches = {
0744             DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
0745             DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv4 Notebook PC"),
0746         },
0747         .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_NOTIMEOUT)
0748     },
0749     {
0750         /* IBM 2656 */
0751         .matches = {
0752             DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
0753             DMI_MATCH(DMI_PRODUCT_NAME, "2656"),
0754         },
0755         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0756     },
0757     {
0758         /* Avatar AVIU-145A6 */
0759         .matches = {
0760             DMI_MATCH(DMI_SYS_VENDOR, "Intel"),
0761             DMI_MATCH(DMI_PRODUCT_NAME, "IC4I"),
0762         },
0763         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0764     },
0765     {
0766         /* Intel MBO Desktop D845PESV */
0767         .matches = {
0768             DMI_MATCH(DMI_BOARD_VENDOR, "Intel Corporation"),
0769             DMI_MATCH(DMI_BOARD_NAME, "D845PESV"),
0770         },
0771         .driver_data = (void *)(SERIO_QUIRK_NOPNP)
0772     },
0773     {
0774         /*
0775          * Intel NUC D54250WYK - does not have i8042 controller but
0776          * declares PS/2 devices in DSDT.
0777          */
0778         .matches = {
0779             DMI_MATCH(DMI_BOARD_VENDOR, "Intel Corporation"),
0780             DMI_MATCH(DMI_BOARD_NAME, "D54250WYK"),
0781         },
0782         .driver_data = (void *)(SERIO_QUIRK_NOPNP)
0783     },
0784     {
0785         /* Lenovo 3000 n100 */
0786         .matches = {
0787             DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
0788             DMI_MATCH(DMI_PRODUCT_NAME, "076804U"),
0789         },
0790         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0791     },
0792     {
0793         /* Lenovo XiaoXin Air 12 */
0794         .matches = {
0795             DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
0796             DMI_MATCH(DMI_PRODUCT_NAME, "80UN"),
0797         },
0798         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0799     },
0800     {
0801         /* Lenovo LaVie Z */
0802         .matches = {
0803             DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
0804             DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo LaVie Z"),
0805         },
0806         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0807     },
0808     {
0809         /* Lenovo Ideapad U455 */
0810         .matches = {
0811             DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
0812             DMI_MATCH(DMI_PRODUCT_NAME, "20046"),
0813         },
0814         .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
0815     },
0816     {
0817         /* Lenovo ThinkPad L460 */
0818         .matches = {
0819             DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
0820             DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad L460"),
0821         },
0822         .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
0823     },
0824     {
0825         /* Lenovo ThinkPad Twist S230u */
0826         .matches = {
0827             DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
0828             DMI_MATCH(DMI_PRODUCT_NAME, "33474HU"),
0829         },
0830         .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
0831     },
0832     {
0833         /* LG Electronics X110 */
0834         .matches = {
0835             DMI_MATCH(DMI_BOARD_VENDOR, "LG Electronics Inc."),
0836             DMI_MATCH(DMI_BOARD_NAME, "X110"),
0837         },
0838         .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
0839     },
0840     {
0841         /* Medion Akoya Mini E1210 */
0842         .matches = {
0843             DMI_MATCH(DMI_SYS_VENDOR, "MEDION"),
0844             DMI_MATCH(DMI_PRODUCT_NAME, "E1210"),
0845         },
0846         .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
0847     },
0848     {
0849         /* Medion Akoya E1222 */
0850         .matches = {
0851             DMI_MATCH(DMI_SYS_VENDOR, "MEDION"),
0852             DMI_MATCH(DMI_PRODUCT_NAME, "E122X"),
0853         },
0854         .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
0855     },
0856     {
0857         /* MSI Wind U-100 */
0858         .matches = {
0859             DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"),
0860             DMI_MATCH(DMI_BOARD_NAME, "U-100"),
0861         },
0862         .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS | SERIO_QUIRK_NOPNP)
0863     },
0864     {
0865         /*
0866          * No data is coming from the touchscreen unless KBC
0867          * is in legacy mode.
0868          */
0869         /* Panasonic CF-29 */
0870         .matches = {
0871             DMI_MATCH(DMI_SYS_VENDOR, "Matsushita"),
0872             DMI_MATCH(DMI_PRODUCT_NAME, "CF-29"),
0873         },
0874         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0875     },
0876     {
0877         /* Medion Akoya E7225 */
0878         .matches = {
0879             DMI_MATCH(DMI_SYS_VENDOR, "Medion"),
0880             DMI_MATCH(DMI_PRODUCT_NAME, "Akoya E7225"),
0881             DMI_MATCH(DMI_PRODUCT_VERSION, "1.0"),
0882         },
0883         .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
0884     },
0885     {
0886         /* Microsoft Virtual Machine */
0887         .matches = {
0888             DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
0889             DMI_MATCH(DMI_PRODUCT_NAME, "Virtual Machine"),
0890             DMI_MATCH(DMI_PRODUCT_VERSION, "VS2005R2"),
0891         },
0892         .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
0893     },
0894     {
0895         /* Medion MAM 2070 */
0896         .matches = {
0897             DMI_MATCH(DMI_SYS_VENDOR, "Notebook"),
0898             DMI_MATCH(DMI_PRODUCT_NAME, "MAM 2070"),
0899             DMI_MATCH(DMI_PRODUCT_VERSION, "5a"),
0900         },
0901         .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
0902     },
0903     {
0904         /* TUXEDO BU1406 */
0905         .matches = {
0906             DMI_MATCH(DMI_SYS_VENDOR, "Notebook"),
0907             DMI_MATCH(DMI_PRODUCT_NAME, "N24_25BU"),
0908         },
0909         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0910     },
0911     {
0912         /* OQO Model 01 */
0913         .matches = {
0914             DMI_MATCH(DMI_SYS_VENDOR, "OQO"),
0915             DMI_MATCH(DMI_PRODUCT_NAME, "ZEPTO"),
0916             DMI_MATCH(DMI_PRODUCT_VERSION, "00"),
0917         },
0918         .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
0919     },
0920     {
0921         .matches = {
0922             DMI_MATCH(DMI_SYS_VENDOR, "PEGATRON CORPORATION"),
0923             DMI_MATCH(DMI_PRODUCT_NAME, "C15B"),
0924         },
0925         .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
0926     },
0927     {
0928         /* Acer Aspire 5 A515 */
0929         .matches = {
0930             DMI_MATCH(DMI_BOARD_VENDOR, "PK"),
0931             DMI_MATCH(DMI_BOARD_NAME, "Grumpy_PK"),
0932         },
0933         .driver_data = (void *)(SERIO_QUIRK_NOPNP)
0934     },
0935     {
0936         /* ULI EV4873 - AUX LOOP does not work properly */
0937         .matches = {
0938             DMI_MATCH(DMI_SYS_VENDOR, "ULI"),
0939             DMI_MATCH(DMI_PRODUCT_NAME, "EV4873"),
0940             DMI_MATCH(DMI_PRODUCT_VERSION, "5a"),
0941         },
0942         .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
0943     },
0944     {
0945         /*
0946          * Arima-Rioworks HDAMB -
0947          * AUX LOOP command does not raise AUX IRQ
0948          */
0949         .matches = {
0950             DMI_MATCH(DMI_BOARD_VENDOR, "RIOWORKS"),
0951             DMI_MATCH(DMI_BOARD_NAME, "HDAMB"),
0952             DMI_MATCH(DMI_BOARD_VERSION, "Rev E"),
0953         },
0954         .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
0955     },
0956     {
0957         /* Sharp Actius MM20 */
0958         .matches = {
0959             DMI_MATCH(DMI_SYS_VENDOR, "SHARP"),
0960             DMI_MATCH(DMI_PRODUCT_NAME, "PC-MM20 Series"),
0961         },
0962         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0963     },
0964     {
0965         /*
0966          * Sony Vaio FZ-240E -
0967          * reset and GET ID commands issued via KBD port are
0968          * sometimes being delivered to AUX3.
0969          */
0970         .matches = {
0971             DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
0972             DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FZ240E"),
0973         },
0974         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0975     },
0976     {
0977         /*
0978          * Most (all?) VAIOs do not have external PS/2 ports nor
0979          * they implement active multiplexing properly, and
0980          * MUX discovery usually messes up keyboard/touchpad.
0981          */
0982         .matches = {
0983             DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
0984             DMI_MATCH(DMI_BOARD_NAME, "VAIO"),
0985         },
0986         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0987     },
0988     {
0989         /* Sony Vaio FS-115b */
0990         .matches = {
0991             DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
0992             DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FS115B"),
0993         },
0994         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
0995     },
0996     {
0997         /*
0998          * Sony Vaio VGN-CS series require MUX or the touch sensor
0999          * buttons will disturb touchpad operation
1000          */
1001         .matches = {
1002             DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
1003             DMI_MATCH(DMI_PRODUCT_NAME, "VGN-CS"),
1004         },
1005         .driver_data = (void *)(SERIO_QUIRK_FORCEMUX)
1006     },
1007     {
1008         .matches = {
1009             DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
1010             DMI_MATCH(DMI_PRODUCT_NAME, "Satellite P10"),
1011         },
1012         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
1013     },
1014     {
1015         .matches = {
1016             DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
1017             DMI_MATCH(DMI_PRODUCT_NAME, "EQUIUM A110"),
1018         },
1019         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
1020     },
1021     {
1022         .matches = {
1023             DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
1024             DMI_MATCH(DMI_PRODUCT_NAME, "SATELLITE C850D"),
1025         },
1026         .driver_data = (void *)(SERIO_QUIRK_NOMUX)
1027     },
1028     /*
1029      * A lot of modern Clevo barebones have touchpad and/or keyboard issues
1030      * after suspend fixable with nomux + reset + noloop + nopnp. Luckily,
1031      * none of them have an external PS/2 port so this can safely be set for
1032      * all of them. These two are based on a Clevo design, but have the
1033      * board_name changed.
1034      */
1035     {
1036         .matches = {
1037             DMI_MATCH(DMI_BOARD_VENDOR, "TUXEDO"),
1038             DMI_MATCH(DMI_BOARD_NAME, "AURA1501"),
1039         },
1040         .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1041                     SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1042     },
1043     {
1044         .matches = {
1045             DMI_MATCH(DMI_BOARD_VENDOR, "TUXEDO"),
1046             DMI_MATCH(DMI_BOARD_NAME, "EDUBOOK1502"),
1047         },
1048         .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1049                     SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1050     },
1051     {
1052         /* Mivvy M310 */
1053         .matches = {
1054             DMI_MATCH(DMI_SYS_VENDOR, "VIOOO"),
1055             DMI_MATCH(DMI_PRODUCT_NAME, "N10"),
1056         },
1057         .driver_data = (void *)(SERIO_QUIRK_RESET_ALWAYS)
1058     },
1059     /*
1060      * Some laptops need keyboard reset before probing for the trackpad to get
1061      * it detected, initialised & finally work.
1062      */
1063     {
1064         /* Schenker XMG C504 - Elantech touchpad */
1065         .matches = {
1066             DMI_MATCH(DMI_SYS_VENDOR, "XMG"),
1067             DMI_MATCH(DMI_PRODUCT_NAME, "C504"),
1068         },
1069         .driver_data = (void *)(SERIO_QUIRK_KBDRESET)
1070     },
1071     {
1072         /* Blue FB5601 */
1073         .matches = {
1074             DMI_MATCH(DMI_SYS_VENDOR, "blue"),
1075             DMI_MATCH(DMI_PRODUCT_NAME, "FB5601"),
1076             DMI_MATCH(DMI_PRODUCT_VERSION, "M606"),
1077         },
1078         .driver_data = (void *)(SERIO_QUIRK_NOLOOP)
1079     },
1080     /*
1081      * A lot of modern Clevo barebones have touchpad and/or keyboard issues
1082      * after suspend fixable with nomux + reset + noloop + nopnp. Luckily,
1083      * none of them have an external PS/2 port so this can safely be set for
1084      * all of them.
1085      * Clevo barebones come with board_vendor and/or system_vendor set to
1086      * either the very generic string "Notebook" and/or a different value
1087      * for each individual reseller. The only somewhat universal way to
1088      * identify them is by board_name.
1089      */
1090     {
1091         .matches = {
1092             DMI_MATCH(DMI_BOARD_NAME, "LAPQC71A"),
1093         },
1094         .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1095                     SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1096     },
1097     {
1098         .matches = {
1099             DMI_MATCH(DMI_BOARD_NAME, "LAPQC71B"),
1100         },
1101         .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1102                     SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1103     },
1104     {
1105         .matches = {
1106             DMI_MATCH(DMI_BOARD_NAME, "N140CU"),
1107         },
1108         .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1109                     SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1110     },
1111     {
1112         .matches = {
1113             DMI_MATCH(DMI_BOARD_NAME, "N141CU"),
1114         },
1115         .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1116                     SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1117     },
1118     {
1119         .matches = {
1120             DMI_MATCH(DMI_BOARD_NAME, "NH5xAx"),
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, "NL5xRU"),
1128         },
1129         .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1130                     SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1131     },
1132     /*
1133      * At least one modern Clevo barebone has the touchpad connected both
1134      * via PS/2 and i2c interface. This causes a race condition between the
1135      * psmouse and i2c-hid driver. Since the full capability of the touchpad
1136      * is available via the i2c interface and the device has no external
1137      * PS/2 port, it is safe to just ignore all ps2 mouses here to avoid
1138      * this issue. The known affected device is the
1139      * TUXEDO InfinityBook S17 Gen6 / Clevo NS70MU which comes with one of
1140      * the two different dmi strings below. NS50MU is not a typo!
1141      */
1142     {
1143         .matches = {
1144             DMI_MATCH(DMI_BOARD_NAME, "NS50MU"),
1145         },
1146         .driver_data = (void *)(SERIO_QUIRK_NOAUX | SERIO_QUIRK_NOMUX |
1147                     SERIO_QUIRK_RESET_ALWAYS | SERIO_QUIRK_NOLOOP |
1148                     SERIO_QUIRK_NOPNP)
1149     },
1150     {
1151         .matches = {
1152             DMI_MATCH(DMI_BOARD_NAME, "NS50_70MU"),
1153         },
1154         .driver_data = (void *)(SERIO_QUIRK_NOAUX | SERIO_QUIRK_NOMUX |
1155                     SERIO_QUIRK_RESET_ALWAYS | SERIO_QUIRK_NOLOOP |
1156                     SERIO_QUIRK_NOPNP)
1157     },
1158     {
1159         .matches = {
1160             DMI_MATCH(DMI_BOARD_NAME, "NJ50_70CU"),
1161         },
1162         .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1163                     SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1164     },
1165     {
1166         /*
1167          * This is only a partial board_name and might be followed by
1168          * another letter or number. DMI_MATCH however does do partial
1169          * matching.
1170          */
1171         .matches = {
1172             DMI_MATCH(DMI_PRODUCT_NAME, "P65xH"),
1173         },
1174         .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1175                     SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1176     },
1177     {
1178         /* Clevo P650RS, 650RP6, Sager NP8152-S, and others */
1179         .matches = {
1180             DMI_MATCH(DMI_PRODUCT_NAME, "P65xRP"),
1181         },
1182         .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1183                     SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1184     },
1185     {
1186         /*
1187          * This is only a partial board_name and might be followed by
1188          * another letter or number. DMI_MATCH however does do partial
1189          * matching.
1190          */
1191         .matches = {
1192             DMI_MATCH(DMI_PRODUCT_NAME, "P65_P67H"),
1193         },
1194         .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1195                     SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1196     },
1197     {
1198         /*
1199          * This is only a partial board_name and might be followed by
1200          * another letter or number. DMI_MATCH however does do partial
1201          * matching.
1202          */
1203         .matches = {
1204             DMI_MATCH(DMI_PRODUCT_NAME, "P65_67RP"),
1205         },
1206         .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1207                     SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1208     },
1209     {
1210         /*
1211          * This is only a partial board_name and might be followed by
1212          * another letter or number. DMI_MATCH however does do partial
1213          * matching.
1214          */
1215         .matches = {
1216             DMI_MATCH(DMI_PRODUCT_NAME, "P65_67RS"),
1217         },
1218         .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1219                     SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1220     },
1221     {
1222         /*
1223          * This is only a partial board_name and might be followed by
1224          * another letter or number. DMI_MATCH however does do partial
1225          * matching.
1226          */
1227         .matches = {
1228             DMI_MATCH(DMI_PRODUCT_NAME, "P67xRP"),
1229         },
1230         .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1231                     SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1232     },
1233     {
1234         .matches = {
1235             DMI_MATCH(DMI_BOARD_NAME, "PB50_70DFx,DDx"),
1236         },
1237         .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1238                     SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1239     },
1240     {
1241         .matches = {
1242             DMI_MATCH(DMI_BOARD_NAME, "X170SM"),
1243         },
1244         .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1245                     SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1246     },
1247     {
1248         .matches = {
1249             DMI_MATCH(DMI_BOARD_NAME, "X170KM-G"),
1250         },
1251         .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
1252                     SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
1253     },
1254     { }
1255 };
1256 
1257 #ifdef CONFIG_PNP
1258 static const struct dmi_system_id i8042_dmi_laptop_table[] __initconst = {
1259     {
1260         .matches = {
1261             DMI_MATCH(DMI_CHASSIS_TYPE, "8"), /* Portable */
1262         },
1263     },
1264     {
1265         .matches = {
1266             DMI_MATCH(DMI_CHASSIS_TYPE, "9"), /* Laptop */
1267         },
1268     },
1269     {
1270         .matches = {
1271             DMI_MATCH(DMI_CHASSIS_TYPE, "10"), /* Notebook */
1272         },
1273     },
1274     {
1275         .matches = {
1276             DMI_MATCH(DMI_CHASSIS_TYPE, "14"), /* Sub-Notebook */
1277         },
1278     },
1279     { }
1280 };
1281 #endif
1282 
1283 #endif /* CONFIG_X86 */
1284 
1285 #ifdef CONFIG_PNP
1286 #include <linux/pnp.h>
1287 
1288 static bool i8042_pnp_kbd_registered;
1289 static unsigned int i8042_pnp_kbd_devices;
1290 static bool i8042_pnp_aux_registered;
1291 static unsigned int i8042_pnp_aux_devices;
1292 
1293 static int i8042_pnp_command_reg;
1294 static int i8042_pnp_data_reg;
1295 static int i8042_pnp_kbd_irq;
1296 static int i8042_pnp_aux_irq;
1297 
1298 static char i8042_pnp_kbd_name[32];
1299 static char i8042_pnp_aux_name[32];
1300 
1301 static void i8042_pnp_id_to_string(struct pnp_id *id, char *dst, int dst_size)
1302 {
1303     strlcpy(dst, "PNP:", dst_size);
1304 
1305     while (id) {
1306         strlcat(dst, " ", dst_size);
1307         strlcat(dst, id->id, dst_size);
1308         id = id->next;
1309     }
1310 }
1311 
1312 static int i8042_pnp_kbd_probe(struct pnp_dev *dev, const struct pnp_device_id *did)
1313 {
1314     if (pnp_port_valid(dev, 0) && pnp_port_len(dev, 0) == 1)
1315         i8042_pnp_data_reg = pnp_port_start(dev,0);
1316 
1317     if (pnp_port_valid(dev, 1) && pnp_port_len(dev, 1) == 1)
1318         i8042_pnp_command_reg = pnp_port_start(dev, 1);
1319 
1320     if (pnp_irq_valid(dev,0))
1321         i8042_pnp_kbd_irq = pnp_irq(dev, 0);
1322 
1323     strlcpy(i8042_pnp_kbd_name, did->id, sizeof(i8042_pnp_kbd_name));
1324     if (strlen(pnp_dev_name(dev))) {
1325         strlcat(i8042_pnp_kbd_name, ":", sizeof(i8042_pnp_kbd_name));
1326         strlcat(i8042_pnp_kbd_name, pnp_dev_name(dev), sizeof(i8042_pnp_kbd_name));
1327     }
1328     i8042_pnp_id_to_string(dev->id, i8042_kbd_firmware_id,
1329                    sizeof(i8042_kbd_firmware_id));
1330     i8042_kbd_fwnode = dev_fwnode(&dev->dev);
1331 
1332     /* Keyboard ports are always supposed to be wakeup-enabled */
1333     device_set_wakeup_enable(&dev->dev, true);
1334 
1335     i8042_pnp_kbd_devices++;
1336     return 0;
1337 }
1338 
1339 static int i8042_pnp_aux_probe(struct pnp_dev *dev, const struct pnp_device_id *did)
1340 {
1341     if (pnp_port_valid(dev, 0) && pnp_port_len(dev, 0) == 1)
1342         i8042_pnp_data_reg = pnp_port_start(dev,0);
1343 
1344     if (pnp_port_valid(dev, 1) && pnp_port_len(dev, 1) == 1)
1345         i8042_pnp_command_reg = pnp_port_start(dev, 1);
1346 
1347     if (pnp_irq_valid(dev, 0))
1348         i8042_pnp_aux_irq = pnp_irq(dev, 0);
1349 
1350     strlcpy(i8042_pnp_aux_name, did->id, sizeof(i8042_pnp_aux_name));
1351     if (strlen(pnp_dev_name(dev))) {
1352         strlcat(i8042_pnp_aux_name, ":", sizeof(i8042_pnp_aux_name));
1353         strlcat(i8042_pnp_aux_name, pnp_dev_name(dev), sizeof(i8042_pnp_aux_name));
1354     }
1355     i8042_pnp_id_to_string(dev->id, i8042_aux_firmware_id,
1356                    sizeof(i8042_aux_firmware_id));
1357 
1358     i8042_pnp_aux_devices++;
1359     return 0;
1360 }
1361 
1362 static const struct pnp_device_id pnp_kbd_devids[] = {
1363     { .id = "PNP0300", .driver_data = 0 },
1364     { .id = "PNP0301", .driver_data = 0 },
1365     { .id = "PNP0302", .driver_data = 0 },
1366     { .id = "PNP0303", .driver_data = 0 },
1367     { .id = "PNP0304", .driver_data = 0 },
1368     { .id = "PNP0305", .driver_data = 0 },
1369     { .id = "PNP0306", .driver_data = 0 },
1370     { .id = "PNP0309", .driver_data = 0 },
1371     { .id = "PNP030a", .driver_data = 0 },
1372     { .id = "PNP030b", .driver_data = 0 },
1373     { .id = "PNP0320", .driver_data = 0 },
1374     { .id = "PNP0343", .driver_data = 0 },
1375     { .id = "PNP0344", .driver_data = 0 },
1376     { .id = "PNP0345", .driver_data = 0 },
1377     { .id = "CPQA0D7", .driver_data = 0 },
1378     { .id = "", },
1379 };
1380 MODULE_DEVICE_TABLE(pnp, pnp_kbd_devids);
1381 
1382 static struct pnp_driver i8042_pnp_kbd_driver = {
1383     .name           = "i8042 kbd",
1384     .id_table       = pnp_kbd_devids,
1385     .probe          = i8042_pnp_kbd_probe,
1386     .driver         = {
1387         .probe_type = PROBE_FORCE_SYNCHRONOUS,
1388         .suppress_bind_attrs = true,
1389     },
1390 };
1391 
1392 static const struct pnp_device_id pnp_aux_devids[] = {
1393     { .id = "AUI0200", .driver_data = 0 },
1394     { .id = "FJC6000", .driver_data = 0 },
1395     { .id = "FJC6001", .driver_data = 0 },
1396     { .id = "PNP0f03", .driver_data = 0 },
1397     { .id = "PNP0f0b", .driver_data = 0 },
1398     { .id = "PNP0f0e", .driver_data = 0 },
1399     { .id = "PNP0f12", .driver_data = 0 },
1400     { .id = "PNP0f13", .driver_data = 0 },
1401     { .id = "PNP0f19", .driver_data = 0 },
1402     { .id = "PNP0f1c", .driver_data = 0 },
1403     { .id = "SYN0801", .driver_data = 0 },
1404     { .id = "", },
1405 };
1406 MODULE_DEVICE_TABLE(pnp, pnp_aux_devids);
1407 
1408 static struct pnp_driver i8042_pnp_aux_driver = {
1409     .name           = "i8042 aux",
1410     .id_table       = pnp_aux_devids,
1411     .probe          = i8042_pnp_aux_probe,
1412     .driver         = {
1413         .probe_type = PROBE_FORCE_SYNCHRONOUS,
1414         .suppress_bind_attrs = true,
1415     },
1416 };
1417 
1418 static void i8042_pnp_exit(void)
1419 {
1420     if (i8042_pnp_kbd_registered) {
1421         i8042_pnp_kbd_registered = false;
1422         pnp_unregister_driver(&i8042_pnp_kbd_driver);
1423     }
1424 
1425     if (i8042_pnp_aux_registered) {
1426         i8042_pnp_aux_registered = false;
1427         pnp_unregister_driver(&i8042_pnp_aux_driver);
1428     }
1429 }
1430 
1431 static int __init i8042_pnp_init(void)
1432 {
1433     char kbd_irq_str[4] = { 0 }, aux_irq_str[4] = { 0 };
1434     bool pnp_data_busted = false;
1435     int err;
1436 
1437     if (i8042_nopnp) {
1438         pr_info("PNP detection disabled\n");
1439         return 0;
1440     }
1441 
1442     err = pnp_register_driver(&i8042_pnp_kbd_driver);
1443     if (!err)
1444         i8042_pnp_kbd_registered = true;
1445 
1446     err = pnp_register_driver(&i8042_pnp_aux_driver);
1447     if (!err)
1448         i8042_pnp_aux_registered = true;
1449 
1450     if (!i8042_pnp_kbd_devices && !i8042_pnp_aux_devices) {
1451         i8042_pnp_exit();
1452 #if defined(__ia64__)
1453         return -ENODEV;
1454 #else
1455         pr_info("PNP: No PS/2 controller found.\n");
1456         if (x86_platform.legacy.i8042 !=
1457                 X86_LEGACY_I8042_EXPECTED_PRESENT)
1458             return -ENODEV;
1459         pr_info("Probing ports directly.\n");
1460         return 0;
1461 #endif
1462     }
1463 
1464     if (i8042_pnp_kbd_devices)
1465         snprintf(kbd_irq_str, sizeof(kbd_irq_str),
1466             "%d", i8042_pnp_kbd_irq);
1467     if (i8042_pnp_aux_devices)
1468         snprintf(aux_irq_str, sizeof(aux_irq_str),
1469             "%d", i8042_pnp_aux_irq);
1470 
1471     pr_info("PNP: PS/2 Controller [%s%s%s] at %#x,%#x irq %s%s%s\n",
1472         i8042_pnp_kbd_name, (i8042_pnp_kbd_devices && i8042_pnp_aux_devices) ? "," : "",
1473         i8042_pnp_aux_name,
1474         i8042_pnp_data_reg, i8042_pnp_command_reg,
1475         kbd_irq_str, (i8042_pnp_kbd_devices && i8042_pnp_aux_devices) ? "," : "",
1476         aux_irq_str);
1477 
1478 #if defined(__ia64__)
1479     if (!i8042_pnp_kbd_devices)
1480         i8042_nokbd = true;
1481     if (!i8042_pnp_aux_devices)
1482         i8042_noaux = true;
1483 #endif
1484 
1485     if (((i8042_pnp_data_reg & ~0xf) == (i8042_data_reg & ~0xf) &&
1486           i8042_pnp_data_reg != i8042_data_reg) ||
1487         !i8042_pnp_data_reg) {
1488         pr_warn("PNP: PS/2 controller has invalid data port %#x; using default %#x\n",
1489             i8042_pnp_data_reg, i8042_data_reg);
1490         i8042_pnp_data_reg = i8042_data_reg;
1491         pnp_data_busted = true;
1492     }
1493 
1494     if (((i8042_pnp_command_reg & ~0xf) == (i8042_command_reg & ~0xf) &&
1495           i8042_pnp_command_reg != i8042_command_reg) ||
1496         !i8042_pnp_command_reg) {
1497         pr_warn("PNP: PS/2 controller has invalid command port %#x; using default %#x\n",
1498             i8042_pnp_command_reg, i8042_command_reg);
1499         i8042_pnp_command_reg = i8042_command_reg;
1500         pnp_data_busted = true;
1501     }
1502 
1503     if (!i8042_nokbd && !i8042_pnp_kbd_irq) {
1504         pr_warn("PNP: PS/2 controller doesn't have KBD irq; using default %d\n",
1505             i8042_kbd_irq);
1506         i8042_pnp_kbd_irq = i8042_kbd_irq;
1507         pnp_data_busted = true;
1508     }
1509 
1510     if (!i8042_noaux && !i8042_pnp_aux_irq) {
1511         if (!pnp_data_busted && i8042_pnp_kbd_irq) {
1512             pr_warn("PNP: PS/2 appears to have AUX port disabled, "
1513                 "if this is incorrect please boot with i8042.nopnp\n");
1514             i8042_noaux = true;
1515         } else {
1516             pr_warn("PNP: PS/2 controller doesn't have AUX irq; using default %d\n",
1517                 i8042_aux_irq);
1518             i8042_pnp_aux_irq = i8042_aux_irq;
1519         }
1520     }
1521 
1522     i8042_data_reg = i8042_pnp_data_reg;
1523     i8042_command_reg = i8042_pnp_command_reg;
1524     i8042_kbd_irq = i8042_pnp_kbd_irq;
1525     i8042_aux_irq = i8042_pnp_aux_irq;
1526 
1527 #ifdef CONFIG_X86
1528     i8042_bypass_aux_irq_test = !pnp_data_busted &&
1529                     dmi_check_system(i8042_dmi_laptop_table);
1530 #endif
1531 
1532     return 0;
1533 }
1534 
1535 #else  /* !CONFIG_PNP */
1536 static inline int i8042_pnp_init(void) { return 0; }
1537 static inline void i8042_pnp_exit(void) { }
1538 #endif /* CONFIG_PNP */
1539 
1540 
1541 #ifdef CONFIG_X86
1542 static void __init i8042_check_quirks(void)
1543 {
1544     const struct dmi_system_id *device_quirk_info;
1545     uintptr_t quirks;
1546 
1547     device_quirk_info = dmi_first_match(i8042_dmi_quirk_table);
1548     if (!device_quirk_info)
1549         return;
1550 
1551     quirks = (uintptr_t)device_quirk_info->driver_data;
1552 
1553     if (quirks & SERIO_QUIRK_NOKBD)
1554         i8042_nokbd = true;
1555     if (quirks & SERIO_QUIRK_NOAUX)
1556         i8042_noaux = true;
1557     if (quirks & SERIO_QUIRK_NOMUX)
1558         i8042_nomux = true;
1559     if (quirks & SERIO_QUIRK_FORCEMUX)
1560         i8042_nomux = false;
1561     if (quirks & SERIO_QUIRK_UNLOCK)
1562         i8042_unlock = true;
1563     if (quirks & SERIO_QUIRK_PROBE_DEFER)
1564         i8042_probe_defer = true;
1565     /* Honor module parameter when value is not default */
1566     if (i8042_reset == I8042_RESET_DEFAULT) {
1567         if (quirks & SERIO_QUIRK_RESET_ALWAYS)
1568             i8042_reset = I8042_RESET_ALWAYS;
1569         if (quirks & SERIO_QUIRK_RESET_NEVER)
1570             i8042_reset = I8042_RESET_NEVER;
1571     }
1572     if (quirks & SERIO_QUIRK_DIECT)
1573         i8042_direct = true;
1574     if (quirks & SERIO_QUIRK_DUMBKBD)
1575         i8042_dumbkbd = true;
1576     if (quirks & SERIO_QUIRK_NOLOOP)
1577         i8042_noloop = true;
1578     if (quirks & SERIO_QUIRK_NOTIMEOUT)
1579         i8042_notimeout = true;
1580     if (quirks & SERIO_QUIRK_KBDRESET)
1581         i8042_kbdreset = true;
1582     if (quirks & SERIO_QUIRK_DRITEK)
1583         i8042_dritek = true;
1584 #ifdef CONFIG_PNP
1585     if (quirks & SERIO_QUIRK_NOPNP)
1586         i8042_nopnp = true;
1587 #endif
1588 }
1589 #else
1590 static inline void i8042_check_quirks(void) {}
1591 #endif
1592 
1593 static int __init i8042_platform_init(void)
1594 {
1595     int retval;
1596 
1597 #ifdef CONFIG_X86
1598     u8 a20_on = 0xdf;
1599     /* Just return if platform does not have i8042 controller */
1600     if (x86_platform.legacy.i8042 == X86_LEGACY_I8042_PLATFORM_ABSENT)
1601         return -ENODEV;
1602 #endif
1603 
1604 /*
1605  * On ix86 platforms touching the i8042 data register region can do really
1606  * bad things. Because of this the region is always reserved on ix86 boxes.
1607  *
1608  *  if (!request_region(I8042_DATA_REG, 16, "i8042"))
1609  *      return -EBUSY;
1610  */
1611 
1612     i8042_kbd_irq = I8042_MAP_IRQ(1);
1613     i8042_aux_irq = I8042_MAP_IRQ(12);
1614 
1615 #if defined(__ia64__)
1616     i8042_reset = I8042_RESET_ALWAYS;
1617 #endif
1618 
1619     i8042_check_quirks();
1620 
1621     pr_debug("Active quirks (empty means none):%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
1622         i8042_nokbd ? " nokbd" : "",
1623         i8042_noaux ? " noaux" : "",
1624         i8042_nomux ? " nomux" : "",
1625         i8042_unlock ? " unlock" : "",
1626         i8042_probe_defer ? "probe_defer" : "",
1627         i8042_reset == I8042_RESET_DEFAULT ?
1628             "" : i8042_reset == I8042_RESET_ALWAYS ?
1629                 " reset_always" : " reset_never",
1630         i8042_direct ? " direct" : "",
1631         i8042_dumbkbd ? " dumbkbd" : "",
1632         i8042_noloop ? " noloop" : "",
1633         i8042_notimeout ? " notimeout" : "",
1634         i8042_kbdreset ? " kbdreset" : "",
1635 #ifdef CONFIG_X86
1636         i8042_dritek ? " dritek" : "",
1637 #else
1638         "",
1639 #endif
1640 #ifdef CONFIG_PNP
1641         i8042_nopnp ? " nopnp" : "");
1642 #else
1643         "");
1644 #endif
1645 
1646     retval = i8042_pnp_init();
1647     if (retval)
1648         return retval;
1649 
1650 #ifdef CONFIG_X86
1651     /*
1652      * A20 was already enabled during early kernel init. But some buggy
1653      * BIOSes (in MSI Laptops) require A20 to be enabled using 8042 to
1654      * resume from S3. So we do it here and hope that nothing breaks.
1655      */
1656     i8042_command(&a20_on, 0x10d1);
1657     i8042_command(NULL, 0x00ff);    /* Null command for SMM firmware */
1658 #endif /* CONFIG_X86 */
1659 
1660     return retval;
1661 }
1662 
1663 static inline void i8042_platform_exit(void)
1664 {
1665     i8042_pnp_exit();
1666 }
1667 
1668 #endif /* _I8042_X86IA64IO_H */