summaryrefslogtreecommitdiff
path: root/drivers/gpio
diff options
context:
space:
mode:
authorVikram Narayanan <vikram186@gmail.com>2012-04-10 04:26:08 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-04-16 14:53:59 +0200
commit8d28c211f3435e77f3d83d7398f46faa1c891156 (patch)
tree618942d5c9e3de983691b1ee6fe6ca5107ec5584 /drivers/gpio
parenta9407f2bc51ed118c47a2e60396466bba78c57a6 (diff)
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>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/mxc_gpio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c
index df6bbbbc4be..7e65b39a758 100644
--- a/drivers/gpio/mxc_gpio.c
+++ b/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[] = {