summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/cpu-db8500.c
diff options
context:
space:
mode:
authorLee Jones2012-02-06 20:22:21 +0100
committerArnd Bergmann2012-02-13 07:31:29 +0100
commit18403424c4fe5bac509bf52343f5d5407d45ee3a (patch)
treeae9a0f3056c712ee7f8042d667b267bedda92abf /arch/arm/mach-ux500/cpu-db8500.c
parentLinux 3.3-rc3 (diff)
downloadkernel-qcow2-linux-18403424c4fe5bac509bf52343f5d5407d45ee3a.tar.gz
kernel-qcow2-linux-18403424c4fe5bac509bf52343f5d5407d45ee3a.tar.xz
kernel-qcow2-linux-18403424c4fe5bac509bf52343f5d5407d45ee3a.zip
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[] = {
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;
}