Re: [PATCH] i2c: omap: Use noirq system sleep pm ops to idle device for suspend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Wolfram Sang <wsa@xxxxxxxxxxxxx> [180930 23:20]:
> On Thu, Sep 27, 2018 at 12:38:12PM -0700, Tony Lindgren wrote:
> > With runtime PM autosuspend we may have i2c-omap left into enabled
> > state if an i2c client reconfigures registers for suspend as for
> > example pixcir_ts driver does. Let's make sure i2c-omap is suspended
> > by adding SET_NOIRQ_SYSTEM_SLEEP_PM_OPS.
> 
> I wonder: if we have RPM autosuspend and do a system suspend with the
> autosuspend timeout not reached yet, shouldn't rather the PM core do
> this enforcement instead of updating each and every driver?

I've been wondering about that too. Obviously trying to do force suspend
automatically when there is no autosuspend timeout is not a safe thing
to do for things like RTC :)

Adding linux-pm list folks to Cc too. Not sure if we can do it
automatically but at least we could document it with something like
the following at the end of "6. Runtime PM and System Sleep":

Note that if runtime PM autosuspend timeout is used for a bus driver
such as an I2C bus controller, it should be paired with suitable
struct dev_pm_ops. This is to ensure the bus driver is properly
suspended for cases where it's child driver reconfigures registers
for suspend. In most cases setting SET_NOIRQ_SYSTEM_SLEEP_PM_OPS
with pm_runtime_force_suspend and pm_runtime_force_suspend will
be enough if no specific bus driver configuration is needed for
suspend.

Regards,

Tony






[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux