summaryrefslogtreecommitdiff
path: root/include/asm-arm
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <lg@denx.de>2009-02-07 01:18:07 +0100
committerAnatolij Gustschin <agust@denx.de>2009-02-24 09:43:10 +0100
commitb30de3cccf8867566cd314e7c7033904afa5dc9d (patch)
treed0bfc0fc195bba02b2887e6bd34bdbda7af1e5d6 /include/asm-arm
parentf9b6a1575d9f1ca192e4cb60e547aa66f08baa3f (diff)
i.MX31: add a simple gpio driver
This is a minimal driver, so far only managing output. It will be used by the mxc_spi.c driver. Signed-off-by: Guennadi Liakhovetski <lg@denx.de> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'include/asm-arm')
-rw-r--r--include/asm-arm/arch-mx31/mx31.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/asm-arm/arch-mx31/mx31.h b/include/asm-arm/arch-mx31/mx31.h
index 0552c27ce6..1d475dde7e 100644
--- a/include/asm-arm/arch-mx31/mx31.h
+++ b/include/asm-arm/arch-mx31/mx31.h
@@ -27,4 +27,24 @@
extern u32 mx31_get_ipg_clk(void);
extern void mx31_gpio_mux(unsigned long mode);
+enum mx31_gpio_direction {
+ MX31_GPIO_DIRECTION_IN,
+ MX31_GPIO_DIRECTION_OUT,
+};
+
+#ifdef CONFIG_MX31_GPIO
+extern int mx31_gpio_direction(unsigned int gpio,
+ enum mx31_gpio_direction direction);
+extern void mx31_gpio_set(unsigned int gpio, unsigned int value);
+#else
+static inline int mx31_gpio_direction(unsigned int gpio,
+ enum mx31_gpio_direction direction)
+{
+ return 1;
+}
+static inline void mx31_gpio_set(unsigned int gpio, unsigned int value)
+{
+}
+#endif
+
#endif /* __ASM_ARCH_MX31_H */