aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/arch-at91rm9200/gpio.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-arm/arch-at91rm9200/gpio.h')
-rw-r--r--include/asm-arm/arch-at91rm9200/gpio.h48
1 files changed, 46 insertions, 2 deletions
diff --git a/include/asm-arm/arch-at91rm9200/gpio.h b/include/asm-arm/arch-at91rm9200/gpio.h
index a011d27876a2..e09d6528fadf 100644
--- a/include/asm-arm/arch-at91rm9200/gpio.h
+++ b/include/asm-arm/arch-at91rm9200/gpio.h
@@ -179,6 +179,7 @@
179 179
180#ifndef __ASSEMBLY__ 180#ifndef __ASSEMBLY__
181/* setup setup routines, called from board init or driver probe() */ 181/* setup setup routines, called from board init or driver probe() */
182extern int __init_or_module at91_set_GPIO_periph(unsigned pin, int use_pullup);
182extern int __init_or_module at91_set_A_periph(unsigned pin, int use_pullup); 183extern int __init_or_module at91_set_A_periph(unsigned pin, int use_pullup);
183extern int __init_or_module at91_set_B_periph(unsigned pin, int use_pullup); 184extern int __init_or_module at91_set_B_periph(unsigned pin, int use_pullup);
184extern int __init_or_module at91_set_gpio_input(unsigned pin, int use_pullup); 185extern int __init_or_module at91_set_gpio_input(unsigned pin, int use_pullup);
@@ -193,7 +194,50 @@ extern int at91_get_gpio_value(unsigned pin);
193/* callable only from core power-management code */ 194/* callable only from core power-management code */
194extern void at91_gpio_suspend(void); 195extern void at91_gpio_suspend(void);
195extern void at91_gpio_resume(void); 196extern void at91_gpio_resume(void);
196#endif
197 197
198#endif 198/*-------------------------------------------------------------------------*/
199
200/* wrappers for "new style" GPIO calls. the old AT91-specfic ones should
201 * eventually be removed (along with this errno.h inclusion), and the
202 * gpio request/free calls should probably be implemented.
203 */
204
205#include <asm/errno.h>
206
207static inline int gpio_request(unsigned gpio, const char *label)
208{
209 return 0;
210}
211
212static inline void gpio_free(unsigned gpio)
213{
214}
215
216extern int gpio_direction_input(unsigned gpio);
217extern int gpio_direction_output(unsigned gpio);
199 218
219static inline int gpio_get_value(unsigned gpio)
220{
221 return at91_get_gpio_value(gpio);
222}
223
224static inline void gpio_set_value(unsigned gpio, int value)
225{
226 at91_set_gpio_value(gpio, value);
227}
228
229#include <asm-generic/gpio.h> /* cansleep wrappers */
230
231static inline int gpio_to_irq(unsigned gpio)
232{
233 return gpio;
234}
235
236static inline int irq_to_gpio(unsigned irq)
237{
238 return irq;
239}
240
241#endif /* __ASSEMBLY__ */
242
243#endif