Skip to contentSkip to conversation

irqchip: renesas-irqc: Lazy disable and mask-on-suspend

PATCH In review Magnus Damm 3 participants 6 messages Dec 4, 2013 – Jan 22, 2014

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

cover irqchip: renesas-irqc: Lazy disable and mask-on-suspend

irqchip: renesas-irqc: Lazy disable and mask-on-suspend

[PATCH 01/02] irqchip: renesas-irqc: Use lazy disable [PATCH 02/02] irqchip: renesas-irqc: Enable mask on suspend

Update the IRQC driver to use lazy disable and mask on suspend. This fixes the Suspend-to-RAM behavior to make sure wakeup sources are left enabled while suspending.

---

Written against renesas.git tag renesas-devel-v3.13-rc2-20131202

 drivers/irqchip/irq-renesas-irqc.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
#1 lore raw

PATCH 1/2 irqchip: renesas-irqc: Use lazy disable

From: Magnus Damm <[email protected]>

Set the ->irq_enable() and ->irq_disable() methods to NULL to enable lazy disable of interrupts. This by itself provides some level of optimization, but is mainly enabled as ground work for future Suspend-to-RAM wake up support.

---

 drivers/irqchip/irq-renesas-irqc.c |    2 --
 1 file changed, 2 deletions(-)
drivers/irqchip/irq-renesas-irqc.c +0 -2
@@ -212,8 +212,6 @@ static int irqc_probe(struct platform_de
 	irq_chip->name = name;
 	irq_chip->irq_mask = irqc_irq_disable;
 	irq_chip->irq_unmask = irqc_irq_enable;
-	irq_chip->irq_enable = irqc_irq_enable;
-	irq_chip->irq_disable = irqc_irq_disable;
 	irq_chip->irq_set_type = irqc_irq_set_type;
 	irq_chip->flags	= IRQCHIP_SKIP_SET_WAKE;
 
#3 lore raw

PATCH 2/2 irqchip: renesas-irqc: Enable mask on suspend

In reply to Magnus Damm

From: Magnus Damm <[email protected]>

Now when lazy interrupt disable has been enabled in the driver then extend the code to set IRQCHIP_MASK_ON_SUSPEND which tells the core that only IRQs marked as wakeups need to stay enabled during Suspend-to-RAM.

---

 drivers/irqchip/irq-renesas-irqc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-renesas-irqc.c +1 -1
@@ -213,7 +213,7 @@ static int irqc_probe(struct platform_de
 	irq_chip->irq_mask = irqc_irq_disable;
 	irq_chip->irq_unmask = irqc_irq_enable;
 	irq_chip->irq_set_type = irqc_irq_set_type;
-	irq_chip->flags	= IRQCHIP_SKIP_SET_WAKE;
+	irq_chip->flags	= IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MASK_ON_SUSPEND;
 
 	p->irq_domain = irq_domain_add_simple(pdev->dev.of_node,
 					      p->number_of_irqs,
#5 lore raw
In reply to Magnus Damm
Quoted 8 lines · Magnus Damm

irqchip: renesas-irqc: Lazy disable and mask-on-suspend

[PATCH 01/02] irqchip: renesas-irqc: Use lazy disable [PATCH 02/02] irqchip: renesas-irqc: Enable mask on suspend

Update the IRQC driver to use lazy disable and mask on suspend. This fixes the Suspend-to-RAM behavior to make sure wakeup sources are left enabled while suspending.

Thanks, I will queue these up.

#4 lore raw

[tip:irq/core] irqchip: renesas-irqc: Enable mask on suspend

In reply to Magnus Damm
irqchip: renesas-irqc: Enable mask on suspend
Commit-ID:  43881ec7a88a3d3b2fd6da58168173e135b41fba
Gitweb:     http://git.kernel.org/tip/43881ec7a88a3d3b2fd6da58168173e135b41fba
Author:     Magnus Damm <[email protected]>
AuthorDate: Wed, 4 Dec 2013 21:05:56 +0900
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Wed, 22 Jan 2014 21:48:55 +0100

irqchip: renesas-irqc: Enable mask on suspend

Now when lazy interrupt disable has been enabled in the driver then extend the code to set IRQCHIP_MASK_ON_SUSPEND which tells the core that only IRQs marked as wakeups need to stay enabled during Suspend-to-RAM.

---
 drivers/irqchip/irq-renesas-irqc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-renesas-irqc.c +1 -1
index 8fdd7d6..082d95c 100644
@@ -213,7 +213,7 @@ static int irqc_probe(struct platform_device *pdev)
 	irq_chip->irq_mask = irqc_irq_disable;
 	irq_chip->irq_unmask = irqc_irq_enable;
 	irq_chip->irq_set_type = irqc_irq_set_type;
-	irq_chip->flags	= IRQCHIP_SKIP_SET_WAKE;
+	irq_chip->flags	= IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MASK_ON_SUSPEND;
 
 	p->irq_domain = irq_domain_add_simple(pdev->dev.of_node,
 					      p->number_of_irqs,
#2 lore raw

[tip:irq/core] irqchip: renesas-irqc: Use lazy disable

In reply to Magnus Damm
irqchip: renesas-irqc: Use lazy disable
Commit-ID:  3aba55605326be6d7e624090858aa921ab519cda
Gitweb:     http://git.kernel.org/tip/3aba55605326be6d7e624090858aa921ab519cda
Author:     Magnus Damm <[email protected]>
AuthorDate: Wed, 4 Dec 2013 21:05:46 +0900
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Wed, 22 Jan 2014 21:48:55 +0100

irqchip: renesas-irqc: Use lazy disable

Set the ->irq_enable() and ->irq_disable() methods to NULL to enable lazy disable of interrupts. This by itself provides some level of optimization, but is mainly enabled as ground work for future Suspend-to-RAM wake up support.

---
 drivers/irqchip/irq-renesas-irqc.c | 2 --
 1 file changed, 2 deletions(-)
drivers/irqchip/irq-renesas-irqc.c +0 -2
index 2f404ba..8fdd7d6 100644
@@ -212,8 +212,6 @@ static int irqc_probe(struct platform_device *pdev)
 	irq_chip->name = name;
 	irq_chip->irq_mask = irqc_irq_disable;
 	irq_chip->irq_unmask = irqc_irq_enable;
-	irq_chip->irq_enable = irqc_irq_enable;
-	irq_chip->irq_disable = irqc_irq_disable;
 	irq_chip->irq_set_type = irqc_irq_set_type;
 	irq_chip->flags	= IRQCHIP_SKIP_SET_WAKE;