diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2007-02-20 14:13:30 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-02-20 14:13:30 -0500 |
commit | 5a84d159061d914c8dd4aa372ac6e9529c2be453 (patch) | |
tree | 9b08af78085334af44414adafe0096276f8fe0ff /include/asm-arm/arch-at91 | |
parent | e80a0e6e7ccdf64575d4384cb4172860422f5b81 (diff) | |
parent | 7d477a04a619e90ee08724e8f2d8803c6bdfcef8 (diff) |
Merge ARM fixes
Diffstat (limited to 'include/asm-arm/arch-at91')
-rw-r--r-- | include/asm-arm/arch-at91/gpio.h | 48 |
1 files changed, 46 insertions, 2 deletions
diff --git a/include/asm-arm/arch-at91/gpio.h b/include/asm-arm/arch-at91/gpio.h index 256f9b200ab2..98ad2114f43a 100644 --- a/include/asm-arm/arch-at91/gpio.h +++ b/include/asm-arm/arch-at91/gpio.h | |||
@@ -188,6 +188,7 @@ | |||
188 | 188 | ||
189 | #ifndef __ASSEMBLY__ | 189 | #ifndef __ASSEMBLY__ |
190 | /* setup setup routines, called from board init or driver probe() */ | 190 | /* setup setup routines, called from board init or driver probe() */ |
191 | extern int __init_or_module at91_set_GPIO_periph(unsigned pin, int use_pullup); | ||
191 | extern int __init_or_module at91_set_A_periph(unsigned pin, int use_pullup); | 192 | extern int __init_or_module at91_set_A_periph(unsigned pin, int use_pullup); |
192 | extern int __init_or_module at91_set_B_periph(unsigned pin, int use_pullup); | 193 | extern int __init_or_module at91_set_B_periph(unsigned pin, int use_pullup); |
193 | extern int __init_or_module at91_set_gpio_input(unsigned pin, int use_pullup); | 194 | extern int __init_or_module at91_set_gpio_input(unsigned pin, int use_pullup); |
@@ -202,7 +203,50 @@ extern int at91_get_gpio_value(unsigned pin); | |||
202 | /* callable only from core power-management code */ | 203 | /* callable only from core power-management code */ |
203 | extern void at91_gpio_suspend(void); | 204 | extern void at91_gpio_suspend(void); |
204 | extern void at91_gpio_resume(void); | 205 | extern void at91_gpio_resume(void); |
205 | #endif | ||
206 | 206 | ||
207 | #endif | 207 | /*-------------------------------------------------------------------------*/ |
208 | |||
209 | /* wrappers for "new style" GPIO calls. the old AT91-specfic ones should | ||
210 | * eventually be removed (along with this errno.h inclusion), and the | ||
211 | * gpio request/free calls should probably be implemented. | ||
212 | */ | ||
213 | |||
214 | #include <asm/errno.h> | ||
215 | |||
216 | static inline int gpio_request(unsigned gpio, const char *label) | ||
217 | { | ||
218 | return 0; | ||
219 | } | ||
220 | |||
221 | static inline void gpio_free(unsigned gpio) | ||
222 | { | ||
223 | } | ||
224 | |||
225 | extern int gpio_direction_input(unsigned gpio); | ||
226 | extern int gpio_direction_output(unsigned gpio); | ||
208 | 227 | ||
228 | static inline int gpio_get_value(unsigned gpio) | ||
229 | { | ||
230 | return at91_get_gpio_value(gpio); | ||
231 | } | ||
232 | |||
233 | static inline void gpio_set_value(unsigned gpio, int value) | ||
234 | { | ||
235 | at91_set_gpio_value(gpio, value); | ||
236 | } | ||
237 | |||
238 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
239 | |||
240 | static inline int gpio_to_irq(unsigned gpio) | ||
241 | { | ||
242 | return gpio; | ||
243 | } | ||
244 | |||
245 | static inline int irq_to_gpio(unsigned irq) | ||
246 | { | ||
247 | return irq; | ||
248 | } | ||
249 | |||
250 | #endif /* __ASSEMBLY__ */ | ||
251 | |||
252 | #endif | ||