From 95d185894bcb6c3dffb70ef69f3c80516d19bd49 Mon Sep 17 00:00:00 2001 From: Matthias Weisser Date: Wed, 6 Jul 2011 00:28:32 +0000 Subject: imx: Make imx25 compatible to mxc_gpio driver and fix in tx25 Adding support for mxc_gpio driver for imx25 and fix names of registers in tx25 board. Signed-off-by: Matthias Weisser --- include/mxc_gpio.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/mxc_gpio.h b/include/mxc_gpio.h index 002ba61e006..f673dcecd69 100644 --- a/include/mxc_gpio.h +++ b/include/mxc_gpio.h @@ -24,6 +24,11 @@ #ifndef __MXC_GPIO_H #define __MXC_GPIO_H +/* Converts a GPIO port number and the internal bit position + * to the GPIO number + */ +#define MXC_GPIO_PORT_TO_NUM(port, bit) (((port - 1) << 5) + (bit & 0x1f)) + enum mxc_gpio_direction { MXC_GPIO_DIRECTION_IN, MXC_GPIO_DIRECTION_OUT, -- cgit v1.2.3