提交 080795b7 编写于 作者: R Roger Quadros 提交者: Tom Rini

ARM: OMAP5+: GPIO: Add GPIO_TO_PIN() macro

GPIO_TO_PIN(bank, bank_gpio) returns the GPIO index
from the GPIO bank number and bank's GPIO offset number.
Signed-off-by: NRoger Quadros <rogerq@ti.com>
Reviewed-by: NTom Rini <trini@konsulko.com>
Reviewed-by: NLokesh Vutla <lokeshvutla@ti.com>
上级 30719e2b
......@@ -34,4 +34,8 @@
#define OMAP54XX_GPIO7_BASE 0x48051000
#define OMAP54XX_GPIO8_BASE 0x48053000
/* Get the GPIO index from the given bank number and bank gpio */
#define GPIO_TO_PIN(bank, bank_gpio) (32 * (bank - 1) + (bank_gpio))
#endif /* _GPIO_OMAP5_H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册