summaryrefslogtreecommitdiffstats
path: root/include/asm-blackfin/gpio.h
diff options
context:
space:
mode:
authorMichael Hennerich <michael.hennerich@analog.com>2007-07-24 09:35:53 +0200
committerBryan Wu <bryan.wu@analog.com>2007-07-24 09:35:53 +0200
commit301af2952b35fa527c89b4c0c0c1003d50afc378 (patch)
treebd4f9fd33277cefa456aa57857c83674916b2fe4 /include/asm-blackfin/gpio.h
parentBlackfin arch: update to latest anomaly sheets (diff)
downloadlinux-301af2952b35fa527c89b4c0c0c1003d50afc378.tar.xz
linux-301af2952b35fa527c89b4c0c0c1003d50afc378.zip
Blackfin arch: Finalize the generic gpio support - add gpio_to_irq and irq_to_gpio
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
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);
void gpio_direction_input(unsigned short gpio);
void gpio_direction_output(unsigned short gpio);
+#include <asm-generic/gpio.h> /* cansleep wrappers */
+#include <asm/irq.h>
+
+static inline int gpio_to_irq(unsigned gpio)
+{
+ return (gpio + GPIO_IRQ_BASE);
+}
+
+static inline int irq_to_gpio(unsigned irq)
+{
+ return (irq - GPIO_IRQ_BASE);
+}
+
#endif /* __ASSEMBLY__ */
#endif /* __ARCH_BLACKFIN_GPIO_H__ */