public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* pm_runtime_suspended() can be false if RPM_SUSPENDED
@ 2011-07-08 23:41 Kevin Hilman
  2011-07-09 10:19 ` Rafael J. Wysocki
  0 siblings, 1 reply; 9+ messages in thread
From: Kevin Hilman @ 2011-07-08 23:41 UTC (permalink / raw)
  To: Rafael J. Wysocki, linux-pm; +Cc: linux-omap@vger.kernel.org

Hi Rafael,

Just curious why pm_runtime_suspended() requires the device to be
enabled for it to return true:

static inline bool pm_runtime_suspended(struct device *dev)
{
	return dev->power.runtime_status == RPM_SUSPENDED
		&& !dev->power.disable_depth;
}

I must be misunderstanding something, but I would consider a device that
has been runtime suspended before runtime PM was disabled to still be
runtime suspended.

I just noticed this when testing with your pm-domains branch.  when I
noticed that an 'if (pm_runtime_suspended(dev))' check in my PM domain's
->suspend_noirq() was always failing since it's after the PM core calls
pm_runtime_disable().  I had to change my PM domain code to only check
dev->power.runtime_status for it to work.

Kevin

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

end of thread, other threads:[~2011-07-11 22:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-08 23:41 pm_runtime_suspended() can be false if RPM_SUSPENDED Kevin Hilman
2011-07-09 10:19 ` Rafael J. Wysocki
2011-07-11 19:24   ` Kevin Hilman
2011-07-11 20:02     ` Rafael J. Wysocki
2011-07-11 20:14       ` Kevin Hilman
2011-07-11 20:22         ` Rafael J. Wysocki
2011-07-11 20:34           ` Hilman, Kevin
2011-07-11 22:36             ` Rafael J. Wysocki
2011-07-11 22:50               ` Hilman, Kevin

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