2 * arch/arm/mach-orion5x/include/mach/gpio.h
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
9 #ifndef __ASM_ARCH_GPIO_H
10 #define __ASM_ARCH_GPIO_H
12 #include <mach/irqs.h>
13 #include <plat/gpio.h>
14 #include <asm-generic/gpio.h> /* cansleep wrappers */
17 #define GPIO_OUT(pin) ORION5X_DEV_BUS_REG(0x100)
18 #define GPIO_IO_CONF(pin) ORION5X_DEV_BUS_REG(0x104)
19 #define GPIO_BLINK_EN(pin) ORION5X_DEV_BUS_REG(0x108)
20 #define GPIO_IN_POL(pin) ORION5X_DEV_BUS_REG(0x10c)
21 #define GPIO_DATA_IN(pin) ORION5X_DEV_BUS_REG(0x110)
22 #define GPIO_EDGE_CAUSE(pin) ORION5X_DEV_BUS_REG(0x114)
23 #define GPIO_EDGE_MASK(pin) ORION5X_DEV_BUS_REG(0x118)
24 #define GPIO_LEVEL_MASK(pin) ORION5X_DEV_BUS_REG(0x11c)
26 static inline int gpio_to_irq(int pin
)
28 return pin
+ IRQ_ORION5X_GPIO_START
;
31 static inline int irq_to_gpio(int irq
)
33 return irq
- IRQ_ORION5X_GPIO_START
;