summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-03-11 22:06:50 -0700
committerBin Meng <bmeng.cn@gmail.com>2016-03-17 10:27:24 +0800
commit8226a3e99f1c1e7ded648721d1e16118453761e5 (patch)
tree77984f8d487e193b35b8a9f4947439f4dbe4de1a /drivers
parent532f2435cfe94e54e01ba68572daa853d7752afa (diff)
input: i8042: Make sure the keyboard is enabled
Add one more step into the init sequence. This fixes the keyboard on samus, which otherwise does not work. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/i8042.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/input/i8042.c b/drivers/input/i8042.c
index 661d7fd86c..03d4840385 100644
--- a/drivers/input/i8042.c
+++ b/drivers/input/i8042.c
@@ -134,6 +134,10 @@ static int kbd_reset(int quirk)
kbd_read(I8042_DATA_REG) != KBD_POR)
goto err;
+ if (kbd_write(I8042_DATA_REG, CMD_DRAIN_OUTPUT) ||
+ kbd_read(I8042_DATA_REG) != KBD_ACK)
+ goto err;
+
/* set AT translation and disable irq */
config = kbd_cmd_read(CMD_RD_CONFIG);
if (config == -1)