aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-blackfin/gpio.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-blackfin/gpio.h')
-rw-r--r--include/asm-blackfin/gpio.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/asm-blackfin/gpio.h b/include/asm-blackfin/gpio.h
index 7480cfa7e2d6..e714363bc4ed 100644
--- a/include/asm-blackfin/gpio.h
+++ b/include/asm-blackfin/gpio.h
@@ -421,6 +421,19 @@ unsigned short gpio_get_value(unsigned short gpio);
421void gpio_direction_input(unsigned short gpio); 421void gpio_direction_input(unsigned short gpio);
422void gpio_direction_output(unsigned short gpio); 422void gpio_direction_output(unsigned short gpio);
423 423
424#include <asm-generic/gpio.h> /* cansleep wrappers */
425#include <asm/irq.h>
426
427static inline int gpio_to_irq(unsigned gpio)
428{
429 return (gpio + GPIO_IRQ_BASE);
430}
431
432static inline int irq_to_gpio(unsigned irq)
433{
434 return (irq - GPIO_IRQ_BASE);
435}
436
424#endif /* __ASSEMBLY__ */ 437#endif /* __ASSEMBLY__ */
425 438
426#endif /* __ARCH_BLACKFIN_GPIO_H__ */ 439#endif /* __ARCH_BLACKFIN_GPIO_H__ */