Thread (49 messages) 49 messages, 3 authors, 2011-08-29
STALE5392d REVIEWED: 1 (0M)

[PATCH v5 01/22] gpio/omap: remove dependency on gpio_bank_count

From: Santosh <hidden>
Date: 2011-08-23 12:35:33
Also in: linux-omap

On Thursday 04 August 2011 04:34 PM, Tarun Kanti DebBarma wrote:
From: Charulatha V<redacted>

The gpio_bank_count is the count of number of GPIO devices in a SoC. Remove this
dependency from the driver by using list. Also remove the dependency on array of
pointers to gpio_bank struct of all GPIO devices.

Signed-off-by: Charulatha V<redacted>
---
  arch/arm/mach-omap1/gpio15xx.c         |    1 -
  arch/arm/mach-omap1/gpio16xx.c         |    2 -
  arch/arm/mach-omap1/gpio7xx.c          |    2 -
  arch/arm/mach-omap2/gpio.c             |    1 -
  arch/arm/plat-omap/include/plat/gpio.h |    3 -
  drivers/gpio/gpio-omap.c               |  163 ++++++++++++++++----------------
  6 files changed, 80 insertions(+), 92 deletions(-)
[...]
quoted hunk ↗ jump to hunk
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 34a7110..13d5ca4 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -28,7 +28,10 @@
  #include<mach/gpio.h>
  #include<asm/mach/irq.h>
[....]
quoted hunk ↗ jump to hunk
@@ -1334,17 +1325,17 @@ static int workaround_enabled;

  void omap2_gpio_prepare_for_idle(int off_mode)
  {
-	int i, c = 0;
-	int min = 0;
-
-	if (cpu_is_omap34xx())
-		min = 1;
+	int c = 0;
+	struct gpio_bank *bank;

-	for (i = min; i<  gpio_bank_count; i++) {
-		struct gpio_bank *bank =&gpio_bank[i];
+	list_for_each_entry(bank,&omap_gpio_list, node) {
  		u32 l1 = 0, l2 = 0;
  		int j;

+		/* TODO: Do not use cpu_is_omap34xx */
Is this addressed in subsequent patches ?
+		if ((cpu_is_omap34xx())&&  (bank->id == 0))
+			continue;
+
Rest of the changes looks good to me.
After you answer above, you can add my,
Reviewed-by: Santosh Shilimkar <redacted>

Regards
Santosh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help