From: Magnus Damm <magnus.damm@gmail.com>
To: linux-sh@vger.kernel.org
Cc: jason@lakedaemon.net, geert+renesas@glider.be,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
horms@verge.net.au, Magnus Damm <magnus.damm@gmail.com>,
tglx@linutronix.de
Subject: [PATCH/RFC 00/03] irqchip: renesas-irqc: Fine grained Runtime PM support
Date: Wed, 22 Apr 2015 00:01:15 +0900 [thread overview]
Message-ID: <20150421150115.14288.88519.sendpatchset@little-apple> (raw)
irqchip: renesas-irqc: Fine grained Runtime PM support
[PATCH/RFC 01/03] irqchip: renesas-irqc: Add irq_enable() and irq_disable()
[PATCH/RFC 02/03] irqchip: renesas-irqc: Add fine grained Runtime PM code
[PATCH/RFC 03/03] irqchip: renesas-irqc: Rely on Runtime PM for wakeup
These patches attempt to convert the IRQC driver from using a mix of clock
framework and Runtime PM into only using Runtime PM and doing that in a
more fine grained way than before. With these patches in place, if there
is no interrupt used then the clock and/or power domain will not be used.
Basic operation is that With these patches applied ->irq_enable() will
perform Runtime PM 'get sync' and ->irq_disable() simply performs
Runtime PM 'put'. The trigger mode callback is assumed to happen at any
time so there is a get/put wrapper there.
Unless I'm misunderstanding the IRQ core code this means that the IRQC
struct device will be in Runtime PM 'get sync' state after someone has
started using an interrupt.
As for wakeup support, based on IRQ_WAKEUP_STATE being toggled in
irq_set_irq_wake() together with the irqd_is_wakeup_set() usage in
suspend_device_irqs() it looks like interrupts used for wakeup will
stay enabled once we use Runtime PM in ->irq_enable() and ->irq_disable()
and because of that the clock operations and custom ->irq_set_wake()
should not be necessary.
I have boot tested this with some simple PHY link state change IRQs
on a Koelsch board, but I have not tried Suspend-to-RAM yet with wakeup
support. It would be useful to test this with Suspend-to-RAM on APE6EVM.
Thanks to Geert for hooking up APE6EVM interrupt wake support!
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---
Written against next-20150421
drivers/irqchip/irq-renesas-irqc.c | 61 +++++++++++++++---------------------
1 file changed, 27 insertions(+), 34 deletions(-)
next reply other threads:[~2015-04-21 14:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-21 15:01 Magnus Damm [this message]
2015-04-21 15:01 ` [PATCH/RFC 01/03] irqchip: renesas-irqc: Add irq_enable() and irq_disable() Magnus Damm
2015-04-21 15:01 ` [PATCH/RFC 02/03] irqchip: renesas-irqc: Add fine grained Runtime PM code Magnus Damm
2015-04-21 15:01 ` [PATCH/RFC 03/03] irqchip: renesas-irqc: Rely on Runtime PM for wakeup Magnus Damm
2015-04-21 17:56 ` [PATCH/RFC 00/03] irqchip: renesas-irqc: Fine grained Runtime PM support Geert Uytterhoeven
2015-04-23 8:10 ` Magnus Damm
2015-04-23 9:51 ` Geert Uytterhoeven
2015-04-23 14:44 ` Alan Stern
2015-04-23 17:49 ` Geert Uytterhoeven
2015-05-08 20:26 ` Kevin Hilman
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=20150421150115.14288.88519.sendpatchset@little-apple \
--to=magnus.damm@gmail.com \
--cc=geert+renesas@glider.be \
--cc=horms@verge.net.au \
--cc=jason@lakedaemon.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).