diff options
Diffstat (limited to 'arch/arm/mach-pxa/include/mach/gpio.h')
-rw-r--r-- | arch/arm/mach-pxa/include/mach/gpio.h | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/arch/arm/mach-pxa/include/mach/gpio.h b/arch/arm/mach-pxa/include/mach/gpio.h index 004cade7bb13..0248e433bc98 100644 --- a/arch/arm/mach-pxa/include/mach/gpio.h +++ b/arch/arm/mach-pxa/include/mach/gpio.h | |||
@@ -25,24 +25,8 @@ | |||
25 | #define __ASM_ARCH_PXA_GPIO_H | 25 | #define __ASM_ARCH_PXA_GPIO_H |
26 | 26 | ||
27 | #include <asm-generic/gpio.h> | 27 | #include <asm-generic/gpio.h> |
28 | /* The defines for the driver are needed for the accelerated accessors */ | ||
29 | #include "gpio-pxa.h" | ||
30 | 28 | ||
31 | #define gpio_to_irq(gpio) IRQ_GPIO(gpio) | 29 | #include <mach/irqs.h> |
30 | #include <mach/hardware.h> | ||
32 | 31 | ||
33 | static inline int irq_to_gpio(unsigned int irq) | ||
34 | { | ||
35 | int gpio; | ||
36 | |||
37 | if (irq == IRQ_GPIO0 || irq == IRQ_GPIO1) | ||
38 | return irq - IRQ_GPIO0; | ||
39 | |||
40 | gpio = irq - PXA_GPIO_IRQ_BASE; | ||
41 | if (gpio >= 2 && gpio < NR_BUILTIN_GPIO) | ||
42 | return gpio; | ||
43 | |||
44 | return -1; | ||
45 | } | ||
46 | |||
47 | #include <plat/gpio.h> | ||
48 | #endif | 32 | #endif |