aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-orion5x/include/mach/gpio.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-orion5x/include/mach/gpio.h')
-rw-r--r--arch/arm/mach-orion5x/include/mach/gpio.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/arm/mach-orion5x/include/mach/gpio.h b/arch/arm/mach-orion5x/include/mach/gpio.h
new file mode 100644
index 00000000000..65dc136a86f
--- /dev/null
+++ b/arch/arm/mach-orion5x/include/mach/gpio.h
@@ -0,0 +1,28 @@
1/*
2 * arch/arm/mach-orion5x/include/mach/gpio.h
3 *
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.
7 */
8
9extern int gpio_request(unsigned pin, const char *label);
10extern void gpio_free(unsigned pin);
11extern int gpio_direction_input(unsigned pin);
12extern int gpio_direction_output(unsigned pin, int value);
13extern int gpio_get_value(unsigned pin);
14extern void gpio_set_value(unsigned pin, int value);
15extern void orion5x_gpio_set_blink(unsigned pin, int blink);
16extern void gpio_display(void); /* debug */
17
18static inline int gpio_to_irq(int pin)
19{
20 return pin + IRQ_ORION5X_GPIO_START;
21}
22
23static inline int irq_to_gpio(int irq)
24{
25 return irq - IRQ_ORION5X_GPIO_START;
26}
27
28#include <asm-generic/gpio.h> /* cansleep wrappers */