diff options
author | Benoit Cousson <b-cousson@ti.com> | 2011-08-16 05:51:54 -0400 |
---|---|---|
committer | Benoit Cousson <b-cousson@ti.com> | 2012-03-12 09:58:22 -0400 |
commit | e3e5a92db430689fe918041e99cb04b8761f5a50 (patch) | |
tree | 59e7b7a3cea73f32932d3b82d82c9bab51c87da7 /arch/arm/mach-omap2/gpio.c | |
parent | 93651b85bbd1479321af1de0d14ca95c231e538a (diff) |
arm/dts: OMAP4: Add gpio nodes
Add the 6 GPIOs controller nodes present in OMAP4.
Remove gpio static device initialisation if DT is populated.
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'arch/arm/mach-omap2/gpio.c')
-rw-r--r-- | arch/arm/mach-omap2/gpio.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/gpio.c b/arch/arm/mach-omap2/gpio.c index 8cbfbc2918ce..8412746bad71 100644 --- a/arch/arm/mach-omap2/gpio.c +++ b/arch/arm/mach-omap2/gpio.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/err.h> | 20 | #include <linux/err.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/of.h> | ||
23 | 24 | ||
24 | #include <plat/omap_hwmod.h> | 25 | #include <plat/omap_hwmod.h> |
25 | #include <plat/omap_device.h> | 26 | #include <plat/omap_device.h> |
@@ -122,7 +123,10 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused) | |||
122 | */ | 123 | */ |
123 | static int __init omap2_gpio_init(void) | 124 | static int __init omap2_gpio_init(void) |
124 | { | 125 | { |
125 | return omap_hwmod_for_each_by_class("gpio", omap2_gpio_dev_init, | 126 | /* If dtb is there, the devices will be created dynamically */ |
126 | NULL); | 127 | if (of_have_populated_dt()) |
128 | return -ENODEV; | ||
129 | |||
130 | return omap_hwmod_for_each_by_class("gpio", omap2_gpio_dev_init, NULL); | ||
127 | } | 131 | } |
128 | postcore_initcall(omap2_gpio_init); | 132 | postcore_initcall(omap2_gpio_init); |