mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v5 0/2]
@ 2015-09-29 12:29 Tomeu Vizoso
  2015-09-29 12:29 ` [PATCH v5 1/2] PM / sleep: Go direct_complete if driver has no callbacks Tomeu Vizoso
  2015-09-29 12:29 ` [PATCH v5 2/2] USB / PM: Allow USB devices to remain runtime-suspended when sleeping Tomeu Vizoso
  0 siblings, 2 replies; 11+ messages in thread
From: Tomeu Vizoso @ 2015-09-29 12:29 UTC (permalink / raw)
  To: linux-pm, Alan Stern, Rafael J. Wysocki, martyn.welch
  Cc: Tomeu Vizoso, linux-usb, linux-kernel, Len Brown, Kevin Hilman,
	Greg Kroah-Hartman, Pavel Machek, Ulf Hansson

Hi,

this is v5 of an attempt to make it easier for devices to remain in
runtime PM when the system goes to sleep, mainly to reduce the time
spent resuming devices.

For this, we interpret the absence of all PM callback implementations as
it being safe to do direct_complete, so their ancestors aren't prevented
from remaining runtime-suspended.

Additionally, the prepare() callback of USB devices will return 1 if
runtime PM is enabled and the current wakeup settings are correct.

With these changes, a uvcvideo device (for example) stays in runtime
suspend when the system goes to sleep and is left in that state when the
system resumes, not delaying it unnecessarily.

Thanks,

Tomeu

Changes in v5:
- Check for all dev_pm_ops instances associated to a device, updating a
  no_pm_callbacks flag at the times when that could change.

Tomeu Vizoso (2):
  PM / sleep: Go direct_complete if driver has no callbacks
  USB / PM: Allow USB devices to remain runtime-suspended when sleeping

 drivers/base/dd.c           |  3 ++
 drivers/base/power/domain.c |  5 ++++
 drivers/base/power/main.c   | 69 ++++++++++++++++++++++++++++++++-------------
 drivers/base/power/power.h  |  2 ++
 drivers/usb/core/port.c     |  6 ++++
 drivers/usb/core/usb.c      | 11 +++++++-
 include/linux/pm.h          |  1 +
 7 files changed, 77 insertions(+), 20 deletions(-)

-- 
2.4.3


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

end of thread, other threads:[~2015-10-05 13:01 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-29 12:29 [PATCH v5 0/2] Tomeu Vizoso
2015-09-29 12:29 ` [PATCH v5 1/2] PM / sleep: Go direct_complete if driver has no callbacks Tomeu Vizoso
2015-09-29 13:37   ` kbuild test robot
2015-09-29 13:38   ` kbuild test robot
2015-09-29 13:39   ` kbuild test robot
2015-09-29 14:39   ` Alan Stern
2015-10-04 15:16   ` Pavel Machek
2015-10-05  8:25     ` Tomeu Vizoso
2015-10-05  9:07       ` Pavel Machek
2015-10-05 13:29         ` Rafael J. Wysocki
2015-09-29 12:29 ` [PATCH v5 2/2] USB / PM: Allow USB devices to remain runtime-suspended when sleeping Tomeu Vizoso

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

Powered by JetHome