Thread (30 messages) 30 messages, 6 authors, 2011-08-15

RE: [RFC PATCH 08/12] gpio/tegra: Add device tree support

From: Stephen Warren <hidden>
Date: 2011-08-15 15:47:57
Also in: linux-arm-kernel, linux-devicetree, lkml

Belisko Marek wrote at Saturday, August 13, 2011 3:49 AM:
On Sat, Aug 13, 2011 at 12:54 AM, Stephen Warren [off-list ref] wrote:
quoted
Signed-off-by: Stephen Warren <redacted>
---
 drivers/gpio/gpio-tegra.c |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
...
quoted
+static void __init tegra_gpio_probe_dt(struct platform_device *pdev)
+{
+       const __be32 *gpios;
+       u32 gpioslen;
+       int i;
+
+       gpios = of_get_property(pdev->dev.of_node, "nvidia,gpios", &gpioslen);
+       if (gpios == NULL)
+               return;
+
+       gpioslen /= sizeof(*gpios);
+       for (i = 0; i < gpioslen; i++, gpios++) {
+               u32 gpio = be32_to_cpup(gpios);
+               dev_err(&pdev->dev, "Enabling GPIO %d\n", gpio);
Is really necessary to print all enabled gpio's to console? Also seen
same in pinmux probe.
Oops, that's certainly not necessary. That was debugging code, and I meant
to convert to dev_dbg before posting.

-- 
nvpublic
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help