summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/gpio.h
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-07-26 10:04:51 (GMT)
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-08-12 07:53:15 (GMT)
commit22fe67837614469f8e86c97e9e43d46270701b33 (patch)
tree8823ecf3f60aa0c40b9e2d997875d565445261fa /arch/arm/include/asm/gpio.h
parent50ac01fbd29ba208d0cd4cb9467d3ffc07ae834a (diff)
downloadlinux-fsl-qoriq-22fe67837614469f8e86c97e9e43d46270701b33.tar.xz
ARM: gpio: consolidate trivial gpiolib implementations
Consolidate 24 trivial gpiolib implementions out of mach/gpio.h into asm/gpio.h. This is basically the include of asm-generic/gpio.h and the definition of gpio_get_value, gpio_set_value, and gpio_cansleep as described in Documentation/gpio.txt Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com> Tested-by: David Brown <davidb@codeaurora.org> Acked-by: David Brown <davidb@codeaurora.org> Tested-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Tested-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include/asm/gpio.h')
-rw-r--r--arch/arm/include/asm/gpio.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h
index 166a7a3..15e8970 100644
--- a/arch/arm/include/asm/gpio.h
+++ b/arch/arm/include/asm/gpio.h
@@ -4,4 +4,14 @@
/* not all ARM platforms necessarily support this API ... */
#include <mach/gpio.h>
+#ifdef __ARM_GPIOLIB_TRIVIAL
+/* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */
+#include <asm-generic/gpio.h>
+
+/* The trivial gpiolib dispatchers */
+#define gpio_get_value __gpio_get_value
+#define gpio_set_value __gpio_set_value
+#define gpio_cansleep __gpio_cansleep
+#endif
+
#endif /* _ARCH_ARM_GPIO_H */