diff mbox

[U-Boot,16/16] i8042: Add keyboard enable logic in kbd_reset()

Message ID 1424784251-19808-17-git-send-email-sjg@chromium.org
State Superseded
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass Feb. 24, 2015, 1:24 p.m. UTC
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 | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox

Patch

diff --git a/drivers/input/i8042.c b/drivers/input/i8042.c
index ca1604c..1769c5e 100644
--- a/drivers/input/i8042.c
+++ b/drivers/input/i8042.c
@@ -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;