diff options
author | Ryan Mallon <ryan@bluewatersys.com> | 2008-04-15 21:56:35 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-04-19 09:01:43 -0400 |
commit | b685004f8dea2daae0306edcd358ed7de751aee9 (patch) | |
tree | db47ac6b8bf719af9d09fda9c1daf8983979a1f6 /include/asm-arm/arch-ep93xx | |
parent | 05dda977f2574c3341abef9b74c27d2b362e1e3a (diff) |
[ARM] 4988/1: Add GPIO lib support to the EP93xx
Adds support for the generic GPIO lib to the EP93xx family. The gpio
handling code has been moved from core.c to a new file called gpio.c.
The GPIO based IRQ code has not been changed.
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/arch-ep93xx')
-rw-r--r-- | include/asm-arm/arch-ep93xx/gpio.h | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/include/asm-arm/arch-ep93xx/gpio.h b/include/asm-arm/arch-ep93xx/gpio.h index 9b1864bbd9a8..186e7c715f8a 100644 --- a/include/asm-arm/arch-ep93xx/gpio.h +++ b/include/asm-arm/arch-ep93xx/gpio.h | |||
@@ -101,30 +101,17 @@ | |||
101 | 101 | ||
102 | /* new generic GPIO API - see Documentation/gpio.txt */ | 102 | /* new generic GPIO API - see Documentation/gpio.txt */ |
103 | 103 | ||
104 | static inline int gpio_request(unsigned gpio, const char *label) | 104 | #include <asm-generic/gpio.h> |
105 | { | ||
106 | if (gpio > EP93XX_GPIO_LINE_MAX) | ||
107 | return -EINVAL; | ||
108 | return 0; | ||
109 | } | ||
110 | 105 | ||
111 | static inline void gpio_free(unsigned gpio) | 106 | #define gpio_get_value __gpio_get_value |
112 | { | 107 | #define gpio_set_value __gpio_set_value |
113 | } | 108 | #define gpio_cansleep __gpio_cansleep |
114 | |||
115 | int gpio_direction_input(unsigned gpio); | ||
116 | int gpio_direction_output(unsigned gpio, int value); | ||
117 | int gpio_get_value(unsigned gpio); | ||
118 | void gpio_set_value(unsigned gpio, int value); | ||
119 | |||
120 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
121 | 109 | ||
122 | /* | 110 | /* |
123 | * Map GPIO A0..A7 (0..7) to irq 64..71, | 111 | * Map GPIO A0..A7 (0..7) to irq 64..71, |
124 | * B0..B7 (7..15) to irq 72..79, and | 112 | * B0..B7 (7..15) to irq 72..79, and |
125 | * F0..F7 (16..24) to irq 80..87. | 113 | * F0..F7 (16..24) to irq 80..87. |
126 | */ | 114 | */ |
127 | |||
128 | static inline int gpio_to_irq(unsigned gpio) | 115 | static inline int gpio_to_irq(unsigned gpio) |
129 | { | 116 | { |
130 | if (gpio <= EP93XX_GPIO_LINE_MAX_IRQ) | 117 | if (gpio <= EP93XX_GPIO_LINE_MAX_IRQ) |