Skip to contentSkip to conversation

imx: Add GPIO_TO_PORT macro in the mxc_gpio driver

PATCH New Vikram Narayanan 2 participants 3 messages Apr 10, 2012 – Apr 11, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 2/4 imx: Add GPIO_TO_PORT macro in the mxc_gpio driver

Add GPIO_TO_PORT macro in the mxc_gpio.c driver

---
 drivers/gpio/mxc_gpio.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/gpio/mxc_gpio.c +1 -0
index df6bbbb..7e65b39 100644
@@ -34,6 +34,7 @@ enum mxc_gpio_direction {
 	MXC_GPIO_DIRECTION_OUT,
 };
 
+#define GPIO_TO_PORT(n)		(n / 32)
 
 /* GPIO port description */
 static unsigned long gpio_ports[] = {
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH v2 2/4 imx: Add GPIO_TO_PORT macro in the mxc_gpio driver

Quoted 12 lines · Vikram Narayanan

Add GPIO_TO_PORT macro in the mxc_gpio.c driver

---
 drivers/gpio/mxc_gpio.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/gpio/mxc_gpio.c +0 -0
index df6bbbb..7e65b39 100644

drivers/gpio/mxc_gpio.c enum mxc_gpio_direction { · line 40

Quoted 7 lines
drivers/gpio/mxc_gpio.c +1 -0
@@ -34,6 +34,7 @@ enum mxc_gpio_direction {
 	MXC_GPIO_DIRECTION_OUT,
 };
 
+#define GPIO_TO_PORT(n)		(n / 32)
 
 /* GPIO port description */
 static unsigned long gpio_ports[] = {

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#2 lore raw

PATCH v2 2/4 imx: Add GPIO_TO_PORT macro in the mxc_gpio driver

In reply to Vikram Narayanan
Quoted 4 lines · Vikram Narayanan

Add GPIO_TO_PORT macro in the mxc_gpio.c driver

---

Applied to u-boot-imx (fix), thanks.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================