diff options
author | Olof Johansson <olof@lixom.net> | 2011-02-14 03:12:27 (GMT) |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2011-02-23 01:27:11 (GMT) |
commit | 632095ea15db51d73d3d084ee18620d3ac1cb040 (patch) | |
tree | f3cf8e089309abce2843e4eeab5e125a56a99752 /arch/arm/mach-tegra/include/mach | |
parent | 38376866a1fe5b1e6d9510ec4913c2b461f456f3 (diff) | |
download | linux-fsl-qoriq-632095ea15db51d73d3d084ee18620d3ac1cb040.tar.xz |
ARM: tegra: add tegra_gpio_table and tegra_gpio_config
To give one place to setup the pins that are used as GPIOs instead
of as their pinmuxed functions. Specifying enabled as false explicitly
disables the gpio mode of that pin (if left on by firmware).
This should remove the need for calling these from specific drivers and
thus reduce tegra-specific code from them.
Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Erik Gilling <konkers@android.com>
Diffstat (limited to 'arch/arm/mach-tegra/include/mach')
-rw-r--r-- | arch/arm/mach-tegra/include/mach/gpio.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/include/mach/gpio.h b/arch/arm/mach-tegra/include/mach/gpio.h index 12a7cf6..196f114 100644 --- a/arch/arm/mach-tegra/include/mach/gpio.h +++ b/arch/arm/mach-tegra/include/mach/gpio.h @@ -20,6 +20,7 @@ #ifndef __MACH_TEGRA_GPIO_H #define __MACH_TEGRA_GPIO_H +#include <linux/init.h> #include <mach/irqs.h> #define TEGRA_NR_GPIOS INT_GPIO_NR @@ -47,6 +48,12 @@ static inline int irq_to_gpio(unsigned int irq) return -EINVAL; } +struct tegra_gpio_table { + int gpio; /* GPIO number */ + bool enable; /* Enable for GPIO at init? */ +}; + +void tegra_gpio_config(struct tegra_gpio_table *table, int num); void tegra_gpio_enable(int gpio); void tegra_gpio_disable(int gpio); |