diff options
Diffstat (limited to 'arch/arm/plat-mxc/include/mach/gpio.h')
-rw-r--r-- | arch/arm/plat-mxc/include/mach/gpio.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/include/mach/gpio.h b/arch/arm/plat-mxc/include/mach/gpio.h index af33b74..0044e2f 100644 --- a/arch/arm/plat-mxc/include/mach/gpio.h +++ b/arch/arm/plat-mxc/include/mach/gpio.h @@ -23,6 +23,11 @@ #include <mach/hardware.h> #include <asm-generic/gpio.h> + +/* There's a off-by-one betweem the gpio bank number and the gpiochip */ +/* range e.g. GPIO_1_5 is gpio 5 under linux */ +#define IMX_GPIO_NR(bank, nr) (((bank) - 1) * 32 + (nr)) + /* use gpiolib dispatchers */ #define gpio_get_value __gpio_get_value #define gpio_set_value __gpio_set_value |