diff options
-rw-r--r-- | arch/arm/mach-omap2/common.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_device.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/pdata-quirks.c | 16 |
3 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index e30ef6797c63..240db38f232c 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h | |||
@@ -293,6 +293,7 @@ static inline void omap4_cpu_resume(void) | |||
293 | #endif | 293 | #endif |
294 | 294 | ||
295 | void pdata_quirks_init(struct of_device_id *); | 295 | void pdata_quirks_init(struct of_device_id *); |
296 | void omap_auxdata_legacy_init(struct device *dev); | ||
296 | void omap_pcs_legacy_init(int irq, void (*rearm)(void)); | 297 | void omap_pcs_legacy_init(int irq, void (*rearm)(void)); |
297 | 298 | ||
298 | struct omap_sdrc_params; | 299 | struct omap_sdrc_params; |
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c index 53f0735817bb..828f538b1c4e 100644 --- a/arch/arm/mach-omap2/omap_device.c +++ b/arch/arm/mach-omap2/omap_device.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/of.h> | 36 | #include <linux/of.h> |
37 | #include <linux/notifier.h> | 37 | #include <linux/notifier.h> |
38 | 38 | ||
39 | #include "common.h" | ||
39 | #include "soc.h" | 40 | #include "soc.h" |
40 | #include "omap_device.h" | 41 | #include "omap_device.h" |
41 | #include "omap_hwmod.h" | 42 | #include "omap_hwmod.h" |
@@ -200,6 +201,7 @@ static int _omap_device_notifier_call(struct notifier_block *nb, | |||
200 | case BUS_NOTIFY_ADD_DEVICE: | 201 | case BUS_NOTIFY_ADD_DEVICE: |
201 | if (pdev->dev.of_node) | 202 | if (pdev->dev.of_node) |
202 | omap_device_build_from_dt(pdev); | 203 | omap_device_build_from_dt(pdev); |
204 | omap_auxdata_legacy_init(dev); | ||
203 | /* fall through */ | 205 | /* fall through */ |
204 | default: | 206 | default: |
205 | od = to_omap_device(pdev); | 207 | od = to_omap_device(pdev); |
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 6a7554515b6e..47afff3b9c37 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c | |||
@@ -27,6 +27,7 @@ struct pdata_init { | |||
27 | }; | 27 | }; |
28 | 28 | ||
29 | struct of_dev_auxdata omap_auxdata_lookup[]; | 29 | struct of_dev_auxdata omap_auxdata_lookup[]; |
30 | static struct twl4030_gpio_platform_data twl_gpio_auxdata; | ||
30 | 31 | ||
31 | /* | 32 | /* |
32 | * Create alias for USB host PHY clock. | 33 | * Create alias for USB host PHY clock. |
@@ -137,6 +138,21 @@ void omap_pcs_legacy_init(int irq, void (*rearm)(void)) | |||
137 | } | 138 | } |
138 | 139 | ||
139 | /* | 140 | /* |
141 | * GPIOs for TWL are initialized by the I2C bus and need custom | ||
142 | * handing until DSS has device tree bindings. | ||
143 | */ | ||
144 | void omap_auxdata_legacy_init(struct device *dev) | ||
145 | { | ||
146 | if (dev->platform_data) | ||
147 | return; | ||
148 | |||
149 | if (strcmp("twl4030-gpio", dev_name(dev))) | ||
150 | return; | ||
151 | |||
152 | dev->platform_data = &twl_gpio_auxdata; | ||
153 | } | ||
154 | |||
155 | /* | ||
140 | * Few boards still need auxdata populated before we populate | 156 | * Few boards still need auxdata populated before we populate |
141 | * the dev entries in of_platform_populate(). | 157 | * the dev entries in of_platform_populate(). |
142 | */ | 158 | */ |