All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] gpio/omap: 2nd batch of updates for v3.10
@ 2013-04-04 20:16 ` Jon Hunter
  0 siblings, 0 replies; 46+ messages in thread
From: Jon Hunter @ 2013-04-04 20:16 UTC (permalink / raw)
  To: Linus Walleij, Grant Likely, Santosh Shilimkar, Kevin Hilman
  Cc: device-tree, linux-omap, linux-arm, Jon Hunter

Main change is ensuring that the state of a gpio bank is restored when
booting with device-tree. The rest of the patches are clean-ups and one
optimisation.

The patch modifying the *.dtsi files should go via Benoit Cousson's
for_3.10/dts branch [1] as it is dependent on changes in his branch but
I have included here for completeness.

Testing includes:
- Boot testing on OMAP5912 OSK, OMAP2420 H4, OMAP3430 SDP, OMAP4430 SDP
  and AM335x EVM.
- Verified that GPIO interrupts are working on OMAP5912 OSK, OMAP2420 H4,
  OMAP3430 SDP and OMAP4430 SDP by making sure networking was working
  correctly as these boards use a GPIO with the ethernet chips. Also
  checked /proc/interrupts to ensure GPIO interrupt counts are
  incrementing as expected.

[1] http://git.kernel.org/cgit/linux/kernel/git/bcousson/linux-omap-dt.git

Jon Hunter (4):
  gpio/omap: free irq domain in probe() failure paths
  gpio/omap: optimise interrupt service routine
  gpio/omap: force restore if context loss is not detectable
  ARM: dts: OMAP2+: Identify GPIO banks that are always powered

Tarun Kanti DebBarma (1):
  gpio/omap: remove extra context restores in *_runtime_resume()

 .../devicetree/bindings/gpio/gpio-omap.txt         |    7 ++-
 arch/arm/boot/dts/omap2420.dtsi                    |    4 ++
 arch/arm/boot/dts/omap2430.dtsi                    |    4 ++
 arch/arm/boot/dts/omap3.dtsi                       |    1 +
 arch/arm/boot/dts/omap4.dtsi                       |    1 +
 arch/arm/boot/dts/omap5.dtsi                       |    1 +
 drivers/gpio/gpio-omap.c                           |   49 +++++++++++---------
 7 files changed, 44 insertions(+), 23 deletions(-)

-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 46+ messages in thread

* [PATCH 0/5] gpio/omap: 2nd batch of updates for v3.10
@ 2013-04-04 20:16 ` Jon Hunter
  0 siblings, 0 replies; 46+ messages in thread
From: Jon Hunter @ 2013-04-04 20:16 UTC (permalink / raw)
  To: linux-arm-kernel

Main change is ensuring that the state of a gpio bank is restored when
booting with device-tree. The rest of the patches are clean-ups and one
optimisation.

The patch modifying the *.dtsi files should go via Benoit Cousson's
for_3.10/dts branch [1] as it is dependent on changes in his branch but
I have included here for completeness.

Testing includes:
- Boot testing on OMAP5912 OSK, OMAP2420 H4, OMAP3430 SDP, OMAP4430 SDP
  and AM335x EVM.
- Verified that GPIO interrupts are working on OMAP5912 OSK, OMAP2420 H4,
  OMAP3430 SDP and OMAP4430 SDP by making sure networking was working
  correctly as these boards use a GPIO with the ethernet chips. Also
  checked /proc/interrupts to ensure GPIO interrupt counts are
  incrementing as expected.

[1] http://git.kernel.org/cgit/linux/kernel/git/bcousson/linux-omap-dt.git

Jon Hunter (4):
  gpio/omap: free irq domain in probe() failure paths
  gpio/omap: optimise interrupt service routine
  gpio/omap: force restore if context loss is not detectable
  ARM: dts: OMAP2+: Identify GPIO banks that are always powered

Tarun Kanti DebBarma (1):
  gpio/omap: remove extra context restores in *_runtime_resume()

 .../devicetree/bindings/gpio/gpio-omap.txt         |    7 ++-
 arch/arm/boot/dts/omap2420.dtsi                    |    4 ++
 arch/arm/boot/dts/omap2430.dtsi                    |    4 ++
 arch/arm/boot/dts/omap3.dtsi                       |    1 +
 arch/arm/boot/dts/omap4.dtsi                       |    1 +
 arch/arm/boot/dts/omap5.dtsi                       |    1 +
 drivers/gpio/gpio-omap.c                           |   49 +++++++++++---------
 7 files changed, 44 insertions(+), 23 deletions(-)

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [PATCH 1/5] gpio/omap: free irq domain in probe() failure paths
  2013-04-04 20:16 ` Jon Hunter
@ 2013-04-04 20:16   ` Jon Hunter
  -1 siblings, 0 replies; 46+ messages in thread
From: Jon Hunter @ 2013-04-04 20:16 UTC (permalink / raw)
  To: Linus Walleij, Grant Likely, Santosh Shilimkar, Kevin Hilman
  Cc: device-tree, linux-omap, linux-arm, Jon Hunter

Currently the IRQ domain is not freed once allocated, in the case where
omap_gpio_probe() fails. Therefore, ensure we free the domain if the
probe does fail. Furthermore, the local variable "ret" is not needed
and so remove this.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
---
 drivers/gpio/gpio-omap.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 0d30c7a..1e666c8 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1094,7 +1094,6 @@ static int omap_gpio_probe(struct platform_device *pdev)
 	const struct omap_gpio_platform_data *pdata;
 	struct resource *res;
 	struct gpio_bank *bank;
-	int ret = 0;
 
 	match = of_match_device(of_match_ptr(omap_gpio_match), dev);
 
@@ -1143,18 +1142,21 @@ static int omap_gpio_probe(struct platform_device *pdev)
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	if (unlikely(!res)) {
 		dev_err(dev, "Invalid mem resource\n");
+		irq_domain_remove(bank->domain);
 		return -ENODEV;
 	}
 
 	if (!devm_request_mem_region(dev, res->start, resource_size(res),
 				     pdev->name)) {
 		dev_err(dev, "Region already claimed\n");
+		irq_domain_remove(bank->domain);
 		return -EBUSY;
 	}
 
 	bank->base = devm_ioremap(dev, res->start, resource_size(res));
 	if (!bank->base) {
 		dev_err(dev, "Could not ioremap\n");
+		irq_domain_remove(bank->domain);
 		return -ENOMEM;
 	}
 
@@ -1178,7 +1180,7 @@ static int omap_gpio_probe(struct platform_device *pdev)
 
 	list_add_tail(&bank->node, &omap_gpio_list);
 
-	return ret;
+	return 0;
 }
 
 #ifdef CONFIG_ARCH_OMAP2PLUS
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 1/5] gpio/omap: free irq domain in probe() failure paths
@ 2013-04-04 20:16   ` Jon Hunter
  0 siblings, 0 replies; 46+ messages in thread
From: Jon Hunter @ 2013-04-04 20:16 UTC (permalink / raw)
  To: linux-arm-kernel

Currently the IRQ domain is not freed once allocated, in the case where
omap_gpio_probe() fails. Therefore, ensure we free the domain if the
probe does fail. Furthermore, the local variable "ret" is not needed
and so remove this.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
---
 drivers/gpio/gpio-omap.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 0d30c7a..1e666c8 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1094,7 +1094,6 @@ static int omap_gpio_probe(struct platform_device *pdev)
 	const struct omap_gpio_platform_data *pdata;
 	struct resource *res;
 	struct gpio_bank *bank;
-	int ret = 0;
 
 	match = of_match_device(of_match_ptr(omap_gpio_match), dev);
 
@@ -1143,18 +1142,21 @@ static int omap_gpio_probe(struct platform_device *pdev)
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	if (unlikely(!res)) {
 		dev_err(dev, "Invalid mem resource\n");
+		irq_domain_remove(bank->domain);
 		return -ENODEV;
 	}
 
 	if (!devm_request_mem_region(dev, res->start, resource_size(res),
 				     pdev->name)) {
 		dev_err(dev, "Region already claimed\n");
+		irq_domain_remove(bank->domain);
 		return -EBUSY;
 	}
 
 	bank->base = devm_ioremap(dev, res->start, resource_size(res));
 	if (!bank->base) {
 		dev_err(dev, "Could not ioremap\n");
+		irq_domain_remove(bank->domain);
 		return -ENOMEM;
 	}
 
@@ -1178,7 +1180,7 @@ static int omap_gpio_probe(struct platform_device *pdev)
 
 	list_add_tail(&bank->node, &omap_gpio_list);
 
-	return ret;
+	return 0;
 }
 
 #ifdef CONFIG_ARCH_OMAP2PLUS
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 2/5] gpio/omap: remove extra context restores in *_runtime_resume()
  2013-04-04 20:16 ` Jon Hunter
@ 2013-04-04 20:16   ` Jon Hunter
  -1 siblings, 0 replies; 46+ messages in thread
From: Jon Hunter @ 2013-04-04 20:16 UTC (permalink / raw)
  To: Linus Walleij, Grant Likely, Santosh Shilimkar, Kevin Hilman
  Cc: device-tree, linux-omap, linux-arm, Tarun Kanti DebBarma, Jon Hunter

From: Tarun Kanti DebBarma <tarun.kanti@ti.com>

68942edb09f69b6e09522d1d346665eb3aadde49 (gpio/omap: fix wakeups
on level-triggered GPIOs) already restores the fallingdetect and
risingdetect contexts in *_runtime_resume(). These registers were
modified in *_runtime_suspend() to include even those configured
as level-triggered since only edge-triggered gpios can generate
wakeup events. Therefore, the old context restores of the same
registers present later in the code is not needed any more.
Remove them.

Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
---
 drivers/gpio/gpio-omap.c |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 1e666c8..5af7acd 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1292,10 +1292,6 @@ static int omap_gpio_runtime_resume(struct device *dev)
 		return 0;
 	}
 
-	__raw_writel(bank->context.fallingdetect,
-			bank->base + bank->regs->fallingdetect);
-	__raw_writel(bank->context.risingdetect,
-			bank->base + bank->regs->risingdetect);
 	l = __raw_readl(bank->base + bank->regs->datain);
 
 	/*
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 2/5] gpio/omap: remove extra context restores in *_runtime_resume()
@ 2013-04-04 20:16   ` Jon Hunter
  0 siblings, 0 replies; 46+ messages in thread
From: Jon Hunter @ 2013-04-04 20:16 UTC (permalink / raw)
  To: linux-arm-kernel

From: Tarun Kanti DebBarma <tarun.kanti@ti.com>

68942edb09f69b6e09522d1d346665eb3aadde49 (gpio/omap: fix wakeups
on level-triggered GPIOs) already restores the fallingdetect and
risingdetect contexts in *_runtime_resume(). These registers were
modified in *_runtime_suspend() to include even those configured
as level-triggered since only edge-triggered gpios can generate
wakeup events. Therefore, the old context restores of the same
registers present later in the code is not needed any more.
Remove them.

Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
---
 drivers/gpio/gpio-omap.c |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 1e666c8..5af7acd 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1292,10 +1292,6 @@ static int omap_gpio_runtime_resume(struct device *dev)
 		return 0;
 	}
 
-	__raw_writel(bank->context.fallingdetect,
-			bank->base + bank->regs->fallingdetect);
-	__raw_writel(bank->context.risingdetect,
-			bank->base + bank->regs->risingdetect);
 	l = __raw_readl(bank->base + bank->regs->datain);
 
 	/*
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 3/5] gpio/omap: optimise interrupt service routine
  2013-04-04 20:16 ` Jon Hunter
@ 2013-04-04 20:16   ` Jon Hunter
  -1 siblings, 0 replies; 46+ messages in thread
From: Jon Hunter @ 2013-04-04 20:16 UTC (permalink / raw)
  To: Linus Walleij, Grant Likely, Santosh Shilimkar, Kevin Hilman
  Cc: device-tree, linux-omap, linux-arm, Jon Hunter, Felipe Balbi

The OMAP GPIO interrupt service routine is checking each bit in the
GPIO interrupt status register to see which bits are set. It is not
efficient to check every bit especially if only a few bits are set.
Therefore, instead of checking every bit use the __ffs() function,
which returns the location of the first set bit, to find all the set
bits.

This optimisation was suggested-by and developed in collaboration
with Felipe Balbi.

Cc: Felipe Balbi <balbi@ti.com>

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
---
 drivers/gpio/gpio-omap.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 5af7acd..685e850 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -689,7 +689,7 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
 {
 	void __iomem *isr_reg = NULL;
 	u32 isr;
-	unsigned int i;
+	unsigned int bit;
 	struct gpio_bank *bank;
 	int unmasked = 0;
 	struct irq_chip *chip = irq_desc_get_chip(desc);
@@ -730,9 +730,9 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
 		if (!isr)
 			break;
 
-		for (i = 0; isr != 0; isr >>= 1, i++) {
-			if (!(isr & 1))
-				continue;
+		while (isr) {
+			bit = __ffs(isr);
+			isr &= ~(1 << bit);
 
 			/*
 			 * Some chips can't respond to both rising and falling
@@ -741,10 +741,10 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
 			 * to respond to the IRQ for the opposite direction.
 			 * This will be indicated in the bank toggle_mask.
 			 */
-			if (bank->toggle_mask & (1 << i))
-				_toggle_gpio_edge_triggering(bank, i);
+			if (bank->toggle_mask & (1 << bit))
+				_toggle_gpio_edge_triggering(bank, bit);
 
-			generic_handle_irq(irq_find_mapping(bank->domain, i));
+			generic_handle_irq(irq_find_mapping(bank->domain, bit));
 		}
 	}
 	/* if bank has any level sensitive GPIO pin interrupt
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 3/5] gpio/omap: optimise interrupt service routine
@ 2013-04-04 20:16   ` Jon Hunter
  0 siblings, 0 replies; 46+ messages in thread
From: Jon Hunter @ 2013-04-04 20:16 UTC (permalink / raw)
  To: linux-arm-kernel

The OMAP GPIO interrupt service routine is checking each bit in the
GPIO interrupt status register to see which bits are set. It is not
efficient to check every bit especially if only a few bits are set.
Therefore, instead of checking every bit use the __ffs() function,
which returns the location of the first set bit, to find all the set
bits.

This optimisation was suggested-by and developed in collaboration
with Felipe Balbi.

Cc: Felipe Balbi <balbi@ti.com>

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
---
 drivers/gpio/gpio-omap.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 5af7acd..685e850 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -689,7 +689,7 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
 {
 	void __iomem *isr_reg = NULL;
 	u32 isr;
-	unsigned int i;
+	unsigned int bit;
 	struct gpio_bank *bank;
 	int unmasked = 0;
 	struct irq_chip *chip = irq_desc_get_chip(desc);
@@ -730,9 +730,9 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
 		if (!isr)
 			break;
 
-		for (i = 0; isr != 0; isr >>= 1, i++) {
-			if (!(isr & 1))
-				continue;
+		while (isr) {
+			bit = __ffs(isr);
+			isr &= ~(1 << bit);
 
 			/*
 			 * Some chips can't respond to both rising and falling
@@ -741,10 +741,10 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
 			 * to respond to the IRQ for the opposite direction.
 			 * This will be indicated in the bank toggle_mask.
 			 */
-			if (bank->toggle_mask & (1 << i))
-				_toggle_gpio_edge_triggering(bank, i);
+			if (bank->toggle_mask & (1 << bit))
+				_toggle_gpio_edge_triggering(bank, bit);
 
-			generic_handle_irq(irq_find_mapping(bank->domain, i));
+			generic_handle_irq(irq_find_mapping(bank->domain, bit));
 		}
 	}
 	/* if bank has any level sensitive GPIO pin interrupt
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 4/5] gpio/omap: force restore if context loss is not detectable
  2013-04-04 20:16 ` Jon Hunter
@ 2013-04-04 20:16   ` Jon Hunter
  -1 siblings, 0 replies; 46+ messages in thread
From: Jon Hunter @ 2013-04-04 20:16 UTC (permalink / raw)
  To: Linus Walleij, Grant Likely, Santosh Shilimkar, Kevin Hilman
  Cc: device-tree, linux-omap, linux-arm, Jon Hunter

When booting with device-tree the function pointer for detecting context
loss is not populated. Ideally, the pm_runtime framework should be
enhanced to allow a means for reporting context/state loss and we could
avoid populating such function pointers altogether. In the interim until
a generic non-device specific solution is in place, force a restore of
the gpio bank when enabling the gpio controller.

Adds a new device-tree property for the OMAP GPIO controller to indicate
if the GPIO controller is located in a power-domain that never loses
power and hence will always maintain its logic state.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
---
 .../devicetree/bindings/gpio/gpio-omap.txt         |    7 ++++--
 drivers/gpio/gpio-omap.c                           |   25 +++++++++++++-------
 2 files changed, 22 insertions(+), 10 deletions(-)

diff --git a/Documentation/devicetree/bindings/gpio/gpio-omap.txt b/Documentation/devicetree/bindings/gpio/gpio-omap.txt
index a56e3a5..8d95052 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-omap.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio-omap.txt
@@ -20,8 +20,11 @@ Required properties:
       8 = active low level-sensitive.
 
 OMAP specific properties:
-- ti,hwmods: Name of the hwmod associated to the GPIO:
-  "gpio<X>", <X> being the 1-based instance number from the HW spec
+- ti,hwmods:		Name of the hwmod associated to the GPIO:
+			"gpio<X>", <X> being the 1-based instance number
+			from the HW spec.
+- ti,gpio-always-on: 	Indicates if a GPIO bank is always powered and
+			so will never lose its logic state.
 
 
 Example:
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 685e850..0557529 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1120,11 +1120,17 @@ static int omap_gpio_probe(struct platform_device *pdev)
 	bank->width = pdata->bank_width;
 	bank->is_mpuio = pdata->is_mpuio;
 	bank->non_wakeup_gpios = pdata->non_wakeup_gpios;
-	bank->loses_context = pdata->loses_context;
 	bank->regs = pdata->regs;
 #ifdef CONFIG_OF_GPIO
 	bank->chip.of_node = of_node_get(node);
 #endif
+	if (node) {
+		if (!of_property_read_bool(node, "ti,gpio-always-on"))
+			bank->loses_context = true;
+	} else {
+		bank->loses_context = pdata->loses_context;
+	}
+
 
 	bank->domain = irq_domain_add_linear(node, bank->width,
 					     &irq_domain_simple_ops, NULL);
@@ -1258,9 +1264,9 @@ static int omap_gpio_runtime_resume(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
 	struct gpio_bank *bank = platform_get_drvdata(pdev);
-	int context_lost_cnt_after;
 	u32 l = 0, gen, gen0, gen1;
 	unsigned long flags;
+	int c;
 
 	spin_lock_irqsave(&bank->lock, flags);
 	_gpio_dbck_enable(bank);
@@ -1276,14 +1282,17 @@ static int omap_gpio_runtime_resume(struct device *dev)
 	__raw_writel(bank->context.risingdetect,
 		     bank->base + bank->regs->risingdetect);
 
-	if (bank->get_context_loss_count) {
-		context_lost_cnt_after =
-			bank->get_context_loss_count(bank->dev);
-		if (context_lost_cnt_after != bank->context_loss_count) {
+	if (bank->loses_context) {
+		if (!bank->get_context_loss_count) {
 			omap_gpio_restore_context(bank);
 		} else {
-			spin_unlock_irqrestore(&bank->lock, flags);
-			return 0;
+			c = bank->get_context_loss_count(bank->dev);
+			if (c != bank->context_loss_count) {
+				omap_gpio_restore_context(bank);
+			} else {
+				spin_unlock_irqrestore(&bank->lock, flags);
+				return 0;
+			}
 		}
 	}
 
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 4/5] gpio/omap: force restore if context loss is not detectable
@ 2013-04-04 20:16   ` Jon Hunter
  0 siblings, 0 replies; 46+ messages in thread
From: Jon Hunter @ 2013-04-04 20:16 UTC (permalink / raw)
  To: linux-arm-kernel

When booting with device-tree the function pointer for detecting context
loss is not populated. Ideally, the pm_runtime framework should be
enhanced to allow a means for reporting context/state loss and we could
avoid populating such function pointers altogether. In the interim until
a generic non-device specific solution is in place, force a restore of
the gpio bank when enabling the gpio controller.

Adds a new device-tree property for the OMAP GPIO controller to indicate
if the GPIO controller is located in a power-domain that never loses
power and hence will always maintain its logic state.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
---
 .../devicetree/bindings/gpio/gpio-omap.txt         |    7 ++++--
 drivers/gpio/gpio-omap.c                           |   25 +++++++++++++-------
 2 files changed, 22 insertions(+), 10 deletions(-)

diff --git a/Documentation/devicetree/bindings/gpio/gpio-omap.txt b/Documentation/devicetree/bindings/gpio/gpio-omap.txt
index a56e3a5..8d95052 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-omap.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio-omap.txt
@@ -20,8 +20,11 @@ Required properties:
       8 = active low level-sensitive.
 
 OMAP specific properties:
-- ti,hwmods: Name of the hwmod associated to the GPIO:
-  "gpio<X>", <X> being the 1-based instance number from the HW spec
+- ti,hwmods:		Name of the hwmod associated to the GPIO:
+			"gpio<X>", <X> being the 1-based instance number
+			from the HW spec.
+- ti,gpio-always-on: 	Indicates if a GPIO bank is always powered and
+			so will never lose its logic state.
 
 
 Example:
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 685e850..0557529 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1120,11 +1120,17 @@ static int omap_gpio_probe(struct platform_device *pdev)
 	bank->width = pdata->bank_width;
 	bank->is_mpuio = pdata->is_mpuio;
 	bank->non_wakeup_gpios = pdata->non_wakeup_gpios;
-	bank->loses_context = pdata->loses_context;
 	bank->regs = pdata->regs;
 #ifdef CONFIG_OF_GPIO
 	bank->chip.of_node = of_node_get(node);
 #endif
+	if (node) {
+		if (!of_property_read_bool(node, "ti,gpio-always-on"))
+			bank->loses_context = true;
+	} else {
+		bank->loses_context = pdata->loses_context;
+	}
+
 
 	bank->domain = irq_domain_add_linear(node, bank->width,
 					     &irq_domain_simple_ops, NULL);
@@ -1258,9 +1264,9 @@ static int omap_gpio_runtime_resume(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
 	struct gpio_bank *bank = platform_get_drvdata(pdev);
-	int context_lost_cnt_after;
 	u32 l = 0, gen, gen0, gen1;
 	unsigned long flags;
+	int c;
 
 	spin_lock_irqsave(&bank->lock, flags);
 	_gpio_dbck_enable(bank);
@@ -1276,14 +1282,17 @@ static int omap_gpio_runtime_resume(struct device *dev)
 	__raw_writel(bank->context.risingdetect,
 		     bank->base + bank->regs->risingdetect);
 
-	if (bank->get_context_loss_count) {
-		context_lost_cnt_after =
-			bank->get_context_loss_count(bank->dev);
-		if (context_lost_cnt_after != bank->context_loss_count) {
+	if (bank->loses_context) {
+		if (!bank->get_context_loss_count) {
 			omap_gpio_restore_context(bank);
 		} else {
-			spin_unlock_irqrestore(&bank->lock, flags);
-			return 0;
+			c = bank->get_context_loss_count(bank->dev);
+			if (c != bank->context_loss_count) {
+				omap_gpio_restore_context(bank);
+			} else {
+				spin_unlock_irqrestore(&bank->lock, flags);
+				return 0;
+			}
 		}
 	}
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 5/5] ARM: dts: OMAP2+: Identify GPIO banks that are always powered
  2013-04-04 20:16 ` Jon Hunter
@ 2013-04-04 20:16   ` Jon Hunter
  -1 siblings, 0 replies; 46+ messages in thread
From: Jon Hunter @ 2013-04-04 20:16 UTC (permalink / raw)
  To: Linus Walleij, Grant Likely, Santosh Shilimkar, Kevin Hilman
  Cc: device-tree, linux-omap, linux-arm, Jon Hunter, Benoit Cousson

Add the "ti,gpio-always-on" property to the appropriate GPIO banks to
indicate which banks are always powered and will never lose logic state.

Cc: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
---
 arch/arm/boot/dts/omap2420.dtsi |    4 ++++
 arch/arm/boot/dts/omap2430.dtsi |    4 ++++
 arch/arm/boot/dts/omap3.dtsi    |    1 +
 arch/arm/boot/dts/omap4.dtsi    |    1 +
 arch/arm/boot/dts/omap5.dtsi    |    1 +
 5 files changed, 11 insertions(+)

diff --git a/arch/arm/boot/dts/omap2420.dtsi b/arch/arm/boot/dts/omap2420.dtsi
index 455b239..76446ff 100644
--- a/arch/arm/boot/dts/omap2420.dtsi
+++ b/arch/arm/boot/dts/omap2420.dtsi
@@ -34,6 +34,7 @@
 			reg = <0x48018000 0x200>;
 			interrupts = <29>;
 			ti,hwmods = "gpio1";
+			ti,gpio-always-on;
 			#gpio-cells = <2>;
 			gpio-controller;
 			#interrupt-cells = <2>;
@@ -45,6 +46,7 @@
 			reg = <0x4801a000 0x200>;
 			interrupts = <30>;
 			ti,hwmods = "gpio2";
+			ti,gpio-always-on;
 			#gpio-cells = <2>;
 			gpio-controller;
 			#interrupt-cells = <2>;
@@ -56,6 +58,7 @@
 			reg = <0x4801c000 0x200>;
 			interrupts = <31>;
 			ti,hwmods = "gpio3";
+			ti,gpio-always-on;
 			#gpio-cells = <2>;
 			gpio-controller;
 			#interrupt-cells = <2>;
@@ -67,6 +70,7 @@
 			reg = <0x4801e000 0x200>;
 			interrupts = <32>;
 			ti,hwmods = "gpio4";
+			ti,gpio-always-on;
 			#gpio-cells = <2>;
 			gpio-controller;
 			#interrupt-cells = <2>;
diff --git a/arch/arm/boot/dts/omap2430.dtsi b/arch/arm/boot/dts/omap2430.dtsi
index 477b120..ca2c4a3 100644
--- a/arch/arm/boot/dts/omap2430.dtsi
+++ b/arch/arm/boot/dts/omap2430.dtsi
@@ -34,6 +34,7 @@
 			reg = <0x4900c000 0x200>;
 			interrupts = <29>;
 			ti,hwmods = "gpio1";
+			ti,gpio-always-on;
 			#gpio-cells = <2>;
 			gpio-controller;
 			#interrupt-cells = <2>;
@@ -45,6 +46,7 @@
 			reg = <0x4900e000 0x200>;
 			interrupts = <30>;
 			ti,hwmods = "gpio2";
+			ti,gpio-always-on;
 			#gpio-cells = <2>;
 			gpio-controller;
 			#interrupt-cells = <2>;
@@ -56,6 +58,7 @@
 			reg = <0x49010000 0x200>;
 			interrupts = <31>;
 			ti,hwmods = "gpio3";
+			ti,gpio-always-on;
 			#gpio-cells = <2>;
 			gpio-controller;
 			#interrupt-cells = <2>;
@@ -67,6 +70,7 @@
 			reg = <0x49012000 0x200>;
 			interrupts = <32>;
 			ti,hwmods = "gpio4";
+			ti,gpio-always-on;
 			#gpio-cells = <2>;
 			gpio-controller;
 			#interrupt-cells = <2>;
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index 3344f05..626406f 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -116,6 +116,7 @@
 			reg = <0x48310000 0x200>;
 			interrupts = <29>;
 			ti,hwmods = "gpio1";
+			ti,gpio-always-on;
 			gpio-controller;
 			#gpio-cells = <2>;
 			interrupt-controller;
diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index 3329140..627f6ca 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -140,6 +140,7 @@
 			reg = <0x4a310000 0x200>;
 			interrupts = <0 29 0x4>;
 			ti,hwmods = "gpio1";
+			ti,gpio-always-on;
 			gpio-controller;
 			#gpio-cells = <2>;
 			interrupt-controller;
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index f4c71d9..82a4b03 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -133,6 +133,7 @@
 			reg = <0x4ae10000 0x200>;
 			interrupts = <0 29 0x4>;
 			ti,hwmods = "gpio1";
+			ti,gpio-always-on;
 			gpio-controller;
 			#gpio-cells = <2>;
 			interrupt-controller;
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 5/5] ARM: dts: OMAP2+: Identify GPIO banks that are always powered
@ 2013-04-04 20:16   ` Jon Hunter
  0 siblings, 0 replies; 46+ messages in thread
From: Jon Hunter @ 2013-04-04 20:16 UTC (permalink / raw)
  To: linux-arm-kernel

Add the "ti,gpio-always-on" property to the appropriate GPIO banks to
indicate which banks are always powered and will never lose logic state.

Cc: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
---
 arch/arm/boot/dts/omap2420.dtsi |    4 ++++
 arch/arm/boot/dts/omap2430.dtsi |    4 ++++
 arch/arm/boot/dts/omap3.dtsi    |    1 +
 arch/arm/boot/dts/omap4.dtsi    |    1 +
 arch/arm/boot/dts/omap5.dtsi    |    1 +
 5 files changed, 11 insertions(+)

diff --git a/arch/arm/boot/dts/omap2420.dtsi b/arch/arm/boot/dts/omap2420.dtsi
index 455b239..76446ff 100644
--- a/arch/arm/boot/dts/omap2420.dtsi
+++ b/arch/arm/boot/dts/omap2420.dtsi
@@ -34,6 +34,7 @@
 			reg = <0x48018000 0x200>;
 			interrupts = <29>;
 			ti,hwmods = "gpio1";
+			ti,gpio-always-on;
 			#gpio-cells = <2>;
 			gpio-controller;
 			#interrupt-cells = <2>;
@@ -45,6 +46,7 @@
 			reg = <0x4801a000 0x200>;
 			interrupts = <30>;
 			ti,hwmods = "gpio2";
+			ti,gpio-always-on;
 			#gpio-cells = <2>;
 			gpio-controller;
 			#interrupt-cells = <2>;
@@ -56,6 +58,7 @@
 			reg = <0x4801c000 0x200>;
 			interrupts = <31>;
 			ti,hwmods = "gpio3";
+			ti,gpio-always-on;
 			#gpio-cells = <2>;
 			gpio-controller;
 			#interrupt-cells = <2>;
@@ -67,6 +70,7 @@
 			reg = <0x4801e000 0x200>;
 			interrupts = <32>;
 			ti,hwmods = "gpio4";
+			ti,gpio-always-on;
 			#gpio-cells = <2>;
 			gpio-controller;
 			#interrupt-cells = <2>;
diff --git a/arch/arm/boot/dts/omap2430.dtsi b/arch/arm/boot/dts/omap2430.dtsi
index 477b120..ca2c4a3 100644
--- a/arch/arm/boot/dts/omap2430.dtsi
+++ b/arch/arm/boot/dts/omap2430.dtsi
@@ -34,6 +34,7 @@
 			reg = <0x4900c000 0x200>;
 			interrupts = <29>;
 			ti,hwmods = "gpio1";
+			ti,gpio-always-on;
 			#gpio-cells = <2>;
 			gpio-controller;
 			#interrupt-cells = <2>;
@@ -45,6 +46,7 @@
 			reg = <0x4900e000 0x200>;
 			interrupts = <30>;
 			ti,hwmods = "gpio2";
+			ti,gpio-always-on;
 			#gpio-cells = <2>;
 			gpio-controller;
 			#interrupt-cells = <2>;
@@ -56,6 +58,7 @@
 			reg = <0x49010000 0x200>;
 			interrupts = <31>;
 			ti,hwmods = "gpio3";
+			ti,gpio-always-on;
 			#gpio-cells = <2>;
 			gpio-controller;
 			#interrupt-cells = <2>;
@@ -67,6 +70,7 @@
 			reg = <0x49012000 0x200>;
 			interrupts = <32>;
 			ti,hwmods = "gpio4";
+			ti,gpio-always-on;
 			#gpio-cells = <2>;
 			gpio-controller;
 			#interrupt-cells = <2>;
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index 3344f05..626406f 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -116,6 +116,7 @@
 			reg = <0x48310000 0x200>;
 			interrupts = <29>;
 			ti,hwmods = "gpio1";
+			ti,gpio-always-on;
 			gpio-controller;
 			#gpio-cells = <2>;
 			interrupt-controller;
diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index 3329140..627f6ca 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -140,6 +140,7 @@
 			reg = <0x4a310000 0x200>;
 			interrupts = <0 29 0x4>;
 			ti,hwmods = "gpio1";
+			ti,gpio-always-on;
 			gpio-controller;
 			#gpio-cells = <2>;
 			interrupt-controller;
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index f4c71d9..82a4b03 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -133,6 +133,7 @@
 			reg = <0x4ae10000 0x200>;
 			interrupts = <0 29 0x4>;
 			ti,hwmods = "gpio1";
+			ti,gpio-always-on;
 			gpio-controller;
 			#gpio-cells = <2>;
 			interrupt-controller;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* Re: [PATCH 5/5] ARM: dts: OMAP2+: Identify GPIO banks that are always powered
  2013-04-04 20:16   ` Jon Hunter
@ 2013-04-04 20:35     ` Tony Lindgren
  -1 siblings, 0 replies; 46+ messages in thread
From: Tony Lindgren @ 2013-04-04 20:35 UTC (permalink / raw)
  To: Jon Hunter
  Cc: Linus Walleij, Grant Likely, Santosh Shilimkar, Kevin Hilman,
	device-tree, linux-omap, linux-arm, Benoit Cousson

* Jon Hunter <jon-hunter@ti.com> [130404 13:21]:
> Add the "ti,gpio-always-on" property to the appropriate GPIO banks to
> indicate which banks are always powered and will never lose logic state.

This patch should be queued by Benoit as this will likely cause
pointless merge conflicts with the other .dts files.

Regards,

Tony
 
> Cc: Benoit Cousson <b-cousson@ti.com>
> Signed-off-by: Jon Hunter <jon-hunter@ti.com>
> ---
>  arch/arm/boot/dts/omap2420.dtsi |    4 ++++
>  arch/arm/boot/dts/omap2430.dtsi |    4 ++++
>  arch/arm/boot/dts/omap3.dtsi    |    1 +
>  arch/arm/boot/dts/omap4.dtsi    |    1 +
>  arch/arm/boot/dts/omap5.dtsi    |    1 +
>  5 files changed, 11 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/omap2420.dtsi b/arch/arm/boot/dts/omap2420.dtsi
> index 455b239..76446ff 100644
> --- a/arch/arm/boot/dts/omap2420.dtsi
> +++ b/arch/arm/boot/dts/omap2420.dtsi
> @@ -34,6 +34,7 @@
>  			reg = <0x48018000 0x200>;
>  			interrupts = <29>;
>  			ti,hwmods = "gpio1";
> +			ti,gpio-always-on;
>  			#gpio-cells = <2>;
>  			gpio-controller;
>  			#interrupt-cells = <2>;
> @@ -45,6 +46,7 @@
>  			reg = <0x4801a000 0x200>;
>  			interrupts = <30>;
>  			ti,hwmods = "gpio2";
> +			ti,gpio-always-on;
>  			#gpio-cells = <2>;
>  			gpio-controller;
>  			#interrupt-cells = <2>;
> @@ -56,6 +58,7 @@
>  			reg = <0x4801c000 0x200>;
>  			interrupts = <31>;
>  			ti,hwmods = "gpio3";
> +			ti,gpio-always-on;
>  			#gpio-cells = <2>;
>  			gpio-controller;
>  			#interrupt-cells = <2>;
> @@ -67,6 +70,7 @@
>  			reg = <0x4801e000 0x200>;
>  			interrupts = <32>;
>  			ti,hwmods = "gpio4";
> +			ti,gpio-always-on;
>  			#gpio-cells = <2>;
>  			gpio-controller;
>  			#interrupt-cells = <2>;
> diff --git a/arch/arm/boot/dts/omap2430.dtsi b/arch/arm/boot/dts/omap2430.dtsi
> index 477b120..ca2c4a3 100644
> --- a/arch/arm/boot/dts/omap2430.dtsi
> +++ b/arch/arm/boot/dts/omap2430.dtsi
> @@ -34,6 +34,7 @@
>  			reg = <0x4900c000 0x200>;
>  			interrupts = <29>;
>  			ti,hwmods = "gpio1";
> +			ti,gpio-always-on;
>  			#gpio-cells = <2>;
>  			gpio-controller;
>  			#interrupt-cells = <2>;
> @@ -45,6 +46,7 @@
>  			reg = <0x4900e000 0x200>;
>  			interrupts = <30>;
>  			ti,hwmods = "gpio2";
> +			ti,gpio-always-on;
>  			#gpio-cells = <2>;
>  			gpio-controller;
>  			#interrupt-cells = <2>;
> @@ -56,6 +58,7 @@
>  			reg = <0x49010000 0x200>;
>  			interrupts = <31>;
>  			ti,hwmods = "gpio3";
> +			ti,gpio-always-on;
>  			#gpio-cells = <2>;
>  			gpio-controller;
>  			#interrupt-cells = <2>;
> @@ -67,6 +70,7 @@
>  			reg = <0x49012000 0x200>;
>  			interrupts = <32>;
>  			ti,hwmods = "gpio4";
> +			ti,gpio-always-on;
>  			#gpio-cells = <2>;
>  			gpio-controller;
>  			#interrupt-cells = <2>;
> diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
> index 3344f05..626406f 100644
> --- a/arch/arm/boot/dts/omap3.dtsi
> +++ b/arch/arm/boot/dts/omap3.dtsi
> @@ -116,6 +116,7 @@
>  			reg = <0x48310000 0x200>;
>  			interrupts = <29>;
>  			ti,hwmods = "gpio1";
> +			ti,gpio-always-on;
>  			gpio-controller;
>  			#gpio-cells = <2>;
>  			interrupt-controller;
> diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
> index 3329140..627f6ca 100644
> --- a/arch/arm/boot/dts/omap4.dtsi
> +++ b/arch/arm/boot/dts/omap4.dtsi
> @@ -140,6 +140,7 @@
>  			reg = <0x4a310000 0x200>;
>  			interrupts = <0 29 0x4>;
>  			ti,hwmods = "gpio1";
> +			ti,gpio-always-on;
>  			gpio-controller;
>  			#gpio-cells = <2>;
>  			interrupt-controller;
> diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
> index f4c71d9..82a4b03 100644
> --- a/arch/arm/boot/dts/omap5.dtsi
> +++ b/arch/arm/boot/dts/omap5.dtsi
> @@ -133,6 +133,7 @@
>  			reg = <0x4ae10000 0x200>;
>  			interrupts = <0 29 0x4>;
>  			ti,hwmods = "gpio1";
> +			ti,gpio-always-on;
>  			gpio-controller;
>  			#gpio-cells = <2>;
>  			interrupt-controller;
> -- 
> 1.7.10.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [PATCH 5/5] ARM: dts: OMAP2+: Identify GPIO banks that are always powered
@ 2013-04-04 20:35     ` Tony Lindgren
  0 siblings, 0 replies; 46+ messages in thread
From: Tony Lindgren @ 2013-04-04 20:35 UTC (permalink / raw)
  To: linux-arm-kernel

* Jon Hunter <jon-hunter@ti.com> [130404 13:21]:
> Add the "ti,gpio-always-on" property to the appropriate GPIO banks to
> indicate which banks are always powered and will never lose logic state.

This patch should be queued by Benoit as this will likely cause
pointless merge conflicts with the other .dts files.

Regards,

Tony
 
> Cc: Benoit Cousson <b-cousson@ti.com>
> Signed-off-by: Jon Hunter <jon-hunter@ti.com>
> ---
>  arch/arm/boot/dts/omap2420.dtsi |    4 ++++
>  arch/arm/boot/dts/omap2430.dtsi |    4 ++++
>  arch/arm/boot/dts/omap3.dtsi    |    1 +
>  arch/arm/boot/dts/omap4.dtsi    |    1 +
>  arch/arm/boot/dts/omap5.dtsi    |    1 +
>  5 files changed, 11 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/omap2420.dtsi b/arch/arm/boot/dts/omap2420.dtsi
> index 455b239..76446ff 100644
> --- a/arch/arm/boot/dts/omap2420.dtsi
> +++ b/arch/arm/boot/dts/omap2420.dtsi
> @@ -34,6 +34,7 @@
>  			reg = <0x48018000 0x200>;
>  			interrupts = <29>;
>  			ti,hwmods = "gpio1";
> +			ti,gpio-always-on;
>  			#gpio-cells = <2>;
>  			gpio-controller;
>  			#interrupt-cells = <2>;
> @@ -45,6 +46,7 @@
>  			reg = <0x4801a000 0x200>;
>  			interrupts = <30>;
>  			ti,hwmods = "gpio2";
> +			ti,gpio-always-on;
>  			#gpio-cells = <2>;
>  			gpio-controller;
>  			#interrupt-cells = <2>;
> @@ -56,6 +58,7 @@
>  			reg = <0x4801c000 0x200>;
>  			interrupts = <31>;
>  			ti,hwmods = "gpio3";
> +			ti,gpio-always-on;
>  			#gpio-cells = <2>;
>  			gpio-controller;
>  			#interrupt-cells = <2>;
> @@ -67,6 +70,7 @@
>  			reg = <0x4801e000 0x200>;
>  			interrupts = <32>;
>  			ti,hwmods = "gpio4";
> +			ti,gpio-always-on;
>  			#gpio-cells = <2>;
>  			gpio-controller;
>  			#interrupt-cells = <2>;
> diff --git a/arch/arm/boot/dts/omap2430.dtsi b/arch/arm/boot/dts/omap2430.dtsi
> index 477b120..ca2c4a3 100644
> --- a/arch/arm/boot/dts/omap2430.dtsi
> +++ b/arch/arm/boot/dts/omap2430.dtsi
> @@ -34,6 +34,7 @@
>  			reg = <0x4900c000 0x200>;
>  			interrupts = <29>;
>  			ti,hwmods = "gpio1";
> +			ti,gpio-always-on;
>  			#gpio-cells = <2>;
>  			gpio-controller;
>  			#interrupt-cells = <2>;
> @@ -45,6 +46,7 @@
>  			reg = <0x4900e000 0x200>;
>  			interrupts = <30>;
>  			ti,hwmods = "gpio2";
> +			ti,gpio-always-on;
>  			#gpio-cells = <2>;
>  			gpio-controller;
>  			#interrupt-cells = <2>;
> @@ -56,6 +58,7 @@
>  			reg = <0x49010000 0x200>;
>  			interrupts = <31>;
>  			ti,hwmods = "gpio3";
> +			ti,gpio-always-on;
>  			#gpio-cells = <2>;
>  			gpio-controller;
>  			#interrupt-cells = <2>;
> @@ -67,6 +70,7 @@
>  			reg = <0x49012000 0x200>;
>  			interrupts = <32>;
>  			ti,hwmods = "gpio4";
> +			ti,gpio-always-on;
>  			#gpio-cells = <2>;
>  			gpio-controller;
>  			#interrupt-cells = <2>;
> diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
> index 3344f05..626406f 100644
> --- a/arch/arm/boot/dts/omap3.dtsi
> +++ b/arch/arm/boot/dts/omap3.dtsi
> @@ -116,6 +116,7 @@
>  			reg = <0x48310000 0x200>;
>  			interrupts = <29>;
>  			ti,hwmods = "gpio1";
> +			ti,gpio-always-on;
>  			gpio-controller;
>  			#gpio-cells = <2>;
>  			interrupt-controller;
> diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
> index 3329140..627f6ca 100644
> --- a/arch/arm/boot/dts/omap4.dtsi
> +++ b/arch/arm/boot/dts/omap4.dtsi
> @@ -140,6 +140,7 @@
>  			reg = <0x4a310000 0x200>;
>  			interrupts = <0 29 0x4>;
>  			ti,hwmods = "gpio1";
> +			ti,gpio-always-on;
>  			gpio-controller;
>  			#gpio-cells = <2>;
>  			interrupt-controller;
> diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
> index f4c71d9..82a4b03 100644
> --- a/arch/arm/boot/dts/omap5.dtsi
> +++ b/arch/arm/boot/dts/omap5.dtsi
> @@ -133,6 +133,7 @@
>  			reg = <0x4ae10000 0x200>;
>  			interrupts = <0 29 0x4>;
>  			ti,hwmods = "gpio1";
> +			ti,gpio-always-on;
>  			gpio-controller;
>  			#gpio-cells = <2>;
>  			interrupt-controller;
> -- 
> 1.7.10.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 5/5] ARM: dts: OMAP2+: Identify GPIO banks that are always powered
  2013-04-04 20:35     ` Tony Lindgren
@ 2013-04-04 21:01       ` Jon Hunter
  -1 siblings, 0 replies; 46+ messages in thread
From: Jon Hunter @ 2013-04-04 21:01 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Linus Walleij, Grant Likely, Santosh Shilimkar, Kevin Hilman,
	device-tree, linux-omap, linux-arm, Benoit Cousson


On 04/04/2013 03:35 PM, Tony Lindgren wrote:
> * Jon Hunter <jon-hunter@ti.com> [130404 13:21]:
>> Add the "ti,gpio-always-on" property to the appropriate GPIO banks to
>> indicate which banks are always powered and will never lose logic state.
> 
> This patch should be queued by Benoit as this will likely cause
> pointless merge conflicts with the other .dts files.

Yes agreed. I mentioned that in the cover-letter.

Cheers
Jon

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [PATCH 5/5] ARM: dts: OMAP2+: Identify GPIO banks that are always powered
@ 2013-04-04 21:01       ` Jon Hunter
  0 siblings, 0 replies; 46+ messages in thread
From: Jon Hunter @ 2013-04-04 21:01 UTC (permalink / raw)
  To: linux-arm-kernel


On 04/04/2013 03:35 PM, Tony Lindgren wrote:
> * Jon Hunter <jon-hunter@ti.com> [130404 13:21]:
>> Add the "ti,gpio-always-on" property to the appropriate GPIO banks to
>> indicate which banks are always powered and will never lose logic state.
> 
> This patch should be queued by Benoit as this will likely cause
> pointless merge conflicts with the other .dts files.

Yes agreed. I mentioned that in the cover-letter.

Cheers
Jon

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 5/5] ARM: dts: OMAP2+: Identify GPIO banks that are always powered
  2013-04-04 21:01       ` Jon Hunter
@ 2013-04-04 21:08         ` Tony Lindgren
  -1 siblings, 0 replies; 46+ messages in thread
From: Tony Lindgren @ 2013-04-04 21:08 UTC (permalink / raw)
  To: Jon Hunter
  Cc: Linus Walleij, Grant Likely, Santosh Shilimkar, Kevin Hilman,
	device-tree, linux-omap, linux-arm, Benoit Cousson

* Jon Hunter <jon-hunter@ti.com> [130404 14:05]:
> 
> On 04/04/2013 03:35 PM, Tony Lindgren wrote:
> > * Jon Hunter <jon-hunter@ti.com> [130404 13:21]:
> >> Add the "ti,gpio-always-on" property to the appropriate GPIO banks to
> >> indicate which banks are always powered and will never lose logic state.
> > 
> > This patch should be queued by Benoit as this will likely cause
> > pointless merge conflicts with the other .dts files.
> 
> Yes agreed. I mentioned that in the cover-letter.

OK thanks.

Tony

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [PATCH 5/5] ARM: dts: OMAP2+: Identify GPIO banks that are always powered
@ 2013-04-04 21:08         ` Tony Lindgren
  0 siblings, 0 replies; 46+ messages in thread
From: Tony Lindgren @ 2013-04-04 21:08 UTC (permalink / raw)
  To: linux-arm-kernel

* Jon Hunter <jon-hunter@ti.com> [130404 14:05]:
> 
> On 04/04/2013 03:35 PM, Tony Lindgren wrote:
> > * Jon Hunter <jon-hunter@ti.com> [130404 13:21]:
> >> Add the "ti,gpio-always-on" property to the appropriate GPIO banks to
> >> indicate which banks are always powered and will never lose logic state.
> > 
> > This patch should be queued by Benoit as this will likely cause
> > pointless merge conflicts with the other .dts files.
> 
> Yes agreed. I mentioned that in the cover-letter.

OK thanks.

Tony

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 0/5] gpio/omap: 2nd batch of updates for v3.10
  2013-04-04 20:16 ` Jon Hunter
@ 2013-04-05  6:35   ` Santosh Shilimkar
  -1 siblings, 0 replies; 46+ messages in thread
From: Santosh Shilimkar @ 2013-04-05  6:35 UTC (permalink / raw)
  To: Jon Hunter
  Cc: Linus Walleij, Grant Likely, Kevin Hilman, device-tree,
	linux-omap, linux-arm

On Friday 05 April 2013 01:46 AM, Jon Hunter wrote:
> Main change is ensuring that the state of a gpio bank is restored when
> booting with device-tree. The rest of the patches are clean-ups and one
> optimisation.
> 
> The patch modifying the *.dtsi files should go via Benoit Cousson's
> for_3.10/dts branch [1] as it is dependent on changes in his branch but
> I have included here for completeness.
> 
> Testing includes:
> - Boot testing on OMAP5912 OSK, OMAP2420 H4, OMAP3430 SDP, OMAP4430 SDP
>   and AM335x EVM.
> - Verified that GPIO interrupts are working on OMAP5912 OSK, OMAP2420 H4,
>   OMAP3430 SDP and OMAP4430 SDP by making sure networking was working
>   correctly as these boards use a GPIO with the ethernet chips. Also
>   checked /proc/interrupts to ensure GPIO interrupt counts are
>   incrementing as expected.
> 
> [1] http://git.kernel.org/cgit/linux/kernel/git/bcousson/linux-omap-dt.git
> 
> Jon Hunter (4):
>   gpio/omap: free irq domain in probe() failure paths
>   gpio/omap: optimise interrupt service routine
>   gpio/omap: force restore if context loss is not detectable
>   ARM: dts: OMAP2+: Identify GPIO banks that are always powered
> 
> Tarun Kanti DebBarma (1):
>   gpio/omap: remove extra context restores in *_runtime_resume()
>

Thanks Jon for pulling the fixes. I suggest you to split the series so
that 'gpio/omap:*' can be pulled by Grant and 'ARM: dts:*' by Benoit.

All the 'gpio/omap:*' patches in the series looks fine to me.
FWIW,
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [PATCH 0/5] gpio/omap: 2nd batch of updates for v3.10
@ 2013-04-05  6:35   ` Santosh Shilimkar
  0 siblings, 0 replies; 46+ messages in thread
From: Santosh Shilimkar @ 2013-04-05  6:35 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday 05 April 2013 01:46 AM, Jon Hunter wrote:
> Main change is ensuring that the state of a gpio bank is restored when
> booting with device-tree. The rest of the patches are clean-ups and one
> optimisation.
> 
> The patch modifying the *.dtsi files should go via Benoit Cousson's
> for_3.10/dts branch [1] as it is dependent on changes in his branch but
> I have included here for completeness.
> 
> Testing includes:
> - Boot testing on OMAP5912 OSK, OMAP2420 H4, OMAP3430 SDP, OMAP4430 SDP
>   and AM335x EVM.
> - Verified that GPIO interrupts are working on OMAP5912 OSK, OMAP2420 H4,
>   OMAP3430 SDP and OMAP4430 SDP by making sure networking was working
>   correctly as these boards use a GPIO with the ethernet chips. Also
>   checked /proc/interrupts to ensure GPIO interrupt counts are
>   incrementing as expected.
> 
> [1] http://git.kernel.org/cgit/linux/kernel/git/bcousson/linux-omap-dt.git
> 
> Jon Hunter (4):
>   gpio/omap: free irq domain in probe() failure paths
>   gpio/omap: optimise interrupt service routine
>   gpio/omap: force restore if context loss is not detectable
>   ARM: dts: OMAP2+: Identify GPIO banks that are always powered
> 
> Tarun Kanti DebBarma (1):
>   gpio/omap: remove extra context restores in *_runtime_resume()
>

Thanks Jon for pulling the fixes. I suggest you to split the series so
that 'gpio/omap:*' can be pulled by Grant and 'ARM: dts:*' by Benoit.

All the 'gpio/omap:*' patches in the series looks fine to me.
FWIW,
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 3/5] gpio/omap: optimise interrupt service routine
  2013-04-04 20:16   ` Jon Hunter
@ 2013-04-05  9:19     ` Felipe Balbi
  -1 siblings, 0 replies; 46+ messages in thread
From: Felipe Balbi @ 2013-04-05  9:19 UTC (permalink / raw)
  To: Jon Hunter
  Cc: Kevin Hilman, Linus Walleij, Felipe Balbi, Grant Likely,
	Santosh Shilimkar, linux-omap, device-tree, linux-arm


[-- Attachment #1.1: Type: text/plain, Size: 2267 bytes --]

On Thu, Apr 04, 2013 at 03:16:14PM -0500, Jon Hunter wrote:
> The OMAP GPIO interrupt service routine is checking each bit in the
> GPIO interrupt status register to see which bits are set. It is not
> efficient to check every bit especially if only a few bits are set.
> Therefore, instead of checking every bit use the __ffs() function,
> which returns the location of the first set bit, to find all the set
> bits.
> 
> This optimisation was suggested-by and developed in collaboration
> with Felipe Balbi.
> 
> Cc: Felipe Balbi <balbi@ti.com>
> 
> Signed-off-by: Jon Hunter <jon-hunter@ti.com>

looks alright:

Reviewed-by: Felipe Balbi <balbi@ti.com>

> ---
>  drivers/gpio/gpio-omap.c |   14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
> index 5af7acd..685e850 100644
> --- a/drivers/gpio/gpio-omap.c
> +++ b/drivers/gpio/gpio-omap.c
> @@ -689,7 +689,7 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
>  {
>  	void __iomem *isr_reg = NULL;
>  	u32 isr;
> -	unsigned int i;
> +	unsigned int bit;
>  	struct gpio_bank *bank;
>  	int unmasked = 0;
>  	struct irq_chip *chip = irq_desc_get_chip(desc);
> @@ -730,9 +730,9 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
>  		if (!isr)
>  			break;
>  
> -		for (i = 0; isr != 0; isr >>= 1, i++) {
> -			if (!(isr & 1))
> -				continue;
> +		while (isr) {
> +			bit = __ffs(isr);
> +			isr &= ~(1 << bit);
>  
>  			/*
>  			 * Some chips can't respond to both rising and falling
> @@ -741,10 +741,10 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
>  			 * to respond to the IRQ for the opposite direction.
>  			 * This will be indicated in the bank toggle_mask.
>  			 */
> -			if (bank->toggle_mask & (1 << i))
> -				_toggle_gpio_edge_triggering(bank, i);
> +			if (bank->toggle_mask & (1 << bit))
> +				_toggle_gpio_edge_triggering(bank, bit);
>  
> -			generic_handle_irq(irq_find_mapping(bank->domain, i));
> +			generic_handle_irq(irq_find_mapping(bank->domain, bit));
>  		}
>  	}
>  	/* if bank has any level sensitive GPIO pin interrupt
> -- 
> 1.7.10.4
> 

-- 
balbi

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [PATCH 3/5] gpio/omap: optimise interrupt service routine
@ 2013-04-05  9:19     ` Felipe Balbi
  0 siblings, 0 replies; 46+ messages in thread
From: Felipe Balbi @ 2013-04-05  9:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Apr 04, 2013 at 03:16:14PM -0500, Jon Hunter wrote:
> The OMAP GPIO interrupt service routine is checking each bit in the
> GPIO interrupt status register to see which bits are set. It is not
> efficient to check every bit especially if only a few bits are set.
> Therefore, instead of checking every bit use the __ffs() function,
> which returns the location of the first set bit, to find all the set
> bits.
> 
> This optimisation was suggested-by and developed in collaboration
> with Felipe Balbi.
> 
> Cc: Felipe Balbi <balbi@ti.com>
> 
> Signed-off-by: Jon Hunter <jon-hunter@ti.com>

looks alright:

Reviewed-by: Felipe Balbi <balbi@ti.com>

> ---
>  drivers/gpio/gpio-omap.c |   14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
> index 5af7acd..685e850 100644
> --- a/drivers/gpio/gpio-omap.c
> +++ b/drivers/gpio/gpio-omap.c
> @@ -689,7 +689,7 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
>  {
>  	void __iomem *isr_reg = NULL;
>  	u32 isr;
> -	unsigned int i;
> +	unsigned int bit;
>  	struct gpio_bank *bank;
>  	int unmasked = 0;
>  	struct irq_chip *chip = irq_desc_get_chip(desc);
> @@ -730,9 +730,9 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
>  		if (!isr)
>  			break;
>  
> -		for (i = 0; isr != 0; isr >>= 1, i++) {
> -			if (!(isr & 1))
> -				continue;
> +		while (isr) {
> +			bit = __ffs(isr);
> +			isr &= ~(1 << bit);
>  
>  			/*
>  			 * Some chips can't respond to both rising and falling
> @@ -741,10 +741,10 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
>  			 * to respond to the IRQ for the opposite direction.
>  			 * This will be indicated in the bank toggle_mask.
>  			 */
> -			if (bank->toggle_mask & (1 << i))
> -				_toggle_gpio_edge_triggering(bank, i);
> +			if (bank->toggle_mask & (1 << bit))
> +				_toggle_gpio_edge_triggering(bank, bit);
>  
> -			generic_handle_irq(irq_find_mapping(bank->domain, i));
> +			generic_handle_irq(irq_find_mapping(bank->domain, bit));
>  		}
>  	}
>  	/* if bank has any level sensitive GPIO pin interrupt
> -- 
> 1.7.10.4
> 

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130405/1674148b/attachment.sig>

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 0/5] gpio/omap: 2nd batch of updates for v3.10
  2013-04-05  6:35   ` Santosh Shilimkar
@ 2013-04-05 12:18     ` Jon Hunter
  -1 siblings, 0 replies; 46+ messages in thread
From: Jon Hunter @ 2013-04-05 12:18 UTC (permalink / raw)
  To: Santosh Shilimkar
  Cc: Kevin Hilman, Linus Walleij, Grant Likely, linux-omap,
	device-tree, linux-arm


On 04/05/2013 01:35 AM, Santosh Shilimkar wrote:
> On Friday 05 April 2013 01:46 AM, Jon Hunter wrote:
>> Main change is ensuring that the state of a gpio bank is restored when
>> booting with device-tree. The rest of the patches are clean-ups and one
>> optimisation.
>>
>> The patch modifying the *.dtsi files should go via Benoit Cousson's
>> for_3.10/dts branch [1] as it is dependent on changes in his branch but
>> I have included here for completeness.
>>
>> Testing includes:
>> - Boot testing on OMAP5912 OSK, OMAP2420 H4, OMAP3430 SDP, OMAP4430 SDP
>>   and AM335x EVM.
>> - Verified that GPIO interrupts are working on OMAP5912 OSK, OMAP2420 H4,
>>   OMAP3430 SDP and OMAP4430 SDP by making sure networking was working
>>   correctly as these boards use a GPIO with the ethernet chips. Also
>>   checked /proc/interrupts to ensure GPIO interrupt counts are
>>   incrementing as expected.
>>
>> [1] http://git.kernel.org/cgit/linux/kernel/git/bcousson/linux-omap-dt.git
>>
>> Jon Hunter (4):
>>   gpio/omap: free irq domain in probe() failure paths
>>   gpio/omap: optimise interrupt service routine
>>   gpio/omap: force restore if context loss is not detectable
>>   ARM: dts: OMAP2+: Identify GPIO banks that are always powered
>>
>> Tarun Kanti DebBarma (1):
>>   gpio/omap: remove extra context restores in *_runtime_resume()
>>
> 
> Thanks Jon for pulling the fixes. I suggest you to split the series so
> that 'gpio/omap:*' can be pulled by Grant and 'ARM: dts:*' by Benoit.

Agreed. I had kept them altogether here for completeness as it would
have been odd to add a new property but not use it. If everyone is ok
with the changes, then I can either resend or Grant/Linus just pick up 1-4.

> All the 'gpio/omap:*' patches in the series looks fine to me.
> FWIW,
> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>

Thanks
Jon

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [PATCH 0/5] gpio/omap: 2nd batch of updates for v3.10
@ 2013-04-05 12:18     ` Jon Hunter
  0 siblings, 0 replies; 46+ messages in thread
From: Jon Hunter @ 2013-04-05 12:18 UTC (permalink / raw)
  To: linux-arm-kernel


On 04/05/2013 01:35 AM, Santosh Shilimkar wrote:
> On Friday 05 April 2013 01:46 AM, Jon Hunter wrote:
>> Main change is ensuring that the state of a gpio bank is restored when
>> booting with device-tree. The rest of the patches are clean-ups and one
>> optimisation.
>>
>> The patch modifying the *.dtsi files should go via Benoit Cousson's
>> for_3.10/dts branch [1] as it is dependent on changes in his branch but
>> I have included here for completeness.
>>
>> Testing includes:
>> - Boot testing on OMAP5912 OSK, OMAP2420 H4, OMAP3430 SDP, OMAP4430 SDP
>>   and AM335x EVM.
>> - Verified that GPIO interrupts are working on OMAP5912 OSK, OMAP2420 H4,
>>   OMAP3430 SDP and OMAP4430 SDP by making sure networking was working
>>   correctly as these boards use a GPIO with the ethernet chips. Also
>>   checked /proc/interrupts to ensure GPIO interrupt counts are
>>   incrementing as expected.
>>
>> [1] http://git.kernel.org/cgit/linux/kernel/git/bcousson/linux-omap-dt.git
>>
>> Jon Hunter (4):
>>   gpio/omap: free irq domain in probe() failure paths
>>   gpio/omap: optimise interrupt service routine
>>   gpio/omap: force restore if context loss is not detectable
>>   ARM: dts: OMAP2+: Identify GPIO banks that are always powered
>>
>> Tarun Kanti DebBarma (1):
>>   gpio/omap: remove extra context restores in *_runtime_resume()
>>
> 
> Thanks Jon for pulling the fixes. I suggest you to split the series so
> that 'gpio/omap:*' can be pulled by Grant and 'ARM: dts:*' by Benoit.

Agreed. I had kept them altogether here for completeness as it would
have been odd to add a new property but not use it. If everyone is ok
with the changes, then I can either resend or Grant/Linus just pick up 1-4.

> All the 'gpio/omap:*' patches in the series looks fine to me.
> FWIW,
> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>

Thanks
Jon

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 0/5] gpio/omap: 2nd batch of updates for v3.10
  2013-04-04 20:16 ` Jon Hunter
@ 2013-04-05 17:56   ` Kevin Hilman
  -1 siblings, 0 replies; 46+ messages in thread
From: Kevin Hilman @ 2013-04-05 17:56 UTC (permalink / raw)
  To: Jon Hunter
  Cc: Linus Walleij, Grant Likely, Santosh Shilimkar, linux-omap,
	device-tree, linux-arm

Jon Hunter <jon-hunter@ti.com> writes:

> Main change is ensuring that the state of a gpio bank is restored when
> booting with device-tree. The rest of the patches are clean-ups and one
> optimisation.
>
> The patch modifying the *.dtsi files should go via Benoit Cousson's
> for_3.10/dts branch [1] as it is dependent on changes in his branch but
> I have included here for completeness.
>
> Testing includes:
> - Boot testing on OMAP5912 OSK, OMAP2420 H4, OMAP3430 SDP, OMAP4430 SDP
>   and AM335x EVM.
> - Verified that GPIO interrupts are working on OMAP5912 OSK, OMAP2420 H4,
>   OMAP3430 SDP and OMAP4430 SDP by making sure networking was working
>   correctly as these boards use a GPIO with the ethernet chips. Also
>   checked /proc/interrupts to ensure GPIO interrupt counts are
>   incrementing as expected.
>
> [1] http://git.kernel.org/cgit/linux/kernel/git/bcousson/linux-omap-dt.git
>
> Jon Hunter (4):
>   gpio/omap: free irq domain in probe() failure paths
>   gpio/omap: optimise interrupt service routine
>   gpio/omap: force restore if context loss is not detectable
>   ARM: dts: OMAP2+: Identify GPIO banks that are always powered
>
> Tarun Kanti DebBarma (1):
>   gpio/omap: remove extra context restores in *_runtime_resume()

For the gpio/omap patches

Reviewed-by: Kevin Hilman <khilman@linaro.org>

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [PATCH 0/5] gpio/omap: 2nd batch of updates for v3.10
@ 2013-04-05 17:56   ` Kevin Hilman
  0 siblings, 0 replies; 46+ messages in thread
From: Kevin Hilman @ 2013-04-05 17:56 UTC (permalink / raw)
  To: linux-arm-kernel

Jon Hunter <jon-hunter@ti.com> writes:

> Main change is ensuring that the state of a gpio bank is restored when
> booting with device-tree. The rest of the patches are clean-ups and one
> optimisation.
>
> The patch modifying the *.dtsi files should go via Benoit Cousson's
> for_3.10/dts branch [1] as it is dependent on changes in his branch but
> I have included here for completeness.
>
> Testing includes:
> - Boot testing on OMAP5912 OSK, OMAP2420 H4, OMAP3430 SDP, OMAP4430 SDP
>   and AM335x EVM.
> - Verified that GPIO interrupts are working on OMAP5912 OSK, OMAP2420 H4,
>   OMAP3430 SDP and OMAP4430 SDP by making sure networking was working
>   correctly as these boards use a GPIO with the ethernet chips. Also
>   checked /proc/interrupts to ensure GPIO interrupt counts are
>   incrementing as expected.
>
> [1] http://git.kernel.org/cgit/linux/kernel/git/bcousson/linux-omap-dt.git
>
> Jon Hunter (4):
>   gpio/omap: free irq domain in probe() failure paths
>   gpio/omap: optimise interrupt service routine
>   gpio/omap: force restore if context loss is not detectable
>   ARM: dts: OMAP2+: Identify GPIO banks that are always powered
>
> Tarun Kanti DebBarma (1):
>   gpio/omap: remove extra context restores in *_runtime_resume()

For the gpio/omap patches

Reviewed-by: Kevin Hilman <khilman@linaro.org>

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 1/5] gpio/omap: free irq domain in probe() failure paths
  2013-04-04 20:16   ` Jon Hunter
@ 2013-04-10 19:33     ` Linus Walleij
  -1 siblings, 0 replies; 46+ messages in thread
From: Linus Walleij @ 2013-04-10 19:33 UTC (permalink / raw)
  To: Jon Hunter
  Cc: Grant Likely, Santosh Shilimkar, Kevin Hilman, device-tree,
	linux-omap, linux-arm

On Thu, Apr 4, 2013 at 10:16 PM, Jon Hunter <jon-hunter@ti.com> wrote:

> Currently the IRQ domain is not freed once allocated, in the case where
> omap_gpio_probe() fails. Therefore, ensure we free the domain if the
> probe does fail. Furthermore, the local variable "ret" is not needed
> and so remove this.
>
> Signed-off-by: Jon Hunter <jon-hunter@ti.com>

Hm Kevin is still listed as maintainer on this driver but on a mail
address that bounces, can you send a patch replacing him in MAINTAINERS
with yourself if you're willing to pick it up?

Anyway, patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [PATCH 1/5] gpio/omap: free irq domain in probe() failure paths
@ 2013-04-10 19:33     ` Linus Walleij
  0 siblings, 0 replies; 46+ messages in thread
From: Linus Walleij @ 2013-04-10 19:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Apr 4, 2013 at 10:16 PM, Jon Hunter <jon-hunter@ti.com> wrote:

> Currently the IRQ domain is not freed once allocated, in the case where
> omap_gpio_probe() fails. Therefore, ensure we free the domain if the
> probe does fail. Furthermore, the local variable "ret" is not needed
> and so remove this.
>
> Signed-off-by: Jon Hunter <jon-hunter@ti.com>

Hm Kevin is still listed as maintainer on this driver but on a mail
address that bounces, can you send a patch replacing him in MAINTAINERS
with yourself if you're willing to pick it up?

Anyway, patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 2/5] gpio/omap: remove extra context restores in *_runtime_resume()
  2013-04-04 20:16   ` Jon Hunter
@ 2013-04-10 19:34     ` Linus Walleij
  -1 siblings, 0 replies; 46+ messages in thread
From: Linus Walleij @ 2013-04-10 19:34 UTC (permalink / raw)
  To: Jon Hunter
  Cc: Grant Likely, Santosh Shilimkar, Kevin Hilman, device-tree,
	linux-omap, linux-arm, Tarun Kanti DebBarma

On Thu, Apr 4, 2013 at 10:16 PM, Jon Hunter <jon-hunter@ti.com> wrote:

> From: Tarun Kanti DebBarma <tarun.kanti@ti.com>
>
> 68942edb09f69b6e09522d1d346665eb3aadde49 (gpio/omap: fix wakeups
> on level-triggered GPIOs) already restores the fallingdetect and
> risingdetect contexts in *_runtime_resume(). These registers were
> modified in *_runtime_suspend() to include even those configured
> as level-triggered since only edge-triggered gpios can generate
> wakeup events. Therefore, the old context restores of the same
> registers present later in the code is not needed any more.
> Remove them.
>
> Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
> Signed-off-by: Jon Hunter <jon-hunter@ti.com>

Patch applied unless somebody complains.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [PATCH 2/5] gpio/omap: remove extra context restores in *_runtime_resume()
@ 2013-04-10 19:34     ` Linus Walleij
  0 siblings, 0 replies; 46+ messages in thread
From: Linus Walleij @ 2013-04-10 19:34 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Apr 4, 2013 at 10:16 PM, Jon Hunter <jon-hunter@ti.com> wrote:

> From: Tarun Kanti DebBarma <tarun.kanti@ti.com>
>
> 68942edb09f69b6e09522d1d346665eb3aadde49 (gpio/omap: fix wakeups
> on level-triggered GPIOs) already restores the fallingdetect and
> risingdetect contexts in *_runtime_resume(). These registers were
> modified in *_runtime_suspend() to include even those configured
> as level-triggered since only edge-triggered gpios can generate
> wakeup events. Therefore, the old context restores of the same
> registers present later in the code is not needed any more.
> Remove them.
>
> Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
> Signed-off-by: Jon Hunter <jon-hunter@ti.com>

Patch applied unless somebody complains.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 3/5] gpio/omap: optimise interrupt service routine
  2013-04-04 20:16   ` Jon Hunter
@ 2013-04-10 19:37     ` Linus Walleij
  -1 siblings, 0 replies; 46+ messages in thread
From: Linus Walleij @ 2013-04-10 19:37 UTC (permalink / raw)
  To: Jon Hunter
  Cc: Grant Likely, Santosh Shilimkar, Kevin Hilman, device-tree,
	linux-omap, linux-arm, Felipe Balbi

On Thu, Apr 4, 2013 at 10:16 PM, Jon Hunter <jon-hunter@ti.com> wrote:

> The OMAP GPIO interrupt service routine is checking each bit in the
> GPIO interrupt status register to see which bits are set. It is not
> efficient to check every bit especially if only a few bits are set.
> Therefore, instead of checking every bit use the __ffs() function,
> which returns the location of the first set bit, to find all the set
> bits.
>
> This optimisation was suggested-by and developed in collaboration
> with Felipe Balbi.
>
> Cc: Felipe Balbi <balbi@ti.com>
>
> Signed-off-by: Jon Hunter <jon-hunter@ti.com>

Patch applied with Felipe's Reviewed-by tag.

Thanks,
Linus Walleij

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [PATCH 3/5] gpio/omap: optimise interrupt service routine
@ 2013-04-10 19:37     ` Linus Walleij
  0 siblings, 0 replies; 46+ messages in thread
From: Linus Walleij @ 2013-04-10 19:37 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Apr 4, 2013 at 10:16 PM, Jon Hunter <jon-hunter@ti.com> wrote:

> The OMAP GPIO interrupt service routine is checking each bit in the
> GPIO interrupt status register to see which bits are set. It is not
> efficient to check every bit especially if only a few bits are set.
> Therefore, instead of checking every bit use the __ffs() function,
> which returns the location of the first set bit, to find all the set
> bits.
>
> This optimisation was suggested-by and developed in collaboration
> with Felipe Balbi.
>
> Cc: Felipe Balbi <balbi@ti.com>
>
> Signed-off-by: Jon Hunter <jon-hunter@ti.com>

Patch applied with Felipe's Reviewed-by tag.

Thanks,
Linus Walleij

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 4/5] gpio/omap: force restore if context loss is not detectable
  2013-04-04 20:16   ` Jon Hunter
@ 2013-04-10 19:39     ` Linus Walleij
  -1 siblings, 0 replies; 46+ messages in thread
From: Linus Walleij @ 2013-04-10 19:39 UTC (permalink / raw)
  To: Jon Hunter
  Cc: Kevin Hilman, device-tree, Grant Likely, Santosh Shilimkar,
	linux-omap, linux-arm

On Thu, Apr 4, 2013 at 10:16 PM, Jon Hunter <jon-hunter@ti.com> wrote:

> When booting with device-tree the function pointer for detecting context
> loss is not populated. Ideally, the pm_runtime framework should be
> enhanced to allow a means for reporting context/state loss and we could
> avoid populating such function pointers altogether. In the interim until
> a generic non-device specific solution is in place, force a restore of
> the gpio bank when enabling the gpio controller.
>
> Adds a new device-tree property for the OMAP GPIO controller to indicate
> if the GPIO controller is located in a power-domain that never loses
> power and hence will always maintain its logic state.
>
> Signed-off-by: Jon Hunter <jon-hunter@ti.com>

In this case it'd be really helpful to get an ACK from somebody else.
I have no clue whether this thing is doing what it should, and if
you were the maintainer I'd apply it but now I'd like to hear from
Kevin or Santosh first...

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [PATCH 4/5] gpio/omap: force restore if context loss is not detectable
@ 2013-04-10 19:39     ` Linus Walleij
  0 siblings, 0 replies; 46+ messages in thread
From: Linus Walleij @ 2013-04-10 19:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Apr 4, 2013 at 10:16 PM, Jon Hunter <jon-hunter@ti.com> wrote:

> When booting with device-tree the function pointer for detecting context
> loss is not populated. Ideally, the pm_runtime framework should be
> enhanced to allow a means for reporting context/state loss and we could
> avoid populating such function pointers altogether. In the interim until
> a generic non-device specific solution is in place, force a restore of
> the gpio bank when enabling the gpio controller.
>
> Adds a new device-tree property for the OMAP GPIO controller to indicate
> if the GPIO controller is located in a power-domain that never loses
> power and hence will always maintain its logic state.
>
> Signed-off-by: Jon Hunter <jon-hunter@ti.com>

In this case it'd be really helpful to get an ACK from somebody else.
I have no clue whether this thing is doing what it should, and if
you were the maintainer I'd apply it but now I'd like to hear from
Kevin or Santosh first...

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 4/5] gpio/omap: force restore if context loss is not detectable
  2013-04-10 19:39     ` Linus Walleij
@ 2013-04-10 19:41         ` Jon Hunter
  -1 siblings, 0 replies; 46+ messages in thread
From: Jon Hunter @ 2013-04-10 19:41 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Kevin Hilman, device-tree, Santosh Shilimkar, linux-omap, linux-arm


On 04/10/2013 02:39 PM, Linus Walleij wrote:
> On Thu, Apr 4, 2013 at 10:16 PM, Jon Hunter <jon-hunter-l0cyMroinI0@public.gmane.org> wrote:
> 
>> When booting with device-tree the function pointer for detecting context
>> loss is not populated. Ideally, the pm_runtime framework should be
>> enhanced to allow a means for reporting context/state loss and we could
>> avoid populating such function pointers altogether. In the interim until
>> a generic non-device specific solution is in place, force a restore of
>> the gpio bank when enabling the gpio controller.
>>
>> Adds a new device-tree property for the OMAP GPIO controller to indicate
>> if the GPIO controller is located in a power-domain that never loses
>> power and hence will always maintain its logic state.
>>
>> Signed-off-by: Jon Hunter <jon-hunter-l0cyMroinI0@public.gmane.org>
> 
> In this case it'd be really helpful to get an ACK from somebody else.
> I have no clue whether this thing is doing what it should, and if
> you were the maintainer I'd apply it but now I'd like to hear from
> Kevin or Santosh first...

Santosh gave the his ACK for 1-4 (see 0/5) and Kevin added his
reviewed-by for 1-4 (again see 0/5).

Cheers
Jon

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [PATCH 4/5] gpio/omap: force restore if context loss is not detectable
@ 2013-04-10 19:41         ` Jon Hunter
  0 siblings, 0 replies; 46+ messages in thread
From: Jon Hunter @ 2013-04-10 19:41 UTC (permalink / raw)
  To: linux-arm-kernel


On 04/10/2013 02:39 PM, Linus Walleij wrote:
> On Thu, Apr 4, 2013 at 10:16 PM, Jon Hunter <jon-hunter@ti.com> wrote:
> 
>> When booting with device-tree the function pointer for detecting context
>> loss is not populated. Ideally, the pm_runtime framework should be
>> enhanced to allow a means for reporting context/state loss and we could
>> avoid populating such function pointers altogether. In the interim until
>> a generic non-device specific solution is in place, force a restore of
>> the gpio bank when enabling the gpio controller.
>>
>> Adds a new device-tree property for the OMAP GPIO controller to indicate
>> if the GPIO controller is located in a power-domain that never loses
>> power and hence will always maintain its logic state.
>>
>> Signed-off-by: Jon Hunter <jon-hunter@ti.com>
> 
> In this case it'd be really helpful to get an ACK from somebody else.
> I have no clue whether this thing is doing what it should, and if
> you were the maintainer I'd apply it but now I'd like to hear from
> Kevin or Santosh first...

Santosh gave the his ACK for 1-4 (see 0/5) and Kevin added his
reviewed-by for 1-4 (again see 0/5).

Cheers
Jon

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 4/5] gpio/omap: force restore if context loss is not detectable
  2013-04-10 19:41         ` Jon Hunter
@ 2013-04-10 19:44           ` Linus Walleij
  -1 siblings, 0 replies; 46+ messages in thread
From: Linus Walleij @ 2013-04-10 19:44 UTC (permalink / raw)
  To: Jon Hunter
  Cc: Grant Likely, Santosh Shilimkar, Kevin Hilman, device-tree,
	linux-omap, linux-arm

On Wed, Apr 10, 2013 at 9:41 PM, Jon Hunter <jon-hunter@ti.com> wrote:
> On 04/10/2013 02:39 PM, Linus Walleij wrote:
>> On Thu, Apr 4, 2013 at 10:16 PM, Jon Hunter <jon-hunter@ti.com> wrote:
>>
>>> When booting with device-tree the function pointer for detecting context
>>> loss is not populated. Ideally, the pm_runtime framework should be
>>> enhanced to allow a means for reporting context/state loss and we could
>>> avoid populating such function pointers altogether. In the interim until
>>> a generic non-device specific solution is in place, force a restore of
>>> the gpio bank when enabling the gpio controller.
>>>
>>> Adds a new device-tree property for the OMAP GPIO controller to indicate
>>> if the GPIO controller is located in a power-domain that never loses
>>> power and hence will always maintain its logic state.
>>>
>>> Signed-off-by: Jon Hunter <jon-hunter@ti.com>
>>
>> In this case it'd be really helpful to get an ACK from somebody else.
>> I have no clue whether this thing is doing what it should, and if
>> you were the maintainer I'd apply it but now I'd like to hear from
>> Kevin or Santosh first...
>
> Santosh gave the his ACK for 1-4 (see 0/5) and Kevin added his
> reviewed-by for 1-4 (again see 0/5).

OK all in patch 0 how confusing #-)

All patches applied with Kevin's and Santosh's tags!

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [PATCH 4/5] gpio/omap: force restore if context loss is not detectable
@ 2013-04-10 19:44           ` Linus Walleij
  0 siblings, 0 replies; 46+ messages in thread
From: Linus Walleij @ 2013-04-10 19:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Apr 10, 2013 at 9:41 PM, Jon Hunter <jon-hunter@ti.com> wrote:
> On 04/10/2013 02:39 PM, Linus Walleij wrote:
>> On Thu, Apr 4, 2013 at 10:16 PM, Jon Hunter <jon-hunter@ti.com> wrote:
>>
>>> When booting with device-tree the function pointer for detecting context
>>> loss is not populated. Ideally, the pm_runtime framework should be
>>> enhanced to allow a means for reporting context/state loss and we could
>>> avoid populating such function pointers altogether. In the interim until
>>> a generic non-device specific solution is in place, force a restore of
>>> the gpio bank when enabling the gpio controller.
>>>
>>> Adds a new device-tree property for the OMAP GPIO controller to indicate
>>> if the GPIO controller is located in a power-domain that never loses
>>> power and hence will always maintain its logic state.
>>>
>>> Signed-off-by: Jon Hunter <jon-hunter@ti.com>
>>
>> In this case it'd be really helpful to get an ACK from somebody else.
>> I have no clue whether this thing is doing what it should, and if
>> you were the maintainer I'd apply it but now I'd like to hear from
>> Kevin or Santosh first...
>
> Santosh gave the his ACK for 1-4 (see 0/5) and Kevin added his
> reviewed-by for 1-4 (again see 0/5).

OK all in patch 0 how confusing #-)

All patches applied with Kevin's and Santosh's tags!

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 1/5] gpio/omap: free irq domain in probe() failure paths
  2013-04-10 19:33     ` Linus Walleij
@ 2013-04-10 19:48       ` Jon Hunter
  -1 siblings, 0 replies; 46+ messages in thread
From: Jon Hunter @ 2013-04-10 19:48 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Grant Likely, Santosh Shilimkar, Kevin Hilman, device-tree,
	linux-omap, linux-arm


On 04/10/2013 02:33 PM, Linus Walleij wrote:
> On Thu, Apr 4, 2013 at 10:16 PM, Jon Hunter <jon-hunter@ti.com> wrote:
> 
>> Currently the IRQ domain is not freed once allocated, in the case where
>> omap_gpio_probe() fails. Therefore, ensure we free the domain if the
>> probe does fail. Furthermore, the local variable "ret" is not needed
>> and so remove this.
>>
>> Signed-off-by: Jon Hunter <jon-hunter@ti.com>
> 
> Hm Kevin is still listed as maintainer on this driver but on a mail
> address that bounces, can you send a patch replacing him in MAINTAINERS
> with yourself if you're willing to pick it up?
> 
> Anyway, patch applied.

Thanks. There is a patch to fix this queued for v3.10 [1].

Cheers
Jon

[1]
http://git.kernel.org/cgit/linux/kernel/git/arm/arm-soc.git/commit/MAINTAINERS?h=for-next&id=c69d72aec52eb5234f433259ac5dcc3b68f1480d

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [PATCH 1/5] gpio/omap: free irq domain in probe() failure paths
@ 2013-04-10 19:48       ` Jon Hunter
  0 siblings, 0 replies; 46+ messages in thread
From: Jon Hunter @ 2013-04-10 19:48 UTC (permalink / raw)
  To: linux-arm-kernel


On 04/10/2013 02:33 PM, Linus Walleij wrote:
> On Thu, Apr 4, 2013 at 10:16 PM, Jon Hunter <jon-hunter@ti.com> wrote:
> 
>> Currently the IRQ domain is not freed once allocated, in the case where
>> omap_gpio_probe() fails. Therefore, ensure we free the domain if the
>> probe does fail. Furthermore, the local variable "ret" is not needed
>> and so remove this.
>>
>> Signed-off-by: Jon Hunter <jon-hunter@ti.com>
> 
> Hm Kevin is still listed as maintainer on this driver but on a mail
> address that bounces, can you send a patch replacing him in MAINTAINERS
> with yourself if you're willing to pick it up?
> 
> Anyway, patch applied.

Thanks. There is a patch to fix this queued for v3.10 [1].

Cheers
Jon

[1]
http://git.kernel.org/cgit/linux/kernel/git/arm/arm-soc.git/commit/MAINTAINERS?h=for-next&id=c69d72aec52eb5234f433259ac5dcc3b68f1480d

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 4/5] gpio/omap: force restore if context loss is not detectable
  2013-04-10 19:44           ` Linus Walleij
@ 2013-04-10 19:50             ` Jon Hunter
  -1 siblings, 0 replies; 46+ messages in thread
From: Jon Hunter @ 2013-04-10 19:50 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Grant Likely, Santosh Shilimkar, Kevin Hilman, device-tree,
	linux-omap, linux-arm


On 04/10/2013 02:44 PM, Linus Walleij wrote:
> On Wed, Apr 10, 2013 at 9:41 PM, Jon Hunter <jon-hunter@ti.com> wrote:
>> On 04/10/2013 02:39 PM, Linus Walleij wrote:
>>> On Thu, Apr 4, 2013 at 10:16 PM, Jon Hunter <jon-hunter@ti.com> wrote:
>>>
>>>> When booting with device-tree the function pointer for detecting context
>>>> loss is not populated. Ideally, the pm_runtime framework should be
>>>> enhanced to allow a means for reporting context/state loss and we could
>>>> avoid populating such function pointers altogether. In the interim until
>>>> a generic non-device specific solution is in place, force a restore of
>>>> the gpio bank when enabling the gpio controller.
>>>>
>>>> Adds a new device-tree property for the OMAP GPIO controller to indicate
>>>> if the GPIO controller is located in a power-domain that never loses
>>>> power and hence will always maintain its logic state.
>>>>
>>>> Signed-off-by: Jon Hunter <jon-hunter@ti.com>
>>>
>>> In this case it'd be really helpful to get an ACK from somebody else.
>>> I have no clue whether this thing is doing what it should, and if
>>> you were the maintainer I'd apply it but now I'd like to hear from
>>> Kevin or Santosh first...
>>
>> Santosh gave the his ACK for 1-4 (see 0/5) and Kevin added his
>> reviewed-by for 1-4 (again see 0/5).
> 
> OK all in patch 0 how confusing #-)
> 
> All patches applied with Kevin's and Santosh's tags!

Thanks. Sorry for the confusion!

By the way, I am hoping you only took 1-4, per the cover-letter I was
planning to have Benoit take 5 through his DT branch as there could be
conflicts if you merge this with Benoit's branch. Again sorry if this is
even more confusing ;-)

Cheers
Jon

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [PATCH 4/5] gpio/omap: force restore if context loss is not detectable
@ 2013-04-10 19:50             ` Jon Hunter
  0 siblings, 0 replies; 46+ messages in thread
From: Jon Hunter @ 2013-04-10 19:50 UTC (permalink / raw)
  To: linux-arm-kernel


On 04/10/2013 02:44 PM, Linus Walleij wrote:
> On Wed, Apr 10, 2013 at 9:41 PM, Jon Hunter <jon-hunter@ti.com> wrote:
>> On 04/10/2013 02:39 PM, Linus Walleij wrote:
>>> On Thu, Apr 4, 2013 at 10:16 PM, Jon Hunter <jon-hunter@ti.com> wrote:
>>>
>>>> When booting with device-tree the function pointer for detecting context
>>>> loss is not populated. Ideally, the pm_runtime framework should be
>>>> enhanced to allow a means for reporting context/state loss and we could
>>>> avoid populating such function pointers altogether. In the interim until
>>>> a generic non-device specific solution is in place, force a restore of
>>>> the gpio bank when enabling the gpio controller.
>>>>
>>>> Adds a new device-tree property for the OMAP GPIO controller to indicate
>>>> if the GPIO controller is located in a power-domain that never loses
>>>> power and hence will always maintain its logic state.
>>>>
>>>> Signed-off-by: Jon Hunter <jon-hunter@ti.com>
>>>
>>> In this case it'd be really helpful to get an ACK from somebody else.
>>> I have no clue whether this thing is doing what it should, and if
>>> you were the maintainer I'd apply it but now I'd like to hear from
>>> Kevin or Santosh first...
>>
>> Santosh gave the his ACK for 1-4 (see 0/5) and Kevin added his
>> reviewed-by for 1-4 (again see 0/5).
> 
> OK all in patch 0 how confusing #-)
> 
> All patches applied with Kevin's and Santosh's tags!

Thanks. Sorry for the confusion!

By the way, I am hoping you only took 1-4, per the cover-letter I was
planning to have Benoit take 5 through his DT branch as there could be
conflicts if you merge this with Benoit's branch. Again sorry if this is
even more confusing ;-)

Cheers
Jon

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 4/5] gpio/omap: force restore if context loss is not detectable
  2013-04-10 19:50             ` Jon Hunter
@ 2013-04-10 20:47               ` Linus Walleij
  -1 siblings, 0 replies; 46+ messages in thread
From: Linus Walleij @ 2013-04-10 20:47 UTC (permalink / raw)
  To: Jon Hunter
  Cc: Grant Likely, Santosh Shilimkar, Kevin Hilman, device-tree,
	linux-omap, linux-arm

On Wed, Apr 10, 2013 at 9:50 PM, Jon Hunter <jon-hunter@ti.com> wrote:
> On 04/10/2013 02:44 PM, Linus Walleij wrote:

>> All patches applied with Kevin's and Santosh's tags!
>
> Thanks. Sorry for the confusion!
>
> By the way, I am hoping you only took 1-4,

Yeah I only took 1-4, no problem...

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [PATCH 4/5] gpio/omap: force restore if context loss is not detectable
@ 2013-04-10 20:47               ` Linus Walleij
  0 siblings, 0 replies; 46+ messages in thread
From: Linus Walleij @ 2013-04-10 20:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Apr 10, 2013 at 9:50 PM, Jon Hunter <jon-hunter@ti.com> wrote:
> On 04/10/2013 02:44 PM, Linus Walleij wrote:

>> All patches applied with Kevin's and Santosh's tags!
>
> Thanks. Sorry for the confusion!
>
> By the way, I am hoping you only took 1-4,

Yeah I only took 1-4, no problem...

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 1/5] gpio/omap: free irq domain in probe() failure paths
  2013-04-10 19:48       ` Jon Hunter
@ 2013-04-15 22:06         ` Kevin Hilman
  -1 siblings, 0 replies; 46+ messages in thread
From: Kevin Hilman @ 2013-04-15 22:06 UTC (permalink / raw)
  To: Jon Hunter
  Cc: Linus Walleij, Grant Likely, Santosh Shilimkar, device-tree,
	linux-omap, linux-arm

Jon Hunter <jon-hunter@ti.com> writes:

> On 04/10/2013 02:33 PM, Linus Walleij wrote:
>> On Thu, Apr 4, 2013 at 10:16 PM, Jon Hunter <jon-hunter@ti.com> wrote:
>> 
>>> Currently the IRQ domain is not freed once allocated, in the case where
>>> omap_gpio_probe() fails. Therefore, ensure we free the domain if the
>>> probe does fail. Furthermore, the local variable "ret" is not needed
>>> and so remove this.
>>>
>>> Signed-off-by: Jon Hunter <jon-hunter@ti.com>
>> 
>> Hm Kevin is still listed as maintainer on this driver but on a mail
>> address that bounces, can you send a patch replacing him in MAINTAINERS
>> with yourself if you're willing to pick it up?
>> 
>> Anyway, patch applied.
>
> Thanks. There is a patch to fix this queued for v3.10 [1].

Yeah, but you've already been doing the heavly lifting here and should
be the maintainer going forward, IMO.  Patch below.

Linus, do you want to queue this up?

Kevin

>From 00d19c10c02c3a3aa99ca7ae75bc88a932437abd Mon Sep 17 00:00:00 2001
From: Kevin Hilman <khilman@linaro.org>
Date: Mon, 15 Apr 2013 15:02:26 -0700
Subject: [PATCH] MAINTAINERS: update OMAP GPIO driver: Jon Hunter taking over

Jon has already been doing most of maintenance of this driver, so
make it official.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
---
Applies on v3.9-rc7

 MAINTAINERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 8bdd7a7..a18cacb 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5789,7 +5789,7 @@ F:	arch/arm/*omap*/usb*
 
 OMAP GPIO DRIVER
 M:	Santosh Shilimkar <santosh.shilimkar@ti.com>
-M:	Kevin Hilman <khilman@deeprootsystems.com>
+M:	Jon Hunter <jon-hunter@ti.com>
 L:	linux-omap@vger.kernel.org
 S:	Maintained
 F:	drivers/gpio/gpio-omap.c
-- 
1.8.2


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 1/5] gpio/omap: free irq domain in probe() failure paths
@ 2013-04-15 22:06         ` Kevin Hilman
  0 siblings, 0 replies; 46+ messages in thread
From: Kevin Hilman @ 2013-04-15 22:06 UTC (permalink / raw)
  To: linux-arm-kernel

Jon Hunter <jon-hunter@ti.com> writes:

> On 04/10/2013 02:33 PM, Linus Walleij wrote:
>> On Thu, Apr 4, 2013 at 10:16 PM, Jon Hunter <jon-hunter@ti.com> wrote:
>> 
>>> Currently the IRQ domain is not freed once allocated, in the case where
>>> omap_gpio_probe() fails. Therefore, ensure we free the domain if the
>>> probe does fail. Furthermore, the local variable "ret" is not needed
>>> and so remove this.
>>>
>>> Signed-off-by: Jon Hunter <jon-hunter@ti.com>
>> 
>> Hm Kevin is still listed as maintainer on this driver but on a mail
>> address that bounces, can you send a patch replacing him in MAINTAINERS
>> with yourself if you're willing to pick it up?
>> 
>> Anyway, patch applied.
>
> Thanks. There is a patch to fix this queued for v3.10 [1].

Yeah, but you've already been doing the heavly lifting here and should
be the maintainer going forward, IMO.  Patch below.

Linus, do you want to queue this up?

Kevin

>From 00d19c10c02c3a3aa99ca7ae75bc88a932437abd Mon Sep 17 00:00:00 2001
From: Kevin Hilman <khilman@linaro.org>
Date: Mon, 15 Apr 2013 15:02:26 -0700
Subject: [PATCH] MAINTAINERS: update OMAP GPIO driver: Jon Hunter taking over

Jon has already been doing most of maintenance of this driver, so
make it official.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
---
Applies on v3.9-rc7

 MAINTAINERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 8bdd7a7..a18cacb 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5789,7 +5789,7 @@ F:	arch/arm/*omap*/usb*
 
 OMAP GPIO DRIVER
 M:	Santosh Shilimkar <santosh.shilimkar@ti.com>
-M:	Kevin Hilman <khilman@deeprootsystems.com>
+M:	Jon Hunter <jon-hunter@ti.com>
 L:	linux-omap at vger.kernel.org
 S:	Maintained
 F:	drivers/gpio/gpio-omap.c
-- 
1.8.2

^ permalink raw reply related	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2013-04-15 22:06 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-04 20:16 [PATCH 0/5] gpio/omap: 2nd batch of updates for v3.10 Jon Hunter
2013-04-04 20:16 ` Jon Hunter
2013-04-04 20:16 ` [PATCH 1/5] gpio/omap: free irq domain in probe() failure paths Jon Hunter
2013-04-04 20:16   ` Jon Hunter
2013-04-10 19:33   ` Linus Walleij
2013-04-10 19:33     ` Linus Walleij
2013-04-10 19:48     ` Jon Hunter
2013-04-10 19:48       ` Jon Hunter
2013-04-15 22:06       ` Kevin Hilman
2013-04-15 22:06         ` Kevin Hilman
2013-04-04 20:16 ` [PATCH 2/5] gpio/omap: remove extra context restores in *_runtime_resume() Jon Hunter
2013-04-04 20:16   ` Jon Hunter
2013-04-10 19:34   ` Linus Walleij
2013-04-10 19:34     ` Linus Walleij
2013-04-04 20:16 ` [PATCH 3/5] gpio/omap: optimise interrupt service routine Jon Hunter
2013-04-04 20:16   ` Jon Hunter
2013-04-05  9:19   ` Felipe Balbi
2013-04-05  9:19     ` Felipe Balbi
2013-04-10 19:37   ` Linus Walleij
2013-04-10 19:37     ` Linus Walleij
2013-04-04 20:16 ` [PATCH 4/5] gpio/omap: force restore if context loss is not detectable Jon Hunter
2013-04-04 20:16   ` Jon Hunter
2013-04-10 19:39   ` Linus Walleij
2013-04-10 19:39     ` Linus Walleij
     [not found]     ` <CACRpkdbeABuFXr0Gt6gRto3Pmo0m88AFn_xKJq14VonGg7Doww-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-04-10 19:41       ` Jon Hunter
2013-04-10 19:41         ` Jon Hunter
2013-04-10 19:44         ` Linus Walleij
2013-04-10 19:44           ` Linus Walleij
2013-04-10 19:50           ` Jon Hunter
2013-04-10 19:50             ` Jon Hunter
2013-04-10 20:47             ` Linus Walleij
2013-04-10 20:47               ` Linus Walleij
2013-04-04 20:16 ` [PATCH 5/5] ARM: dts: OMAP2+: Identify GPIO banks that are always powered Jon Hunter
2013-04-04 20:16   ` Jon Hunter
2013-04-04 20:35   ` Tony Lindgren
2013-04-04 20:35     ` Tony Lindgren
2013-04-04 21:01     ` Jon Hunter
2013-04-04 21:01       ` Jon Hunter
2013-04-04 21:08       ` Tony Lindgren
2013-04-04 21:08         ` Tony Lindgren
2013-04-05  6:35 ` [PATCH 0/5] gpio/omap: 2nd batch of updates for v3.10 Santosh Shilimkar
2013-04-05  6:35   ` Santosh Shilimkar
2013-04-05 12:18   ` Jon Hunter
2013-04-05 12:18     ` Jon Hunter
2013-04-05 17:56 ` Kevin Hilman
2013-04-05 17:56   ` Kevin Hilman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.