diff options
author | Philip Avinash <avinashphilip@ti.com> | 2013-08-18 10:49:00 +0530 |
---|---|---|
committer | Sekhar Nori <nsekhar@ti.com> | 2013-09-24 12:03:34 +0530 |
commit | 9cc1515cbd2155df8530ba8438b0b5bfdff50117 (patch) | |
tree | c119d4660ab09b8d643b5fe73a6c308dd927811a /arch/arm/mach-davinci/devices.c | |
parent | f606d38de74a2f2d43d4a57317aaa8f05809fdef (diff) | |
download | linux-9cc1515cbd2155df8530ba8438b0b5bfdff50117.tar.bz2 |
ARM: davinci: support gpio platform device
DaVinci GPIO driver now uses platform device model.
Add a GPIO platform register API to convert the
traditional DaVinci SoCs to use the new model.
While at it, also group related include files together
wherever that was not the case.
Signed-off-by: Philip Avinash <avinashphilip@ti.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
[nsekhar@ti.com: move function declaration to local header,
simplify commit message, merge SoC specific
portions from other patches into this patch]
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Diffstat (limited to 'arch/arm/mach-davinci/devices.c')
-rw-r--r-- | arch/arm/mach-davinci/devices.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/devices.c b/arch/arm/mach-davinci/devices.c index 111573c0aad1..3996e98f52fb 100644 --- a/arch/arm/mach-davinci/devices.c +++ b/arch/arm/mach-davinci/devices.c @@ -318,6 +318,19 @@ static void davinci_init_wdt(void) platform_device_register(&davinci_wdt_device); } +static struct platform_device davinci_gpio_device = { + .name = "davinci_gpio", + .id = -1, +}; + +int davinci_gpio_register(struct resource *res, int size, void *pdata) +{ + davinci_gpio_device.resource = res; + davinci_gpio_device.num_resources = size; + davinci_gpio_device.dev.platform_data = pdata; + return platform_device_register(&davinci_gpio_device); +} + /*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/ |