lkml.org 
[lkml]   [2018]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] spi: Gracefully handle power supplies with disabled PM
On Mon, Sep 17, 2018 at 02:10:41PM +0200, Lubomir Rintel wrote:
> This allows use of SPI when power management is disables, such as on
> early boot;
>
> See also: commit 31eb74318054 ("PM / runtime: Fix handling of suppliers
> with disabled runtime PM")

> if (!was_busy && ctlr->auto_runtime_pm) {
> ret = pm_runtime_get_sync(ctlr->dev.parent);
> - if (ret < 0) {
> + if (ret < 0 && ret != -EACCES) {

No, this is not at all clever. If the device uses runtime PM and
doesn't get resumed then there is every likelyhood that the device won't
even be clocked. If users want to disable power management it's going
to need rather more work than just setting a flag.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2018-09-17 18:28    [W:0.111 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site