[U-Boot] [PATCH 11/28] i8042: Handle a duplicate power-on-reset response

Simon Glass sjg at chromium.org
Wed Sep 9 06:32:34 CEST 2015


Sometimes we seem to get 0xaa twice which causes the config read to fail.
This causes chromebook_link to fail to set up the keyboard.

Add a check for this and read the config again when detected.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 drivers/input/i8042.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/input/i8042.c b/drivers/input/i8042.c
index dbd4b00..c6a92a2 100644
--- a/drivers/input/i8042.c
+++ b/drivers/input/i8042.c
@@ -497,6 +497,8 @@ static int kbd_reset(void)
 	config = kbd_cmd_read(CMD_RD_CONFIG);
 	if (config == -1)
 		return -1;
+	else if (config == KBD_POR)	/* Sometimes get a second byte */
+		config = kbd_cmd_read(CMD_RD_CONFIG);
 
 	config |= CONFIG_AT_TRANS;
 	config &= ~(CONFIG_KIRQ_EN | CONFIG_MIRQ_EN);
-- 
2.6.0.rc0.131.gf624c3d



More information about the U-Boot mailing list