diff options
author | Haojian Zhuang <haojian.zhuang@linaro.org> | 2013-04-09 06:12:04 -0400 |
---|---|---|
committer | Haojian Zhuang <haojian.zhuang@linaro.org> | 2013-04-10 22:00:05 -0400 |
commit | b8f649f1f531914a30ecb420e7565ee04dccc2ad (patch) | |
tree | 42b2bc905fce1c892511ff81a250d7330b33a4ed /arch/arm/mach-pxa/pxa3xx.c | |
parent | 2cab0292285ce3180224c130d2fb1104aee44ff1 (diff) |
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.c | 11 |
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 @@ | |||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/gpio-pxa.h> | ||
18 | #include <linux/pm.h> | 19 | #include <linux/pm.h> |
19 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
20 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
@@ -436,6 +437,10 @@ void __init pxa3xx_set_i2c_power_info(struct i2c_pxa_platform_data *info) | |||
436 | pxa_register_device(&pxa3xx_device_i2c_power, info); | 437 | pxa_register_device(&pxa3xx_device_i2c_power, info); |
437 | } | 438 | } |
438 | 439 | ||
440 | static struct pxa_gpio_platform_data pxa3xx_gpio_pdata = { | ||
441 | .irq_base = PXA_GPIO_TO_IRQ(0), | ||
442 | }; | ||
443 | |||
439 | static struct platform_device *devices[] __initdata = { | 444 | static struct platform_device *devices[] __initdata = { |
440 | &pxa27x_device_udc, | 445 | &pxa27x_device_udc, |
441 | &pxa_device_pmu, | 446 | &pxa_device_pmu, |
@@ -488,8 +493,12 @@ static int __init pxa3xx_init(void) | |||
488 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); | 493 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); |
489 | if (ret) | 494 | if (ret) |
490 | return ret; | 495 | return ret; |
491 | if (cpu_is_pxa300() || cpu_is_pxa310() || cpu_is_pxa320()) | 496 | if (cpu_is_pxa300() || cpu_is_pxa310() || cpu_is_pxa320()) { |
497 | platform_device_add_data(&pxa3xx_device_gpio, | ||
498 | &pxa3xx_gpio_pdata, | ||
499 | sizeof(pxa3xx_gpio_pdata)); | ||
492 | ret = platform_device_register(&pxa3xx_device_gpio); | 500 | ret = platform_device_register(&pxa3xx_device_gpio); |
501 | } | ||
493 | } | 502 | } |
494 | 503 | ||
495 | return ret; | 504 | return ret; |