aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSudhakar Rajashekhara <sudhakar.raj@ti.com>2009-08-13 12:11:56 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2009-08-26 04:55:54 -0400
commitb1466376b22e1ec6395ccda7580deb72d3a809ad (patch)
treefc75734a70d8958036db79c3f28bc7bc175fb608 /arch
parent491214e1f8129844289869bb6c231dc4542b11e3 (diff)
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 <sudhakar.raj@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-davinci/include/mach/gpio.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/include/mach/gpio.h b/arch/arm/mach-davinci/include/mach/gpio.h
index 4f032b38cd6e..f3b8ef878158 100644
--- a/arch/arm/mach-davinci/include/mach/gpio.h
+++ b/arch/arm/mach-davinci/include/mach/gpio.h
@@ -42,6 +42,9 @@
42 */ 42 */
43#define GPIO(X) (X) /* 0 <= X <= (DAVINCI_N_GPIO - 1) */ 43#define GPIO(X) (X) /* 0 <= X <= (DAVINCI_N_GPIO - 1) */
44 44
45/* Convert GPIO signal to GPIO pin number */
46#define GPIO_TO_PIN(bank, gpio) (16 * (bank) + (gpio))
47
45struct gpio_controller { 48struct gpio_controller {
46 u32 dir; 49 u32 dir;
47 u32 out_data; 50 u32 out_data;