From: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
Linus Walleij <linus.walleij@linaro.org>,
linux-gpio@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Cc: "Jon Hunter" <jonathanh@nvidia.com>,
"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
Subject: [PATCH 0/2] gpio: rcar: (re)add Runtime PM support
Date: Thu, 8 Dec 2016 18:32:26 +0100 [thread overview]
Message-ID: <20161208173228.16835-1-niklas.soderlund+renesas@ragnatech.se> (raw)
Hi all,
This series (re)adds Runtime PM support which was reverted by:
commit 42c25013ca95ce79 ('Revert "gpio: rcar: Add Runtime PM handling for interrupts"')
commit ce0e2c60e69e5f87 ('Revert "gpio: rcar: Fine-grained Runtime PM support"')
The reason it was reverted was that 'Runtime PM handling for interrupts'
could triggering a BUG() in linux/drivers/base/power/runtime.c 'BUG:
sleeping function called from invalid context', see [1]. Since then Jon
Hunter have solved this in a generic way in:
commit be45beb2df6909d4 ("genirq: Add runtime power management support for IRQ chips")
Patch 1/2 make use of Jons work to make sure proper PM handling when an
GPIO is requested as an interrupt and patch 2/2 is just a resurrection
of Geerts original patch with small fixups to catch up with changes to
the driver.
I have tested the series on Koelsch and Salvator-X H3 and can in in
sysfs observe that only GPIO blocks which are used are powered on.
Requesting a GPIO from a powered down block will power it on and
releasing it will power it off.
To test that patch 1/2 works as expected I have done tests on Salvator-X
where the EtherAVB will not work with patch 2/2 applied, which moves
pm_runtime_get_sync() from probe time to gpio_rcar_request(). Whit that
move the GPIO block used by EtherAVB will not be powered on unless done
so when the interrupt is requested, which we add support for in 1/2.
I'm not sure on how to best resurrect a patch which have been reverted,
I dropped all Signed-off-by lines except Geerts as he is the author and
added my own Signed-off-by since I'm resending it. Hope this is OK, if
not please let me know.
1. https://www.spinics.net/lists/linux-renesas-soc/msg02710.html
Geert Uytterhoeven (1):
gpio: rcar: Fine-grained Runtime PM support
Niklas Söderlund (1):
gpio: rcar: set IRQ chip parent_device
drivers/gpio/gpio-rcar.c | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
--
2.10.2
next reply other threads:[~2016-12-08 17:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-08 17:32 Niklas Söderlund [this message]
2016-12-08 17:32 ` [PATCH 1/2] gpio: rcar: set IRQ chip parent_device Niklas Söderlund
2016-12-08 21:36 ` Laurent Pinchart
2016-12-09 10:43 ` Geert Uytterhoeven
2016-12-28 0:31 ` Linus Walleij
2016-12-08 17:32 ` [PATCH 2/2] gpio: rcar: Fine-grained Runtime PM support Niklas Söderlund
2016-12-08 21:40 ` Laurent Pinchart
2016-12-08 23:15 ` Niklas Söderlund
2016-12-08 23:21 ` Laurent Pinchart
2016-12-15 23:12 ` Linus Walleij
2016-12-09 10:26 ` Geert Uytterhoeven
2016-12-28 0:33 ` 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=20161208173228.16835-1-niklas.soderlund+renesas@ragnatech.se \
--to=niklas.soderlund+renesas@ragnatech.se \
--cc=geert@linux-m68k.org \
--cc=jonathanh@nvidia.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).