public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* Question about expected behavior when PM runtime is disabled
@ 2011-06-10 22:54 Kenneth Heitke
  2011-06-11 16:12 ` Alan Stern
  0 siblings, 1 reply; 13+ messages in thread
From: Kenneth Heitke @ 2011-06-10 22:54 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-pm

Hi Rafael,

Sorry if this question has been raised before.  I actually have two 
questions here.  These questions are related to PM runtime being 
disabled at runtime (i.e. call to pm_runtime_disable() )

If I call pm_runtime_enabled() to first determine if PM runtime is 
enabled followed conditionally by a call to pm_runtime_get_sync(), it 
would be possible for PM runtime to be disabled between these two calls 
and the get_sync() will fail.  Is there any reason to even use the 
enabled() call?  My goal here was to use the enabled() call to determine 
if PM runtime was configured/enabled in the kernel and then to manage my 
resources, clocks etc, in a different way if PM runtime is not present.

My second question then is what if PM runtime is enabled in the kernel 
and then gets disabled at runtime.  What is the expected behavior for a 
driver?  Should it fail all requests with EGAIN until PM runtime is 
enabled again? (in suspend state, PM runtime gets disable, new i/o 
request is made, power and clocks need to be turned on).

What about delayed autosuspend?  I believe that if PM runtime is 
disabled while there is a delayed autosuspend pending, the suspend will 
fail without notification (clocks and power will be left on).  Will PM 
runtime still be in the idle state once PM runtime is re-enabled?

thanks,
Ken


-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-06-20 23:27 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-10 22:54 Question about expected behavior when PM runtime is disabled Kenneth Heitke
2011-06-11 16:12 ` Alan Stern
2011-06-13 18:42   ` Kenneth Heitke
2011-06-13 19:28     ` Alan Stern
2011-06-13 19:51       ` Rafael J. Wysocki
2011-06-13 20:33         ` Alan Stern
2011-06-13 21:20           ` Rafael J. Wysocki
2011-06-14 13:47             ` Alan Stern
2011-06-14 20:01               ` Rafael J. Wysocki
2011-06-17 15:08                 ` Alan Stern
2011-06-17 19:29                   ` Rafael J. Wysocki
2011-06-20 23:21                     ` Kevin Hilman
2011-06-20 23:27                       ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox