From: horms@verge.net.au (Simon Horman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] irqchip: irqc: Add runtime PM support
Date: Fri, 5 Apr 2013 11:26:23 +0900 [thread overview]
Message-ID: <20130405022623.GD29203@verge.net.au> (raw)
In-Reply-To: <1365056466-23710-1-git-send-email-horms+renesas@verge.net.au>
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
>
next prev parent reply other threads:[~2013-04-05 2:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-04 6:21 [PATCH] irqchip: irqc: Add runtime PM support Simon Horman
2013-04-05 2:26 ` Simon Horman [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130405022623.GD29203@verge.net.au \
--to=horms@verge.net.au \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox