summaryrefslogtreecommitdiff
path: root/arch/arm/mach-ux500/devices-common.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/devices-common.c
parentd65b4e98d7ea3038b767b70fe8be959b2913f16d (diff)
downloadlinux-fsl-qoriq-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/devices-common.c')
-rw-r--r--arch/arm/mach-ux500/devices-common.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/arm/mach-ux500/devices-common.c b/arch/arm/mach-ux500/devices-common.c
index c563e54..96be248 100644
--- a/arch/arm/mach-ux500/devices-common.c
+++ b/arch/arm/mach-ux500/devices-common.c
@@ -20,8 +20,9 @@
#include "devices-common.h"
struct amba_device *
-dbx500_add_amba_device(const char *name, resource_size_t base,
- int irq, void *pdata, unsigned int periphid)
+dbx500_add_amba_device(struct device *parent, const char *name,
+ resource_size_t base, int irq, void *pdata,
+ unsigned int periphid)
{
struct amba_device *dev;
int ret;
@@ -109,7 +110,7 @@ dbx500_add_platform_device_4k1irq(const char *name, int id,
}
static struct platform_device *
-dbx500_add_gpio(int id, resource_size_t addr, int irq,
+dbx500_add_gpio(struct device *parent, int id, resource_size_t addr, int irq,
struct nmk_gpio_platform_data *pdata)
{
struct resource resources[] = {
@@ -130,8 +131,8 @@ dbx500_add_gpio(int id, resource_size_t addr, int irq,
pdata, sizeof(*pdata));
}
-void dbx500_add_gpios(resource_size_t *base, int num, int irq,
- struct nmk_gpio_platform_data *pdata)
+void dbx500_add_gpios(struct device *parent, resource_size_t *base, int num,
+ int irq, struct nmk_gpio_platform_data *pdata)
{
int first = 0;
int i;
@@ -141,6 +142,6 @@ void dbx500_add_gpios(resource_size_t *base, int num, int irq,
pdata->first_irq = NOMADIK_GPIO_TO_IRQ(first);
pdata->num_gpio = 32;
- dbx500_add_gpio(i, base[i], irq, pdata);
+ dbx500_add_gpio(parent, i, base[i], irq, pdata);
}
}