summaryrefslogtreecommitdiff
path: root/arch/arm/mach-davinci/da830.c
diff options
context:
space:
mode:
authorKV Sujith <sujithkv@ti.com>2013-08-18 09:18:59 +0400
committerSekhar Nori <nsekhar@ti.com>2013-09-24 09:18:44 +0400
commitf606d38de74a2f2d43d4a57317aaa8f05809fdef (patch)
tree17a92c10af8cd437090453952dc336d1cb2ef045 /arch/arm/mach-davinci/da830.c
parent118150f22d6b4431a1fe2e715de314a5d93836f5 (diff)
downloadlinux-f606d38de74a2f2d43d4a57317aaa8f05809fdef.tar.xz
ARM: davinci: da8xx: support gpio platform device
DaVinci GPIO driver now uses platform device model. Convert DA8XX SoC code to use the new model. Add da8xx_register_gpio() to create platform device for da8xx platforms. Signed-off-by: KV Sujith <sujithkv@ti.com> Signed-off-by: Philip Avinash <avinashphilip@ti.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> [nsekhar@ti.com: simplify commit message] Signed-off-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Diffstat (limited to 'arch/arm/mach-davinci/da830.c')
-rw-r--r--arch/arm/mach-davinci/da830.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c
index d6c746e35ad9..0813b5167e05 100644
--- a/arch/arm/mach-davinci/da830.c
+++ b/arch/arm/mach-davinci/da830.c
@@ -11,6 +11,7 @@
#include <linux/gpio.h>
#include <linux/init.h>
#include <linux/clk.h>
+#include <linux/platform_data/gpio-davinci.h>
#include <asm/mach/map.h>
@@ -20,7 +21,6 @@
#include <mach/common.h>
#include <mach/time.h>
#include <mach/da8xx.h>
-#include <mach/gpio-davinci.h>
#include "clock.h"
#include "mux.h"
@@ -1151,6 +1151,16 @@ static struct davinci_id da830_ids[] = {
},
};
+static struct davinci_gpio_platform_data da830_gpio_platform_data = {
+ .ngpio = 128,
+ .intc_irq_num = DA830_N_CP_INTC_IRQ,
+};
+
+int __init da830_register_gpio(void)
+{
+ return da8xx_register_gpio(&da830_gpio_platform_data);
+}
+
static struct davinci_timer_instance da830_timer_instance[2] = {
{
.base = DA8XX_TIMER64P0_BASE,
@@ -1196,10 +1206,6 @@ static struct davinci_soc_info davinci_soc_info_da830 = {
.intc_irq_prios = da830_default_priorities,
.intc_irq_num = DA830_N_CP_INTC_IRQ,
.timer_info = &da830_timer_info,
- .gpio_type = GPIO_TYPE_DAVINCI,
- .gpio_base = DA8XX_GPIO_BASE,
- .gpio_num = 128,
- .gpio_irq = IRQ_DA8XX_GPIO0,
.emac_pdata = &da8xx_emac_pdata,
};