aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio_nvidia.txt7
-rw-r--r--drivers/gpio/gpio-tegra.c10
2 files changed, 17 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt b/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt
new file mode 100644
index 00000000000..afb3ff3134c
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt
@@ -0,0 +1,7 @@
1NVIDIA Tegra 2 GPIO controller
2
3Required properties:
4- compatible : "nvidia,tegra250-gpio"
5- #gpio-cells : Should be two. The first cell is the pin number and the
6 second cell is used to specify optional parameters (currently unused).
7- gpio-controller : Marks the device node as a GPIO controller.
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 919d6383773..13afb881ffc 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -23,6 +23,7 @@
23 23
24#include <linux/io.h> 24#include <linux/io.h>
25#include <linux/gpio.h> 25#include <linux/gpio.h>
26#include <linux/of.h>
26 27
27#include <asm/mach/irq.h> 28#include <asm/mach/irq.h>
28 29
@@ -340,6 +341,15 @@ static int __init tegra_gpio_init(void)
340 } 341 }
341 } 342 }
342 343
344#ifdef CONFIG_OF_GPIO
345 /*
346 * This isn't ideal, but it gets things hooked up until this
347 * driver is converted into a platform_device
348 */
349 tegra_gpio_chip.of_node = of_find_compatible_node(NULL, NULL,
350 "nvidia,tegra250-gpio");
351#endif /* CONFIG_OF_GPIO */
352
343 gpiochip_add(&tegra_gpio_chip); 353 gpiochip_add(&tegra_gpio_chip);
344 354
345 for (i = INT_GPIO_BASE; i < (INT_GPIO_BASE + TEGRA_NR_GPIOS); i++) { 355 for (i = INT_GPIO_BASE; i < (INT_GPIO_BASE + TEGRA_NR_GPIOS); i++) {