Re: [PATCH] apds9802als: add runtime PM support

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alan Stern
Date: Wednesday, October 27, 2010 - 7:13 am

On Wed, 27 Oct 2010, Hong Liu wrote:


Then you should change the function the way I suggested.  The PM core
will automatically do a runtime suspend after the system has fully
woken up.


Your approach will not work.  You _must_ define runtime_idle() if you 
want your driver to suspend correctly.  It doesn't have to be 
complicated; just make it call pm_runtime_suspend().

...


The problem is that the device can be runtime-resumed by code other 
than your own, and that other code will not always do a runtime-suspend 
afterward -- it will do a runtime-idle.  That's why you need to define 
a runtime_idle() callback.

Alan Stern

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] apds9802als: add runtime PM support, Alan Stern, (Wed Oct 27, 7:13 am)