summaryrefslogtreecommitdiff
path: root/arch/arm/mach-pxa/pxa3xx.c
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@linaro.org>2013-04-09 14:12:04 +0400
committerHaojian Zhuang <haojian.zhuang@linaro.org>2013-04-11 06:00:05 +0400
commitb8f649f1f531914a30ecb420e7565ee04dccc2ad (patch)
tree42b2bc905fce1c892511ff81a250d7330b33a4ed /arch/arm/mach-pxa/pxa3xx.c
parent2cab0292285ce3180224c130d2fb1104aee44ff1 (diff)
downloadlinux-b8f649f1f531914a30ecb420e7565ee04dccc2ad.tar.xz
ARM: pxa: move PXA_GPIO_TO_IRQ macro
Since PXA_GPIO_TO_IRQ() & MMP_GPIO_TO_IRQ() macro are depended on arch code, move them from gpio driver to platform driver instead. Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-pxa/pxa3xx.c')
-rw-r--r--arch/arm/mach-pxa/pxa3xx.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index 572666a1e4a8..87011f3de69d 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -15,6 +15,7 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
+#include <linux/gpio-pxa.h>
#include <linux/pm.h>
#include <linux/platform_device.h>
#include <linux/irq.h>
@@ -436,6 +437,10 @@ void __init pxa3xx_set_i2c_power_info(struct i2c_pxa_platform_data *info)
pxa_register_device(&pxa3xx_device_i2c_power, info);
}
+static struct pxa_gpio_platform_data pxa3xx_gpio_pdata = {
+ .irq_base = PXA_GPIO_TO_IRQ(0),
+};
+
static struct platform_device *devices[] __initdata = {
&pxa27x_device_udc,
&pxa_device_pmu,
@@ -488,8 +493,12 @@ static int __init pxa3xx_init(void)
ret = platform_add_devices(devices, ARRAY_SIZE(devices));
if (ret)
return ret;
- if (cpu_is_pxa300() || cpu_is_pxa310() || cpu_is_pxa320())
+ if (cpu_is_pxa300() || cpu_is_pxa310() || cpu_is_pxa320()) {
+ platform_device_add_data(&pxa3xx_device_gpio,
+ &pxa3xx_gpio_pdata,
+ sizeof(pxa3xx_gpio_pdata));
ret = platform_device_register(&pxa3xx_device_gpio);
+ }
}
return ret;