]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/input/serio/i8042-x86ia64io.h
Input: i8042 - non-x86 build fix
[linux-2.6-omap-h63xx.git] / drivers / input / serio / i8042-x86ia64io.h
index 6858bc58f0fdb40e6da447decd63db5f162377b5..662e84482c2601827e92882bd9bae5debf80dd34 100644 (file)
@@ -63,11 +63,20 @@ static inline void i8042_write_command(int val)
        outb(val, I8042_COMMAND_REG);
 }
 
-#if defined(__i386__)
+#if defined(__i386__) || defined(__x86_64__)
 
 #include <linux/dmi.h>
 
 static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = {
+       {
+               /* AUX LOOP command does not raise AUX IRQ */
+               .ident = "ASUS P65UP5",
+               .matches = {
+                       DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
+                       DMI_MATCH(DMI_BOARD_NAME, "P/I-P65UP5"),
+                       DMI_MATCH(DMI_BOARD_VERSION, "REV 2.X"),
+               },
+       },
        {
                .ident = "Compaq Proliant 8500",
                .matches = {
@@ -92,6 +101,23 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = {
                        DMI_MATCH(DMI_PRODUCT_VERSION, "00"),
                },
        },
+       {
+               /* AUX LOOP does not work properly */
+               .ident = "ULI EV4873",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "ULI"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "EV4873"),
+                       DMI_MATCH(DMI_PRODUCT_VERSION, "5a"),
+               },
+       },
+       {
+               .ident = "Microsoft Virtual Machine",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Virtual Machine"),
+                       DMI_MATCH(DMI_PRODUCT_VERSION, "VS2005R2"),
+               },
+       },
        { }
 };
 
@@ -159,6 +185,13 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
                        DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK E4010"),
                },
        },
+       {
+               .ident = "Fujitsu-Siemens Amilo Pro 2010",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pro V2010"),
+               },
+       },
        {
                /*
                 * No data is coming from the touchscreen unless KBC
@@ -181,6 +214,27 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
                        DMI_MATCH(DMI_PRODUCT_NAME, "Pavilion dv4000 (EA032EA#ABF)"),
                },
        },
+       {
+               /*
+                * Like DV4017EA does not raise AUXERR for errors on MUX ports.
+                */
+               .ident = "HP Pavilion ZT1000",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion Notebook PC"),
+                       DMI_MATCH(DMI_PRODUCT_VERSION, "HP Pavilion Notebook ZT1000"),
+               },
+       },
+       {
+               /*
+                * Like DV4017EA does not raise AUXERR for errors on MUX ports.
+                */
+               .ident = "HP Pavilion DV4270ca",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Pavilion dv4000 (EH476UA#ABL)"),
+               },
+       },
        {
                .ident = "Toshiba P10",
                .matches = {
@@ -230,6 +284,57 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
 
 #endif
 
+#ifdef CONFIG_X86
+
+#include <linux/dmi.h>
+
+/*
+ * Some Wistron based laptops need us to explicitly enable the 'Dritek
+ * keyboard extension' to make their extra keys start generating scancodes.
+ * Originally, this was just confined to older laptops, but a few Acer laptops
+ * have turned up in 2007 that also need this again.
+ */
+static struct dmi_system_id __initdata i8042_dmi_dritek_table[] = {
+       {
+               .ident = "Acer Aspire 5630",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5630"),
+               },
+       },
+       {
+               .ident = "Acer Aspire 5650",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5650"),
+               },
+       },
+       {
+               .ident = "Acer Aspire 5680",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5680"),
+               },
+       },
+       {
+               .ident = "Acer Aspire 9110",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 9110"),
+               },
+       },
+       {
+               .ident = "Acer TravelMate 2490",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 2490"),
+               },
+       },
+       { }
+};
+
+#endif /* CONFIG_X86 */
+
 
 #ifdef CONFIG_PNP
 #include <linux/pnp.h>
@@ -337,6 +442,7 @@ static void i8042_pnp_exit(void)
 static int __init i8042_pnp_init(void)
 {
        char kbd_irq_str[4] = { 0 }, aux_irq_str[4] = { 0 };
+       int pnp_data_busted = 0;
        int err;
 
        if (i8042_nopnp) {
@@ -384,27 +490,48 @@ static int __init i8042_pnp_init(void)
 #endif
 
        if (((i8042_pnp_data_reg & ~0xf) == (i8042_data_reg & ~0xf) &&
-             i8042_pnp_data_reg != i8042_data_reg) || !i8042_pnp_data_reg) {
-               printk(KERN_WARNING "PNP: PS/2 controller has invalid data port %#x; using default %#x\n",
+             i8042_pnp_data_reg != i8042_data_reg) ||
+           !i8042_pnp_data_reg) {
+               printk(KERN_WARNING
+                       "PNP: PS/2 controller has invalid data port %#x; "
+                       "using default %#x\n",
                        i8042_pnp_data_reg, i8042_data_reg);
                i8042_pnp_data_reg = i8042_data_reg;
+               pnp_data_busted = 1;
        }
 
        if (((i8042_pnp_command_reg & ~0xf) == (i8042_command_reg & ~0xf) &&
-             i8042_pnp_command_reg != i8042_command_reg) || !i8042_pnp_command_reg) {
-               printk(KERN_WARNING "PNP: PS/2 controller has invalid command port %#x; using default %#x\n",
+             i8042_pnp_command_reg != i8042_command_reg) ||
+           !i8042_pnp_command_reg) {
+               printk(KERN_WARNING
+                       "PNP: PS/2 controller has invalid command port %#x; "
+                       "using default %#x\n",
                        i8042_pnp_command_reg, i8042_command_reg);
                i8042_pnp_command_reg = i8042_command_reg;
+               pnp_data_busted = 1;
        }
 
        if (!i8042_nokbd && !i8042_pnp_kbd_irq) {
-               printk(KERN_WARNING "PNP: PS/2 controller doesn't have KBD irq; using default %d\n", i8042_kbd_irq);
+               printk(KERN_WARNING
+                       "PNP: PS/2 controller doesn't have KBD irq; "
+                       "using default %d\n", i8042_kbd_irq);
                i8042_pnp_kbd_irq = i8042_kbd_irq;
+               pnp_data_busted = 1;
        }
 
        if (!i8042_noaux && !i8042_pnp_aux_irq) {
-               printk(KERN_WARNING "PNP: PS/2 controller doesn't have AUX irq; using default %d\n", i8042_aux_irq);
-               i8042_pnp_aux_irq = i8042_aux_irq;
+               if (!pnp_data_busted && i8042_pnp_kbd_irq) {
+                       printk(KERN_WARNING
+                               "PNP: PS/2 appears to have AUX port disabled, "
+                               "if this is incorrect please boot with "
+                               "i8042.nopnp\n");
+                       i8042_noaux = 1;
+               } else {
+                       printk(KERN_WARNING
+                               "PNP: PS/2 controller doesn't have AUX irq; "
+                               "using default %d\n", i8042_aux_irq);
+                       i8042_pnp_aux_irq = i8042_aux_irq;
+               }
        }
 
        i8042_data_reg = i8042_pnp_data_reg;
@@ -443,7 +570,7 @@ static int __init i8042_platform_init(void)
         i8042_reset = 1;
 #endif
 
-#if defined(__i386__)
+#if defined(__i386__) || defined(__x86_64__)
        if (dmi_check_system(i8042_dmi_noloop_table))
                i8042_noloop = 1;
 
@@ -451,6 +578,11 @@ static int __init i8042_platform_init(void)
                i8042_nomux = 1;
 #endif
 
+#ifdef CONFIG_X86
+       if (dmi_check_system(i8042_dmi_dritek_table))
+               i8042_dritek = 1;
+#endif /* CONFIG_X86 */
+
        return retval;
 }