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>
This commit is contained in:
Sudhakar Rajashekhara 2009-08-13 12:11:56 -04:00 committed by Kevin Hilman
parent 491214e1f8
commit b1466376b2
1 changed files with 3 additions and 0 deletions

View File

@ -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;