Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[pandora-kernel.git] / arch / arm / mach-tegra / gpio.c
index ad80488..12090a2 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/gpio.h>
 
 #include <mach/iomap.h>
+#include <mach/suspend.h>
 
 #define GPIO_BANK(x)           ((x) >> 5)
 #define GPIO_PORT(x)           (((x) >> 3) & 0x3)
@@ -380,6 +381,20 @@ static int __init tegra_gpio_init(void)
 
 postcore_initcall(tegra_gpio_init);
 
+void __init tegra_gpio_config(struct tegra_gpio_table *table, int num)
+{
+       int i;
+
+       for (i = 0; i < num; i++) {
+               int gpio = table[i].gpio;
+
+               if (table[i].enable)
+                       tegra_gpio_enable(gpio);
+               else
+                       tegra_gpio_disable(gpio);
+       }
+}
+
 #ifdef CONFIG_DEBUG_FS
 
 #include <linux/debugfs.h>