From b8f649f1f531914a30ecb420e7565ee04dccc2ad Mon Sep 17 00:00:00 2001 From: Haojian Zhuang Date: Tue, 9 Apr 2013 18:12:04 +0800 Subject: 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 Acked-by: Linus Walleij --- arch/arm/mach-pxa/pxa3xx.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'arch/arm/mach-pxa/pxa3xx.c') 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 #include #include +#include #include #include #include @@ -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; -- cgit v1.2.3-59-g8ed1b