diff options
author | Ryan Mallon <ryan@bluewatersys.com> | 2009-02-10 15:02:08 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-02-12 05:45:08 -0500 |
commit | f373e8c0639f1720d2d0fe414990f504e113c2ba (patch) | |
tree | 2b903b23117f9f94734f4eeec471139504452cb2 /arch/arm/mach-at91/include | |
parent | b7eb1a5ed50c6f622664bb8a7113313fa8b6dd1e (diff) |
[ARM] 5373/2: Add gpiolib support to AT91
Add support for gpiolib, including debugfs output, to the AT91 family.
The at91_get/set_gpio_value calls still exist since they are used by the
atmel serial driver.
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-at91/include')
-rw-r--r-- | arch/arm/mach-at91/include/mach/gpio.h | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/arch/arm/mach-at91/include/mach/gpio.h b/arch/arm/mach-at91/include/mach/gpio.h index bffa6741a751..04c91e31c9c5 100644 --- a/arch/arm/mach-at91/include/mach/gpio.h +++ b/arch/arm/mach-at91/include/mach/gpio.h | |||
@@ -213,32 +213,12 @@ extern void at91_gpio_resume(void); | |||
213 | */ | 213 | */ |
214 | 214 | ||
215 | #include <asm/errno.h> | 215 | #include <asm/errno.h> |
216 | |||
217 | static inline int gpio_request(unsigned gpio, const char *label) | ||
218 | { | ||
219 | return 0; | ||
220 | } | ||
221 | |||
222 | static inline void gpio_free(unsigned gpio) | ||
223 | { | ||
224 | might_sleep(); | ||
225 | } | ||
226 | |||
227 | extern int gpio_direction_input(unsigned gpio); | ||
228 | extern int gpio_direction_output(unsigned gpio, int value); | ||
229 | |||
230 | static inline int gpio_get_value(unsigned gpio) | ||
231 | { | ||
232 | return at91_get_gpio_value(gpio); | ||
233 | } | ||
234 | |||
235 | static inline void gpio_set_value(unsigned gpio, int value) | ||
236 | { | ||
237 | at91_set_gpio_value(gpio, value); | ||
238 | } | ||
239 | |||
240 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | 216 | #include <asm-generic/gpio.h> /* cansleep wrappers */ |
241 | 217 | ||
218 | #define gpio_get_value __gpio_get_value | ||
219 | #define gpio_set_value __gpio_set_value | ||
220 | #define gpio_cansleep __gpio_cansleep | ||
221 | |||
242 | static inline int gpio_to_irq(unsigned gpio) | 222 | static inline int gpio_to_irq(unsigned gpio) |
243 | { | 223 | { |
244 | return gpio; | 224 | return gpio; |