From: Roger Quadros <rogerq@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [u-boot PATCH v4 01/10] ARM: OMAP5+: GPIO: Add GPIO_TO_PIN() macro
Date: Mon, 13 Mar 2017 15:04:24 +0200 [thread overview]
Message-ID: <1489410273-10159-2-git-send-email-rogerq@ti.com> (raw)
In-Reply-To: <1489410273-10159-1-git-send-email-rogerq@ti.com>
GPIO_TO_PIN(bank, bank_gpio) returns the GPIO index
from the GPIO bank number and bank's GPIO offset number.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
---
arch/arm/include/asm/arch-omap5/gpio.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/include/asm/arch-omap5/gpio.h b/arch/arm/include/asm/arch-omap5/gpio.h
index 9dd03c9..48e8ca5 100644
--- a/arch/arm/include/asm/arch-omap5/gpio.h
+++ b/arch/arm/include/asm/arch-omap5/gpio.h
@@ -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 */
--
2.7.4
next prev parent reply other threads:[~2017-03-13 13:04 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-13 13:04 [U-Boot] [u-boot PATCH v4 00/10] am57xx-idk LCD and am571x-idk 6 port ethernet pinmux Roger Quadros
2017-03-13 13:04 ` Roger Quadros [this message]
2017-03-21 18:08 ` [U-Boot] [U-Boot, u-boot, v4, 01/10] ARM: OMAP5+: GPIO: Add GPIO_TO_PIN() macro Tom Rini
2017-03-13 13:04 ` [U-Boot] [u-boot PATCH v4 02/10] ti: common: board_detect: Rename EEPROM scratch start macro Roger Quadros
2017-03-21 18:08 ` [U-Boot] [U-Boot, u-boot, v4, " Tom Rini
2017-03-13 13:04 ` [U-Boot] [u-boot PATCH v4 03/10] ti_armv7_keystone2: Define scratch space in SRAM Roger Quadros
2017-03-17 14:08 ` Tom Rini
2017-03-21 18:08 ` [U-Boot] [U-Boot, u-boot, v4, " Tom Rini
2017-03-13 13:04 ` [U-Boot] [u-boot PATCH v4 04/10] ti: common: board_detect: commodify ethaddr environment setting code Roger Quadros
2017-03-13 13:15 ` Felipe Balbi
2017-03-14 10:52 ` Roger Quadros
2017-03-14 13:04 ` [U-Boot] [u-boot PATCH v5 " Roger Quadros
2017-03-14 15:54 ` Felipe Balbi
2017-03-15 13:53 ` Roger Quadros
2017-03-15 14:46 ` Felipe Balbi
2017-03-15 15:04 ` Roger Quadros
2017-03-21 18:08 ` [U-Boot] [U-Boot, u-boot, v5, " Tom Rini
2017-03-13 13:04 ` [U-Boot] [u-boot PATCH v4 05/10] board: ti: am571x-idk: Support 6 port Ethernet or 4 port Ethernet with LCD Roger Quadros
2017-03-21 18:08 ` [U-Boot] [U-Boot, u-boot, v4, " Tom Rini
2017-03-13 13:04 ` [U-Boot] [u-boot PATCH v4 06/10] board: ti: am571x-idk: Update pinmux for ICSS2 Ethernet Roger Quadros
2017-03-21 18:08 ` [U-Boot] [U-Boot, u-boot, v4, " Tom Rini
2017-03-13 13:04 ` [U-Boot] [u-boot PATCH v4 07/10] board: ti: am57xx-idk: Auto detect LCD Panel Roger Quadros
2017-03-21 18:08 ` [U-Boot] [U-Boot, u-boot, v4, " Tom Rini
2017-03-13 13:04 ` [U-Boot] [u-boot PATCH v4 08/10] ARM: Use Kconfig for board EEPROM's I2C bus and chip address Roger Quadros
2017-03-21 18:09 ` [U-Boot] [U-Boot, u-boot, v4, " Tom Rini
2017-03-13 13:04 ` [U-Boot] [u-boot PATCH v4 09/10] ARM: k2g: setup PRU ethernet MAC addresses Roger Quadros
2017-03-21 18:09 ` [U-Boot] [U-Boot, u-boot, v4, " Tom Rini
2017-03-13 13:04 ` [U-Boot] [u-boot PATCH v4 10/10] net: don't override ethernet address environment Roger Quadros
2017-03-17 14:08 ` Tom Rini
2017-03-21 18:09 ` [U-Boot] [U-Boot, u-boot, v4, " Tom Rini
2017-03-17 14:08 ` [U-Boot] [u-boot PATCH v4 00/10] am57xx-idk LCD and am571x-idk 6 port ethernet pinmux Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1489410273-10159-2-git-send-email-rogerq@ti.com \
--to=rogerq@ti.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox