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>
This commit is contained in:
Grant Likely
2011-06-15 14:54:14 -06:00
父節點 ea5a9607cb
當前提交 df2212270c
共有 2 個文件被更改,包括 17 次插入0 次删除

查看文件

@@ -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++) {