diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2007-02-10 01:26:32 -0500 |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2007-02-10 01:26:32 -0500 |
commit | b22364c8eec89e6b0c081a237f3b6348df87796f (patch) | |
tree | 233a923281fb640106465d076997ff511efb6edf /include/asm-avr32/arch-at32ap/gpio.h | |
parent | 2c8dc071517ec2843869024dc82be2e246f41064 (diff) | |
parent | 66efc5a7e3061c3597ac43a8bb1026488d57e66b (diff) |
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include/asm-avr32/arch-at32ap/gpio.h')
-rw-r--r-- | include/asm-avr32/arch-at32ap/gpio.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/asm-avr32/arch-at32ap/gpio.h b/include/asm-avr32/arch-at32ap/gpio.h new file mode 100644 index 000000000000..fcb756bdaa8e --- /dev/null +++ b/include/asm-avr32/arch-at32ap/gpio.h | |||
@@ -0,0 +1,27 @@ | |||
1 | #ifndef __ASM_AVR32_ARCH_GPIO_H | ||
2 | #define __ASM_AVR32_ARCH_GPIO_H | ||
3 | |||
4 | #include <linux/compiler.h> | ||
5 | #include <asm/irq.h> | ||
6 | |||
7 | |||
8 | /* Arch-neutral GPIO API */ | ||
9 | int __must_check gpio_request(unsigned int gpio, const char *label); | ||
10 | void gpio_free(unsigned int gpio); | ||
11 | |||
12 | int gpio_direction_input(unsigned int gpio); | ||
13 | int gpio_direction_output(unsigned int gpio); | ||
14 | int gpio_get_value(unsigned int gpio); | ||
15 | void gpio_set_value(unsigned int gpio, int value); | ||
16 | |||
17 | static inline int gpio_to_irq(unsigned int gpio) | ||
18 | { | ||
19 | return gpio + GPIO_IRQ_BASE; | ||
20 | } | ||
21 | |||
22 | static inline int irq_to_gpio(unsigned int irq) | ||
23 | { | ||
24 | return irq - GPIO_IRQ_BASE; | ||
25 | } | ||
26 | |||
27 | #endif /* __ASM_AVR32_ARCH_GPIO_H */ | ||