]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/input/serio/i8042.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6-omap-h63xx.git] / drivers / input / serio / i8042.c
index ec195a36e8f66ea9f170698d5b6dbb34f6140649..7c17377a65b96b99cb342158ad449d60c7f8619d 100644 (file)
@@ -553,7 +553,8 @@ static int __devinit i8042_check_aux(void)
  */
 
        param = 0x5a;
-       if (i8042_command(&param, I8042_CMD_AUX_LOOP) || param != 0x5a) {
+       retval = i8042_command(&param, I8042_CMD_AUX_LOOP);
+       if (retval || param != 0x5a) {
 
 /*
  * External connection test - filters out AT-soldered PS/2 i8042's
@@ -567,7 +568,12 @@ static int __devinit i8042_check_aux(void)
                    (param && param != 0xfa && param != 0xff))
                        return -1;
 
-               aux_loop_broken = 1;
+/*
+ * If AUX_LOOP completed without error but returned unexpected data
+ * mark it as broken
+ */
+               if (!retval)
+                       aux_loop_broken = 1;
        }
 
 /*
@@ -761,6 +767,13 @@ static void i8042_controller_reset(void)
 {
        i8042_flush();
 
+/*
+ * Disable both KBD and AUX interfaces so they don't get in the way
+ */
+
+       i8042_ctr |= I8042_CTR_KBDDIS | I8042_CTR_AUXDIS;
+       i8042_ctr &= ~(I8042_CTR_KBDINT | I8042_CTR_AUXINT);
+
 /*
  * Disable MUX mode if present.
  */