From 0548fb12e9ef6daa1d56bb195427d2e6eda7fcd4 Mon Sep 17 00:00:00 2001 From: Grant Likely Date: Wed, 15 Jun 2011 14:54:14 -0600 Subject: [PATCH] --- yaml --- r: 256697 b: refs/heads/master c: df2212270ce94f12e9caed6ca04c7077672d588e h: refs/heads/master i: 256695: e47c935747f9fca5d0bc66e4e7bf0728838ca62e v: v3 --- [refs] | 2 +- .../devicetree/bindings/gpio/gpio_nvidia.txt | 7 +++++++ trunk/drivers/gpio/gpio-tegra.c | 10 ++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 trunk/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt diff --git a/[refs] b/[refs] index bfc62245532d..864b7558814b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ea5a9607cb2a3c7e5e9fcb1b3d75b8f88eca5766 +refs/heads/master: df2212270ce94f12e9caed6ca04c7077672d588e diff --git a/trunk/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt b/trunk/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt new file mode 100644 index 000000000000..afb3ff3134c8 --- /dev/null +++ b/trunk/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt @@ -0,0 +1,7 @@ +NVIDIA Tegra 2 GPIO controller + +Required properties: +- compatible : "nvidia,tegra250-gpio" +- #gpio-cells : Should be two. The first cell is the pin number and the + second cell is used to specify optional parameters (currently unused). +- gpio-controller : Marks the device node as a GPIO controller. diff --git a/trunk/drivers/gpio/gpio-tegra.c b/trunk/drivers/gpio/gpio-tegra.c index 919d63837736..13afb881ffc3 100644 --- a/trunk/drivers/gpio/gpio-tegra.c +++ b/trunk/drivers/gpio/gpio-tegra.c @@ -23,6 +23,7 @@ #include #include +#include #include @@ -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++) {