* [PATCH] irqchip: irqc: Add runtime PM support
@ 2013-04-04 6:21 Simon Horman
2013-04-05 2:26 ` Simon Horman
0 siblings, 1 reply; 6+ messages in thread
From: Simon Horman @ 2013-04-04 6:21 UTC (permalink / raw)
To: linux-arm-kernel
This was tested using the SMSC LAN on the APE6EVM board.
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
drivers/irqchip/irq-renesas-irqc.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/irqchip/irq-renesas-irqc.c b/drivers/irqchip/irq-renesas-irqc.c
index 927bff3..649cd69 100644
--- a/drivers/irqchip/irq-renesas-irqc.c
+++ b/drivers/irqchip/irq-renesas-irqc.c
@@ -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;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] irqchip: irqc: Add runtime PM support
2013-04-04 6:21 [PATCH] irqchip: irqc: Add runtime PM support Simon Horman
@ 2013-04-05 2:26 ` Simon Horman
2013-04-05 4:12 ` Kuninori Morimoto
2013-04-08 0:55 ` Magnus Damm
0 siblings, 2 replies; 6+ messages in thread
From: Simon Horman @ 2013-04-05 2:26 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Apr 04, 2013 at 03:21:06PM +0900, Simon Horman wrote:
> This was tested using the SMSC LAN on the APE6EVM board.
>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Magnus, Morimoto-san, could you review this?
> ---
> drivers/irqchip/irq-renesas-irqc.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/irqchip/irq-renesas-irqc.c b/drivers/irqchip/irq-renesas-irqc.c
> index 927bff3..649cd69 100644
> --- a/drivers/irqchip/irq-renesas-irqc.c
> +++ b/drivers/irqchip/irq-renesas-irqc.c
> @@ -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;
> }
> --
> 1.7.10.4
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] irqchip: irqc: Add runtime PM support
2013-04-05 2:26 ` Simon Horman
@ 2013-04-05 4:12 ` Kuninori Morimoto
2013-04-05 7:40 ` Simon Horman
2013-04-08 0:55 ` Magnus Damm
1 sibling, 1 reply; 6+ messages in thread
From: Kuninori Morimoto @ 2013-04-05 4:12 UTC (permalink / raw)
To: linux-arm-kernel
Hi
> On Thu, Apr 04, 2013 at 03:21:06PM +0900, Simon Horman wrote:
> > This was tested using the SMSC LAN on the APE6EVM board.
> >
> > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
>
> Magnus, Morimoto-san, could you review this?
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> > ---
> > drivers/irqchip/irq-renesas-irqc.c | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > diff --git a/drivers/irqchip/irq-renesas-irqc.c b/drivers/irqchip/irq-renesas-irqc.c
> > index 927bff3..649cd69 100644
> > --- a/drivers/irqchip/irq-renesas-irqc.c
> > +++ b/drivers/irqchip/irq-renesas-irqc.c
> > @@ -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;
> > }
> > --
> > 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] irqchip: irqc: Add runtime PM support
2013-04-05 4:12 ` Kuninori Morimoto
@ 2013-04-05 7:40 ` Simon Horman
0 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2013-04-05 7:40 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Apr 04, 2013 at 09:12:49PM -0700, Kuninori Morimoto wrote:
>
> Hi
>
> > On Thu, Apr 04, 2013 at 03:21:06PM +0900, Simon Horman wrote:
> > > This was tested using the SMSC LAN on the APE6EVM board.
> > >
> > > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> >
> > Magnus, Morimoto-san, could you review this?
>
> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thanks, I have queued this up in the intc-external-irq branch.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] irqchip: irqc: Add runtime PM support
2013-04-05 2:26 ` Simon Horman
2013-04-05 4:12 ` Kuninori Morimoto
@ 2013-04-08 0:55 ` Magnus Damm
2013-04-08 1:26 ` Simon Horman
1 sibling, 1 reply; 6+ messages in thread
From: Magnus Damm @ 2013-04-08 0:55 UTC (permalink / raw)
To: linux-arm-kernel
Hi Simon,
On Fri, Apr 5, 2013 at 11:26 AM, Simon Horman <horms@verge.net.au> wrote:
> On Thu, Apr 04, 2013 at 03:21:06PM +0900, Simon Horman wrote:
>> This was tested using the SMSC LAN on the APE6EVM board.
>>
>> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
>
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] irqchip: irqc: Add runtime PM support
2013-04-08 0:55 ` Magnus Damm
@ 2013-04-08 1:26 ` Simon Horman
0 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2013-04-08 1:26 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Apr 08, 2013 at 09:55:38AM +0900, Magnus Damm wrote:
> Hi Simon,
>
> On Fri, Apr 5, 2013 at 11:26 AM, Simon Horman <horms@verge.net.au> wrote:
> > On Thu, Apr 04, 2013 at 03:21:06PM +0900, Simon Horman wrote:
> >> This was tested using the SMSC LAN on the APE6EVM board.
> >>
> >> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> >
> > 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.
I'm unsure which code you are referring to.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-04-08 1:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-04 6:21 [PATCH] irqchip: irqc: Add runtime PM support Simon Horman
2013-04-05 2:26 ` Simon Horman
2013-04-05 4:12 ` Kuninori Morimoto
2013-04-05 7:40 ` Simon Horman
2013-04-08 0:55 ` Magnus Damm
2013-04-08 1:26 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox