From b1466376b22e1ec6395ccda7580deb72d3a809ad Mon Sep 17 00:00:00 2001 From: Sudhakar Rajashekhara Date: Thu, 13 Aug 2009 12:11:56 -0400 Subject: davinci: Macro to convert GPIO signal to GPIO pin number Adds a macro to convert the GPIO signal passed as bank number and signal to GPIO pin number. Signed-off-by: Sudhakar Rajashekhara Signed-off-by: Kevin Hilman --- arch/arm/mach-davinci/include/mach/gpio.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch') diff --git a/arch/arm/mach-davinci/include/mach/gpio.h b/arch/arm/mach-davinci/include/mach/gpio.h index 4f032b38cd6..f3b8ef87815 100644 --- a/arch/arm/mach-davinci/include/mach/gpio.h +++ b/arch/arm/mach-davinci/include/mach/gpio.h @@ -42,6 +42,9 @@ */ #define GPIO(X) (X) /* 0 <= X <= (DAVINCI_N_GPIO - 1) */ +/* Convert GPIO signal to GPIO pin number */ +#define GPIO_TO_PIN(bank, gpio) (16 * (bank) + (gpio)) + struct gpio_controller { u32 dir; u32 out_data; -- cgit v1.2.3