summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-tegra.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2011-06-15 14:54:14 -0600
committerGrant Likely <grant.likely@secretlab.ca>2011-06-15 14:54:14 -0600
commitdf2212270ce94f12e9caed6ca04c7077672d588e (patch)
tree455784e6d9d5c46c638f43b16e81bc17d90d1efd /drivers/gpio/gpio-tegra.c
parentea5a9607cb2a3c7e5e9fcb1b3d75b8f88eca5766 (diff)
downloadop-kernel-dev-df2212270ce94f12e9caed6ca04c7077672d588e.zip
op-kernel-dev-df2212270ce94f12e9caed6ca04c7077672d588e.tar.gz
gpio/tegra: add devicetree support
Add support for decoding gpios from the device tree Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/gpio/gpio-tegra.c')
-rw-r--r--drivers/gpio/gpio-tegra.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 919d638..13afb881 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -23,6 +23,7 @@
#include <linux/io.h>
#include <linux/gpio.h>
+#include <linux/of.h>
#include <asm/mach/irq.h>
@@ -340,6 +341,15 @@ static int __init tegra_gpio_init(void)
}
}
+#ifdef CONFIG_OF_GPIO
+ /*
+ * This isn't ideal, but it gets things hooked up until this
+ * driver is converted into a platform_device
+ */
+ tegra_gpio_chip.of_node = of_find_compatible_node(NULL, NULL,
+ "nvidia,tegra250-gpio");
+#endif /* CONFIG_OF_GPIO */
+
gpiochip_add(&tegra_gpio_chip);
for (i = INT_GPIO_BASE; i < (INT_GPIO_BASE + TEGRA_NR_GPIOS); i++) {
OpenPOWER on IntegriCloud