imx: Add GPIO_TO_PORT macro in the mxc_gpio driver
authorVikram Narayanan <vikram186@gmail.com>
Tue, 10 Apr 2012 04:26:08 +0000 (04:26 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Mon, 16 Apr 2012 12:53:59 +0000 (14:53 +0200)
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>
drivers/gpio/mxc_gpio.c

index df6bbbbc4befbaa15501aebb4eb7384e5ebb70ce..7e65b39a7581df0928fb9168e6bf09c13cb93b93 100644 (file)
@@ -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[] = {