[U-Boot] [PATCH 11/69] input: i8042: Make sure the keyboard is enabled
Bin Meng
bmeng.cn at gmail.com
Fri Mar 11 05:15:10 CET 2016
Hi Simon,
On Mon, Mar 7, 2016 at 10:27 AM, Simon Glass <sjg at chromium.org> wrote:
> 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 at chromium.org>
> ---
>
> drivers/input/i8042.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/input/i8042.c b/drivers/input/i8042.c
> index 661d7fd..12f8934 100644
> --- a/drivers/input/i8042.c
> +++ b/drivers/input/i8042.c
> @@ -128,6 +128,12 @@ static int kbd_reset(int quirk)
> if (kbd_cmd_read(CMD_SELF_TEST) != KBC_TEST_OK)
> goto err;
>
> + if (kbd_write(I8042_DATA_REG, 0xf4) ||
We should use macro for 0xf4. 0xf4 is a command to drain output
buffer, but the debug printf says "enable failed"? It's not a keyboard
enable command. And I suspect this command should be put after sending
CMD_RESET_KBD, which is a more natural sequence. Can you try that?
> + kbd_read(I8042_DATA_REG) != KBD_ACK) {
> + debug("Keyboard enable failed ACK\n");
> + goto err;
> + }
> +
> /* keyboard reset */
> if (kbd_write(I8042_DATA_REG, CMD_RESET_KBD) ||
> kbd_read(I8042_DATA_REG) != KBD_ACK ||
> --
Regards,
Bin
More information about the U-Boot
mailing list