]> git.karo-electronics.de Git - karo-tx-linux.git/commit
arm/tegra: Use bus notifiers to trigger pinmux setup
authorStephen Warren <swarren@nvidia.com>
Fri, 16 Dec 2011 22:12:32 +0000 (15:12 -0700)
committerOlof Johansson <olof@lixom.net>
Tue, 20 Dec 2011 02:03:11 +0000 (18:03 -0800)
commita58116f331fd30462b4a7372725e090e1a7d0eb7
treef095c9fba0e480bc4449a4ee4893cb52525017b0
parent54862bf00968427cf8f7ffcb6dacf03161eae862
arm/tegra: Use bus notifiers to trigger pinmux setup

Currently, the Tegra pinmux is initialized at different times when booting
with and without device tree:

Without device tree:

1) Pinmux and GPIO drivers are registered.
2) Pinmux is configured.
3) All other drivers are registered.

With device tree:

1) All drivers are registered and probed, including pinmux and GPIO.
2) Pinmux is configured.

This change modifies board-pinmux.c to detect pinmux and GPIO driver
registration using bus notifiers. This allows pinmux configuration to
happen immediately after the pinmux driver is probed, irrespective of
whether the pinmux driver is manually registered by board-pinmux.c, or
if it's instantiated during device tree parsing.

To support this with device tree, the pinmux init functions must be
called prior to instantiating devices from device tree, so that the
notifiers are set up before-hand.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
arch/arm/mach-tegra/board-dt.c
arch/arm/mach-tegra/board-pinmux.c