]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/input/serio/i8042-x86ia64io.h
Merge ../linux-2.6 by hand
[linux-2.6-omap-h63xx.git] / drivers / input / serio / i8042-x86ia64io.h
index 02bc23142ce0a6a9ca4766cd7cb9133f997348a3..273bb3b08cfa254146cf1b6362bfc8b1df1e224e 100644 (file)
@@ -137,6 +137,13 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
                        DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK T3010"),
                },
        },
+       {
+               .ident = "Fujitsu-Siemens Lifebook E4010",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK E4010"),
+               },
+       },
        {
                .ident = "Toshiba P10",
                .matches = {
@@ -258,7 +265,8 @@ static void i8042_pnp_exit(void)
 
 static int __init i8042_pnp_init(void)
 {
-       int result_kbd, result_aux;
+       int result_kbd = 0, result_aux = 0;
+       char kbd_irq_str[4] = { 0 }, aux_irq_str[4] = { 0 };
 
        if (i8042_nopnp) {
                printk(KERN_INFO "i8042: PNP detection disabled\n");
@@ -267,6 +275,7 @@ static int __init i8042_pnp_init(void)
 
        if ((result_kbd = pnp_register_driver(&i8042_pnp_kbd_driver)) >= 0)
                i8042_pnp_kbd_registered = 1;
+
        if ((result_aux = pnp_register_driver(&i8042_pnp_aux_driver)) >= 0)
                i8042_pnp_aux_registered = 1;
 
@@ -280,6 +289,27 @@ static int __init i8042_pnp_init(void)
 #endif
        }
 
+       if (result_kbd > 0)
+               snprintf(kbd_irq_str, sizeof(kbd_irq_str),
+                       "%d", i8042_pnp_kbd_irq);
+       if (result_aux > 0)
+               snprintf(aux_irq_str, sizeof(aux_irq_str),
+                       "%d", i8042_pnp_aux_irq);
+
+       printk(KERN_INFO "PNP: PS/2 Controller [%s%s%s] at %#x,%#x irq %s%s%s\n",
+               i8042_pnp_kbd_name, (result_kbd > 0 && result_aux > 0) ? "," : "",
+               i8042_pnp_aux_name,
+               i8042_pnp_data_reg, i8042_pnp_command_reg,
+               kbd_irq_str, (result_kbd > 0 && result_aux > 0) ? "," : "",
+               aux_irq_str);
+
+#if defined(__ia64__)
+       if (result_kbd <= 0)
+               i8042_nokbd = 1;
+       if (result_aux <= 0)
+               i8042_noaux = 1;
+#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",
@@ -294,31 +324,21 @@ static int __init i8042_pnp_init(void)
                i8042_pnp_command_reg = i8042_command_reg;
        }
 
-       if (!i8042_pnp_kbd_irq) {
-               printk(KERN_WARNING "PNP: PS/2 controller doesn't have KBD irq; using default %#x\n", i8042_kbd_irq);
+       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);
                i8042_pnp_kbd_irq = i8042_kbd_irq;
        }
 
-       if (!i8042_pnp_aux_irq) {
-               printk(KERN_WARNING "PNP: PS/2 controller doesn't have AUX irq; using default %#x\n", i8042_aux_irq);
+       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 defined(__ia64__)
-       if (result_aux <= 0)
-               i8042_noaux = 1;
-#endif
-
        i8042_data_reg = i8042_pnp_data_reg;
        i8042_command_reg = i8042_pnp_command_reg;
        i8042_kbd_irq = i8042_pnp_kbd_irq;
        i8042_aux_irq = i8042_pnp_aux_irq;
 
-       printk(KERN_INFO "PNP: PS/2 Controller [%s%s%s] at %#x,%#x irq %d%s%d\n",
-               i8042_pnp_kbd_name, (result_kbd > 0 && result_aux > 0) ? "," : "", i8042_pnp_aux_name,
-               i8042_data_reg, i8042_command_reg, i8042_kbd_irq,
-               (result_aux > 0) ? "," : "", i8042_aux_irq);
-
        return 0;
 }