From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: Erik Gilling <konkers-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Colin Cross <ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>,
Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
spi-devel-general@lis
Cc: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Subject: [PATCH 2/2] gpio/tegra: add devicetree support
Date: Wed, 15 Jun 2011 13:38:04 -0600 [thread overview]
Message-ID: <20110615193759.23641.26212.stgit@ponder> (raw)
In-Reply-To: <20110615193734.23641.8004.stgit@ponder>
Add support for decoding gpios from the device tree
Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
---
.../devicetree/bindings/gpio/gpio_nvidia.txt | 7 +++++++
drivers/gpio/gpio-tegra.c | 10 ++++++++++
2 files changed, 17 insertions(+), 0 deletions(-)
create mode 100644 Documentation/devicetree/bindings/gpio/gpio_nvidia.txt
diff --git a/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt b/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt
new file mode 100644
index 0000000..afb3ff3
--- /dev/null
+++ b/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/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 919d638..13afb88 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++) {
WARNING: multiple messages have this Message-ID (diff)
From: grant.likely@secretlab.ca (Grant Likely)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] gpio/tegra: add devicetree support
Date: Wed, 15 Jun 2011 13:38:04 -0600 [thread overview]
Message-ID: <20110615193759.23641.26212.stgit@ponder> (raw)
In-Reply-To: <20110615193734.23641.8004.stgit@ponder>
Add support for decoding gpios from the device tree
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
.../devicetree/bindings/gpio/gpio_nvidia.txt | 7 +++++++
drivers/gpio/gpio-tegra.c | 10 ++++++++++
2 files changed, 17 insertions(+), 0 deletions(-)
create mode 100644 Documentation/devicetree/bindings/gpio/gpio_nvidia.txt
diff --git a/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt b/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt
new file mode 100644
index 0000000..afb3ff3
--- /dev/null
+++ b/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/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 919d638..13afb88 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++) {
WARNING: multiple messages have this Message-ID (diff)
From: Grant Likely <grant.likely@secretlab.ca>
To: Erik Gilling <konkers@android.com>,
linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org,
Colin Cross <ccross@android.com>, Olof Johansson <olof@lixom.net>,
spi-devel-general@lists.sourceforge.net,
linux-arm-kernel@lists.infradead.org
Cc: Stephen Warren <swarren@nvidia.com>
Subject: [PATCH 2/2] gpio/tegra: add devicetree support
Date: Wed, 15 Jun 2011 13:38:04 -0600 [thread overview]
Message-ID: <20110615193759.23641.26212.stgit@ponder> (raw)
In-Reply-To: <20110615193734.23641.8004.stgit@ponder>
Add support for decoding gpios from the device tree
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
.../devicetree/bindings/gpio/gpio_nvidia.txt | 7 +++++++
drivers/gpio/gpio-tegra.c | 10 ++++++++++
2 files changed, 17 insertions(+), 0 deletions(-)
create mode 100644 Documentation/devicetree/bindings/gpio/gpio_nvidia.txt
diff --git a/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt b/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt
new file mode 100644
index 0000000..afb3ff3
--- /dev/null
+++ b/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/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 919d638..13afb88 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++) {
next prev parent reply other threads:[~2011-06-15 19:38 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-15 19:37 [PATCH 1/2] gpio/tegra: Move Tegra gpio driver to drivers/gpio Grant Likely
2011-06-15 19:37 ` Grant Likely
2011-06-15 19:37 ` Grant Likely
2011-06-15 19:38 ` Grant Likely [this message]
2011-06-15 19:38 ` [PATCH 2/2] gpio/tegra: add devicetree support Grant Likely
2011-06-15 19:38 ` Grant Likely
2011-06-15 20:09 ` Olof Johansson
2011-06-15 20:09 ` Olof Johansson
2011-06-15 20:09 ` Olof Johansson
2011-06-15 19:38 ` Grant Likely
2011-06-15 20:11 ` [PATCH 1/2] gpio/tegra: Move Tegra gpio driver to drivers/gpio Olof Johansson
2011-06-15 20:11 ` Olof Johansson
2011-06-15 20:11 ` Olof Johansson
2011-06-15 20:21 ` Colin Cross
2011-06-15 20:21 ` Colin Cross
2011-06-15 20:21 ` Colin Cross
[not found] ` <BANLkTinij15PZw11Y3Qt=PV1kkP1pw1oaszTdMfD55Cf8cOJkw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-06-15 20:48 ` Grant Likely
2011-06-15 20:48 ` Grant Likely
2011-06-15 20:48 ` Grant Likely
[not found] ` <BANLkTik6C1mBeitYkA+NNM6XAhNY9cbgOw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-06-15 21:00 ` Grant Likely
2011-06-15 21:00 ` Grant Likely
2011-06-15 21:00 ` Grant Likely
[not found] ` <BANLkTik4fna_C-1JHt9KoF4UsYCuqVy6Nw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-06-15 21:02 ` Colin Cross
2011-06-15 21:02 ` Colin Cross
2011-06-15 21:02 ` Colin Cross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110615193759.23641.26212.stgit@ponder \
--to=grant.likely-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
--cc=ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
--cc=konkers-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
--cc=spi-devel-general@lis \
--cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.