Browse Source

imx: Add GPIO_TO_PORT macro in the mxc_gpio driver

Add GPIO_TO_PORT macro in the mxc_gpio.c driver

Signed-off-by: Vikram Narayanan <vikram186@gmail.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Vikram Narayanan 13 years ago
parent
commit
8d28c211f3
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/gpio/mxc_gpio.c

+ 1 - 0
drivers/gpio/mxc_gpio.c

@@ -34,6 +34,7 @@ enum mxc_gpio_direction {
 	MXC_GPIO_DIRECTION_OUT,
 };
 
+#define GPIO_TO_PORT(n)		(n / 32)
 
 /* GPIO port description */
 static unsigned long gpio_ports[] = {