]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
tegra: Add keyboard support to funcmux
authorSimon Glass <sjg@chromium.org>
Tue, 17 Apr 2012 09:01:32 +0000 (09:01 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Tue, 15 May 2012 06:31:39 +0000 (08:31 +0200)
Add funcmux support for the default keyboard mapping.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
arch/arm/cpu/armv7/tegra2/funcmux.c

index c1d2dfec5f02dea5c8631ca9222c3d7be13cb486..0ef775302188a57b178e9f0ed78a3310fcc4b38e 100644 (file)
@@ -169,6 +169,22 @@ int funcmux_select(enum periph_id id, int config)
                }
                break;
 
+       case PERIPH_ID_KBC:
+               if (config == FUNCMUX_DEFAULT) {
+                       enum pmux_pingrp grp[] = {PINGRP_KBCA, PINGRP_KBCB,
+                               PINGRP_KBCC, PINGRP_KBCD, PINGRP_KBCE,
+                               PINGRP_KBCF};
+                       int i;
+
+                       for (i = 0; i < ARRAY_SIZE(grp); i++) {
+                               pinmux_tristate_disable(grp[i]);
+                               pinmux_set_func(grp[i], PMUX_FUNC_KBC);
+                               pinmux_set_pullupdown(grp[i], PMUX_PULL_UP);
+                       }
+
+                       break;
+               }
+
        default:
                debug("%s: invalid periph_id %d", __func__, id);
                return -1;