RT-AC66 3.0.0.4.374.130 core
[tomato.git] / release / src-rt-6.x / linux / linux-2.6 / include / asm-avr32 / arch-at32ap / gpio.h
blobaf7f9535bab32bcaf29a1d253756cfb3f7526142
1 #ifndef __ASM_AVR32_ARCH_GPIO_H
2 #define __ASM_AVR32_ARCH_GPIO_H
4 #include <linux/compiler.h>
5 #include <asm/irq.h>
8 /* Arch-neutral GPIO API */
9 int __must_check gpio_request(unsigned int gpio, const char *label);
10 void gpio_free(unsigned int gpio);
12 int gpio_direction_input(unsigned int gpio);
13 int gpio_direction_output(unsigned int gpio, int value);
14 int gpio_get_value(unsigned int gpio);
15 void gpio_set_value(unsigned int gpio, int value);
17 #include <asm-generic/gpio.h> /* cansleep wrappers */
19 static inline int gpio_to_irq(unsigned int gpio)
21 return gpio + GPIO_IRQ_BASE;
24 static inline int irq_to_gpio(unsigned int irq)
26 return irq - GPIO_IRQ_BASE;
29 #endif /* __ASM_AVR32_ARCH_GPIO_H */