From: Pavel Machek <pavel@ucw.cz>
To: Lubomir Rintel <lkundrak@v3.sk>
Cc: linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org,
Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH] spi: Gracefully handle power supplies with disabled PM
Date: Sat, 3 Nov 2018 20:12:00 +0100 [thread overview]
Message-ID: <20181103191200.GE31179@amd> (raw)
In-Reply-To: <20180917121041.21084-1-lkundrak@v3.sk>
[-- Attachment #1: Type: text/plain, Size: 1200 bytes --]
On Mon 2018-09-17 14:10:41, Lubomir Rintel wrote:
> This allows use of SPI when power management is disables, such as on
> early boot;
disabled
boot.
> See also: commit 31eb74318054 ("PM / runtime: Fix handling of suppliers
> with disabled runtime PM")
>
> Cc: Mark Brown <broonie@kernel.org>
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Plus.. I'm not sure.
I thought you'd cause imbalance between _put and _get, but that one is
probably ok.
On early boot, you probably need to proceed, but is ret == -EACCESS
the right test?
Pavel
> index ec395a6baf9c..6546564e41d0 100644
> --- a/drivers/spi/spi.c
> +++ b/drivers/spi/spi.c
> @@ -1212,7 +1212,7 @@ static void __spi_pump_messages(struct spi_controller *ctlr, bool in_kthread)
>
> if (!was_busy && ctlr->auto_runtime_pm) {
> ret = pm_runtime_get_sync(ctlr->dev.parent);
> - if (ret < 0) {
> + if (ret < 0 && ret != -EACCES) {
> pm_runtime_put_noidle(ctlr->dev.parent);
> dev_err(&ctlr->dev, "Failed to power device: %d\n",
> ret);
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
prev parent reply other threads:[~2018-11-03 19:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-17 12:10 [PATCH] spi: Gracefully handle power supplies with disabled PM Lubomir Rintel
2018-09-17 16:27 ` Mark Brown
2018-11-03 19:12 ` Pavel Machek [this message]
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=20181103191200.GE31179@amd \
--to=pavel@ucw.cz \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=lkundrak@v3.sk \
/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).