irqchip: irqc: Add runtime PM support
Subsystems (2)
PATCH 1/1 irqchip: irqc: Add runtime PM support
This was tested using the SMSC LAN on the APE6EVM board.
--- drivers/irqchip/irq-renesas-irqc.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/irqchip/irq-renesas-irqc.c +8 -0
@@ -19,6 +19,7 @@#include <linux/init.h> #include <linux/platform_device.h> +#include <linux/pm_runtime.h> #include <linux/spinlock.h> #include <linux/interrupt.h> #include <linux/ioport.h>
@@ -181,6 +182,9 @@ static int irqc_probe(struct platform_device *pdev) goto err1; } +pm_runtime_enable (&pdev->dev); +pm_runtime_get_sync (&pdev->dev); +/* allow any number of IRQs between 1 and IRQC_IRQ_MAX */ for (k =0 ; k <IRQC_IRQ_MAX ; k++) { irq =platform_get_resource (pdev,IORESOURCE_IRQ , k);
@@ -255,6 +259,8 @@ err3: err2:iounmap (p->iomem); err1: +pm_runtime_put_sync (&pdev->dev); +pm_runtime_disable (&pdev->dev);kfree (p); err0:return ret;
@@ -270,6 +276,8 @@ static int irqc_remove(struct platform_device *pdev)irq_domain_remove (p->irq_domain);iounmap (p->iomem); +pm_runtime_put_sync (&pdev->dev); +pm_runtime_disable (&pdev->dev);kfree (p);return 0 ; }
Signature · 1 line
1.7.10.4
PATCH 1/1 irqchip: irqc: Add runtime PM support
Quoted 3 lines · Simon Horman
This was tested using the SMSC LAN on the APE6EVM board.
Signed-off-by Simon Horman <[email protected]>
Magnus, Morimoto-san, could you review this?
Quoted 47 lines
--- drivers/irqchip/irq-renesas-irqc.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/irqchip/irq-renesas-irqc.c +8
-0@@ -19,6 +19,7 @@#include <linux/init.h> #include <linux/platform_device.h> +#include <linux/pm_runtime.h> #include <linux/spinlock.h> #include <linux/interrupt.h> #include <linux/ioport.h> @@ -181,6 +182,9 @@ static int irqc_probe(struct platform_device *pdev) goto err1; } +pm_runtime_enable (&pdev->dev); +pm_runtime_get_sync (&pdev->dev); +/* allow any number of IRQs between 1 and IRQC_IRQ_MAX */ for (k =0 ; k <IRQC_IRQ_MAX ; k++) { irq =platform_get_resource (pdev,IORESOURCE_IRQ , k);@@ -255,6 +259,8 @@ err3: err2:iounmap (p->iomem); err1: +pm_runtime_put_sync (&pdev->dev); +pm_runtime_disable (&pdev->dev);kfree (p); err0:return ret;@@ -270,6 +276,8 @@ static int irqc_remove(struct platform_device *pdev)irq_domain_remove (p->irq_domain);iounmap (p->iomem); +pm_runtime_put_sync (&pdev->dev); +pm_runtime_disable (&pdev->dev);kfree (p);return 0 ; }Signature · 1 line
1.7.10.4
PATCH 1/1 irqchip: irqc: Add runtime PM support
Hi
Quoted 6 lines · Simon Horman
Quoted 3 lines
This was tested using the SMSC LAN on the APE6EVM board.
Signed-off-by Simon Horman <[email protected]>Magnus, Morimoto-san, could you review this?
Quoted 38 lines
Quoted 38 lines
--- drivers/irqchip/irq-renesas-irqc.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/irqchip/irq-renesas-irqc.c +6
-0@@ -19,6 +19,7 @@#include <linux/init.h> #include <linux/platform_device.h> +#include <linux/pm_runtime.h> #include <linux/spinlock.h> #include <linux/interrupt.h> #include <linux/ioport.h> @@ -181,6 +182,9 @@ static int irqc_probe(struct platform_device *pdev) goto err1; } +pm_runtime_enable (&pdev->dev); +pm_runtime_get_sync (&pdev->dev); +/* allow any number of IRQs between 1 and IRQC_IRQ_MAX */ for (k =0 ; k <IRQC_IRQ_MAX ; k++) { irq =platform_get_resource (pdev,IORESOURCE_IRQ , k);@@ -255,6 +259,8 @@ err3: err2:iounmap (p->iomem); err1: +pm_runtime_put_sync (&pdev->dev); +pm_runtime_disable (&pdev->dev);kfree (p); err0:return ret;@@ -270,6 +276,8 @@ static int irqc_remove(struct platform_device *pdev)
Quoted 14 lines
Quoted 10 lines
drivers/irqchip/irq-renesas-irqc.c +2
-0irq_domain_remove (p->irq_domain);iounmap (p->iomem); +pm_runtime_put_sync (&pdev->dev); +pm_runtime_disable (&pdev->dev);kfree (p);return 0 ; }Signature · 1 line
1.7.10.4--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Best regards
---
Kuninori Morimoto
PATCH 1/1 irqchip: irqc: Add runtime PM support
Quoted 11 lines · Kuninori Morimoto
Hi
Quoted 6 lines · Simon Horman
Quoted 3 lines
This was tested using the SMSC LAN on the APE6EVM board.
Signed-off-by Simon Horman <[email protected]>Magnus, Morimoto-san, could you review this?
Thanks, I have queued this up in the intc-external-irq branch.
PATCH 1/1 irqchip: irqc: Add runtime PM support
In reply to Simon HormanHi Simon,
Quoted 6 lines · Simon Horman
Quoted 3 lines · Simon Horman
This was tested using the SMSC LAN on the APE6EVM board.
Signed-off-by Simon Horman <[email protected]>Magnus, Morimoto-san, could you review this?
Thanks for working on Runtime PM for the IRQC driver, this code looks fine to me. In the future we probably want to try control the usage count based on enable()/disable() callbacks in a more fine grained fashion, but I wonder how much that would actually help us since I don't think we can turn off the power domain where IRQC is located anyway.
Simon, please remember to also merge your code for IRQC MSTP bit control on r8a73a4 and/or r8a7790. Without that I can't really see how Runtime PM can control any actual hardware.
Thanks,
/ magnus
PATCH 1/1 irqchip: irqc: Add runtime PM support
Quoted 17 lines · Magnus Damm
Hi Simon,
Quoted 6 lines · Simon Horman
Quoted 3 lines · Simon Horman
This was tested using the SMSC LAN on the APE6EVM board.
Signed-off-by Simon Horman <[email protected]>Magnus, Morimoto-san, could you review this?
Thanks for working on Runtime PM for the IRQC driver, this code looks fine to me. In the future we probably want to try control the usage count based on enable()/disable() callbacks in a more fine grained fashion, but I wonder how much that would actually help us since I don't think we can turn off the power domain where IRQC is located anyway.
Quoted 3 lines
Simon, please remember to also merge your code for IRQC MSTP bit control on r8a73a4 and/or r8a7790. Without that I can't really see how Runtime PM can control any actual hardware.
I'm unsure which code you are referring to.