[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20181103191200.GE31179@amd>
Date: Sat, 3 Nov 2018 20:12:00 +0100
From: Pavel Machek <pavel@....cz>
To: Lubomir Rintel <lkundrak@...sk>
Cc: linux-kernel@...r.kernel.org, linux-spi@...r.kernel.org,
Mark Brown <broonie@...nel.org>
Subject: Re: [PATCH] spi: Gracefully handle power supplies with disabled PM
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@...nel.org>
> Signed-off-by: Lubomir Rintel <lkundrak@...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
Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)
Powered by blists - more mailing lists