summaryrefslogtreecommitdiff
path: root/arch/arm/mach-ux500/cpu-db8500.c
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2012-02-06 19:22:21 (GMT)
committerArnd Bergmann <arnd@arndb.de>2012-02-13 06:31:29 (GMT)
commit18403424c4fe5bac509bf52343f5d5407d45ee3a (patch)
treeae9a0f3056c712ee7f8042d667b267bedda92abf /arch/arm/mach-ux500/cpu-db8500.c
parentd65b4e98d7ea3038b767b70fe8be959b2913f16d (diff)
downloadlinux-18403424c4fe5bac509bf52343f5d5407d45ee3a.tar.xz
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 7176ee7..1e8a2cb 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[] = {
U8500_GPIOBANK8_BASE,
};
-static void __init db8500_add_gpios(void)
+static void __init db8500_add_gpios(struct device *parent)
{
struct nmk_gpio_platform_data pdata = {
.supports_sleepmode = true,
};
- dbx500_add_gpios(ARRAY_AND_SIZE(db8500_gpio_base),
+ dbx500_add_gpios(parent, ARRAY_AND_SIZE(db8500_gpio_base),
IRQ_DB8500_GPIO0, &pdata);
}
@@ -167,14 +167,15 @@ static int usb_db8500_tx_dma_cfg[] = {
/*
* This function is called from the board init
*/
-void __init u8500_init_devices(void)
+struct device* __init u8500_init_devices(void)
{
- db8500_add_rtc();
- db8500_add_gpios();
- db8500_add_usb(usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg);
+ db8500_add_rtc(NULL);
+ db8500_add_gpios(NULL);
+ db8500_add_usb(NULL, usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg);
platform_device_register_simple("cpufreq-u8500", -1, NULL, 0);
platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs));
- return ;
+ /* FIXME: Return value to be a real parent. */
+ return NULL;
}