]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
tegra: keyboard: Fix the init order
authorSimon Glass <sjg@chromium.org>
Sat, 30 Jan 2016 23:37:40 +0000 (16:37 -0700)
committerTom Warren <twarren@nvidia.com>
Tue, 16 Feb 2016 16:17:49 +0000 (09:17 -0700)
We need to add the base tables before adding the function tables. Fix the
init order so the keyboard scans keys correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
drivers/input/tegra-kbc.c

index 951cbb4481b4a9a2ad98a7d65386117196be12c9..c77f6107696281f89c85986efcd95d62b4a37f41 100644 (file)
@@ -312,6 +312,7 @@ static int tegra_kbd_probe(struct udevice *dev)
                      __func__, ret);
                return ret;
        }
+       input_add_tables(input, false);
        if (priv->matrix.fn_keycode) {
                ret = input_add_table(input, KEY_FN, -1,
                                      priv->matrix.fn_keycode,
@@ -326,7 +327,6 @@ static int tegra_kbd_probe(struct udevice *dev)
        priv->input = input;
        input->dev = dev;
        input->read_keys = tegra_kbc_check;
-       input_add_tables(input, false);
        strcpy(sdev->name, "tegra-kbc");
        ret = input_stdio_register(sdev);
        if (ret) {