aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/cpu-db8500.c
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2012-02-06 14:22:21 -0500
committerArnd Bergmann <arnd@arndb.de>2012-02-13 01:31:29 -0500
commit18403424c4fe5bac509bf52343f5d5407d45ee3a (patch)
treeae9a0f3056c712ee7f8042d667b267bedda92abf /arch/arm/mach-ux500/cpu-db8500.c
parentd65b4e98d7ea3038b767b70fe8be959b2913f16d (diff)
ARM: ux500: pass parent pointer to each platform device
This patch provides a means for any device within ux500 platform code to allocate its own parent. This is particularly prudent with the introduction of /sys/devices/socX, as a device can now proclaim to be integral part of an SoC, rather than a more generic platform device. Latter patches make good use of this functionality. Signed-off-by: Lee Jones <lee.jones@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-ux500/cpu-db8500.c')
-rw-r--r--arch/arm/mach-ux500/cpu-db8500.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index 7176ee7491ab..1e8a2cb7e503 100644
--- a/arch/arm/mach-ux500/cpu-db8500.c
+++ b/arch/arm/mach-ux500/cpu-db8500.c
@@ -132,13 +132,13 @@ static resource_size_t __initdata db8500_gpio_base[] = {
132 U8500_GPIOBANK8_BASE, 132 U8500_GPIOBANK8_BASE,
133}; 133};
134 134
135static void __init db8500_add_gpios(void) 135static void __init db8500_add_gpios(struct device *parent)
136{ 136{
137 struct nmk_gpio_platform_data pdata = { 137 struct nmk_gpio_platform_data pdata = {
138 .supports_sleepmode = true, 138 .supports_sleepmode = true,
139 }; 139 };
140 140
141 dbx500_add_gpios(ARRAY_AND_SIZE(db8500_gpio_base), 141 dbx500_add_gpios(parent, ARRAY_AND_SIZE(db8500_gpio_base),
142 IRQ_DB8500_GPIO0, &pdata); 142 IRQ_DB8500_GPIO0, &pdata);
143} 143}
144 144
@@ -167,14 +167,15 @@ static int usb_db8500_tx_dma_cfg[] = {
167/* 167/*
168 * This function is called from the board init 168 * This function is called from the board init
169 */ 169 */
170void __init u8500_init_devices(void) 170struct device* __init u8500_init_devices(void)
171{ 171{
172 db8500_add_rtc(); 172 db8500_add_rtc(NULL);
173 db8500_add_gpios(); 173 db8500_add_gpios(NULL);
174 db8500_add_usb(usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg); 174 db8500_add_usb(NULL, usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg);
175 175
176 platform_device_register_simple("cpufreq-u8500", -1, NULL, 0); 176 platform_device_register_simple("cpufreq-u8500", -1, NULL, 0);
177 platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs)); 177 platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs));
178 178
179 return ; 179 /* FIXME: Return value to be a real parent. */
180 return NULL;
180} 181}