]> git.sur5r.net Git - u-boot/commitdiff
i8042: Add keyboard enable logic in kbd_reset()
authorSimon Glass <sjg@chromium.org>
Thu, 26 Mar 2015 15:29:41 +0000 (09:29 -0600)
committerSimon Glass <sjg@chromium.org>
Sat, 18 Apr 2015 17:11:16 +0000 (11:11 -0600)
This code appears to be missing a piece that is needed on some keyboards
to enable the keyboard. Add this in.

This makes the keyboard work correctly on chromebook_link.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/input/i8042.c

index ca1604c5401513686699272cb84f879cdb5e01f4..1769c5e80b215ea08e45676e550e83a174c736a1 100644 (file)
@@ -698,7 +698,14 @@ static int kbd_reset(void)
 
        /* Enable Keyboard */
        out8(I8042_COMMAND_REG, 0xae);
+       if (kbd_input_empty() == 0)
+               return -1;
+
+       out8(I8042_COMMAND_REG, 0x60);
+       if (kbd_input_empty() == 0)
+               return -1;
 
+       out8(I8042_DATA_REG, 0xf4);
        if (kbd_input_empty() == 0)
                return -1;