diff options
Diffstat (limited to 'arch/arm/mach-ks8695/include/mach/gpio.h')
-rw-r--r-- | arch/arm/mach-ks8695/include/mach/gpio.h | 49 |
1 files changed, 12 insertions, 37 deletions
diff --git a/arch/arm/mach-ks8695/include/mach/gpio.h b/arch/arm/mach-ks8695/include/mach/gpio.h index d4af5c335f16..86312d476bc6 100644 --- a/arch/arm/mach-ks8695/include/mach/gpio.h +++ b/arch/arm/mach-ks8695/include/mach/gpio.h | |||
@@ -30,53 +30,28 @@ | |||
30 | #define KS8695_GPIO_14 14 | 30 | #define KS8695_GPIO_14 14 |
31 | #define KS8695_GPIO_15 15 | 31 | #define KS8695_GPIO_15 15 |
32 | 32 | ||
33 | |||
34 | /* | 33 | /* |
35 | * Configure GPIO pin as external interrupt source. | 34 | * Configure GPIO pin as external interrupt source. |
36 | */ | 35 | */ |
37 | int __init_or_module ks8695_gpio_interrupt(unsigned int pin, unsigned int type); | 36 | extern int ks8695_gpio_interrupt(unsigned int pin, unsigned int type); |
38 | |||
39 | /* | ||
40 | * Configure the GPIO line as an input. | ||
41 | */ | ||
42 | int __init_or_module gpio_direction_input(unsigned int pin); | ||
43 | |||
44 | /* | ||
45 | * Configure the GPIO line as an output, with default state. | ||
46 | */ | ||
47 | int __init_or_module gpio_direction_output(unsigned int pin, unsigned int state); | ||
48 | |||
49 | /* | ||
50 | * Set the state of an output GPIO line. | ||
51 | */ | ||
52 | void gpio_set_value(unsigned int pin, unsigned int state); | ||
53 | |||
54 | /* | ||
55 | * Read the state of a GPIO line. | ||
56 | */ | ||
57 | int gpio_get_value(unsigned int pin); | ||
58 | |||
59 | /* | ||
60 | * Map GPIO line to IRQ number. | ||
61 | */ | ||
62 | int gpio_to_irq(unsigned int pin); | ||
63 | 37 | ||
64 | /* | 38 | /* |
65 | * Map IRQ number to GPIO line. | 39 | * Map IRQ number to GPIO line. |
66 | */ | 40 | */ |
67 | int irq_to_gpio(unsigned int irq); | 41 | extern int irq_to_gpio(unsigned int irq); |
68 | |||
69 | 42 | ||
70 | #include <asm-generic/gpio.h> | 43 | #include <asm-generic/gpio.h> |
71 | 44 | ||
72 | static inline int gpio_request(unsigned int pin, const char *label) | 45 | /* If it turns out that we need to optimise GPIO access for the |
73 | { | 46 | * Micrel's GPIOs, then these can be changed to check their argument |
74 | return 0; | 47 | * directly as static inlines. However for now it's probably not |
75 | } | 48 | * worthwhile. |
49 | */ | ||
50 | #define gpio_get_value __gpio_get_value | ||
51 | #define gpio_set_value __gpio_set_value | ||
52 | #define gpio_to_irq __gpio_to_irq | ||
76 | 53 | ||
77 | static inline void gpio_free(unsigned int pin) | 54 | /* Register the GPIOs */ |
78 | { | 55 | extern void ks8695_register_gpios(void); |
79 | might_sleep(); | ||
80 | } | ||
81 | 56 | ||
82 | #endif | 57 | #endif |