From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Jon Hunter <jonathanh@nvidia.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
Linus Walleij <linus.walleij@linaro.org>,
Alexandre Courbot <gnurou@gmail.com>,
Wolfram Sang <wsa@the-dreams.de>,
linux-renesas-soc@vger.kernel.org,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
Linux PM list <linux-pm@vger.kernel.org>
Subject: Re: [PATCH/RFC] gpio: rcar: Add Runtime PM handling for interrupts
Date: Thu, 18 Feb 2016 16:12:23 +0100 [thread overview]
Message-ID: <CAMuHMdVoUAwWm6GoN6-ufs5j_b79ndFTcpQNu59JCtO1wrQBnQ@mail.gmail.com> (raw)
In-Reply-To: <56C2EBA5.4040903@nvidia.com>
Hi Jon,
On Tue, Feb 16, 2016 at 10:28 AM, Jon Hunter <jonathanh@nvidia.com> wrote:
> On 09/02/16 15:19, Geert Uytterhoeven wrote:
>> The R-Car GPIO driver handles Runtime PM for requested GPIOs only.
>>
>> When using a GPIO purely as an interrupt source, no Runtime PM handling
>> is done, and the GPIO module's clock may not be enabled.
>>
>> To fix this:
>> - Add .irq_request_resources() and .irq_release_resources() callbacks
>> to handle Runtime PM when an interrupt is requested,
>
> I know that when I was looking at runtime-pm support for IRQ chips
> (which I have been meaning to get back too), the problem with
> irq_request_resources() is that it is called from the context of a
> spinlock (in __setup_irq()). You mentioned that you have not seen any
> reports of might_sleep_if(), but have you ensured that it is actually
> runtime resuming in your testing and you are not getting lucky?
It must be runtime-resuming, because without the call to pm_runtime_get_sync()
interrupts don't work.
> An alternative for you might be to use the
> irq_bus_lock/irq_bus_sync_unlock callbacks. See what Grygorii
> implemented for OMAP in commit aca82d1cbb49 ("gpio: omap: move pm
> runtime in irq_chip.irq_bus_lock/sync_unlock").
Thanks, that indeed looks interesting...
> As I mentioned I do plan to get back to the series for adding runtime-pm
> support for IRQ chips, in the next week or two.
Looking forward to it!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2016-02-18 15:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-09 15:19 [PATCH/RFC] gpio: rcar: Add Runtime PM handling for interrupts Geert Uytterhoeven
2016-02-15 22:10 ` Linus Walleij
2016-02-16 7:34 ` Geert Uytterhoeven
2016-02-16 9:28 ` Jon Hunter
2016-02-18 15:12 ` Geert Uytterhoeven [this message]
2016-02-19 9:16 ` Linus Walleij
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=CAMuHMdVoUAwWm6GoN6-ufs5j_b79ndFTcpQNu59JCtO1wrQBnQ@mail.gmail.com \
--to=geert@linux-m68k.org \
--cc=geert+renesas@glider.be \
--cc=gnurou@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=wsa@the-dreams.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).