]>
Commit | Line | Data |
---|---|---|
689f2a01 UKK |
1 | /* |
2 | * include/asm-arm/arch-ns9xxx/gpio.h | |
3 | * | |
4 | * Copyright (C) 2007 by Digi International Inc. | |
5 | * All rights reserved. | |
6 | * | |
7 | * This program is free software; you can redistribute it and/or modify it | |
8 | * under the terms of the GNU General Public License version 2 as published by | |
9 | * the Free Software Foundation. | |
10 | */ | |
11 | #ifndef __ASM_ARCH_GPIO_H | |
12 | #define __ASM_ARCH_GPIO_H | |
13 | ||
14 | #include <asm/errno.h> | |
15 | ||
16 | int gpio_request(unsigned gpio, const char *label); | |
17 | ||
18 | void gpio_free(unsigned gpio); | |
19 | ||
20 | int ns9xxx_gpio_configure(unsigned gpio, int inv, int func); | |
21 | ||
22 | int gpio_direction_input(unsigned gpio); | |
23 | ||
24 | int gpio_direction_output(unsigned gpio, int value); | |
25 | ||
26 | int gpio_get_value(unsigned gpio); | |
27 | ||
28 | void gpio_set_value(unsigned gpio, int value); | |
29 | ||
30 | /* | |
31 | * ns9xxx can use gpio pins to trigger an irq, but it's not generic | |
32 | * enough to be supported by the gpio_to_irq/irq_to_gpio interface | |
33 | */ | |
34 | static inline int gpio_to_irq(unsigned gpio) | |
35 | { | |
36 | return -EINVAL; | |
37 | } | |
38 | ||
39 | static inline int irq_to_gpio(unsigned irq) | |
40 | { | |
41 | return -EINVAL; | |
42 | } | |
43 | ||
44 | /* get the cansleep() stubs */ | |
45 | #include <asm-generic/gpio.h> | |
46 | ||
47 | #endif /* ifndef __ASM_ARCH_GPIO_H */ |