mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
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>
This commit is contained in:
committed by
Anatolij Gustschin
parent
f9b6a1575d
commit
b30de3cccf
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user