From: Tomeu Vizoso <tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
To: linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Alan Stern
<stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>,
"Rafael J. Wysocki" <rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org>,
martyn.welch-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org
Cc: Tomeu Vizoso
<tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Len Brown <len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Kevin Hilman <khilman-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
Pavel Machek <pavel-+ZI9xUNit7I@public.gmane.org>,
Ulf Hansson <ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Subject: [PATCH v7 0/2] Allow USB devices to remain runtime-suspended when sleeping
Date: Wed, 30 Sep 2015 11:58:16 +0200 [thread overview]
Message-ID: <1443607098-26666-1-git-send-email-tomeu.vizoso@collabora.com> (raw)
Hi,
this is v7 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 v7:
- Reduce indentation by adding a label in device_prepare()
Changes in v6:
- Add stub for !CONFIG_PM.
- Move implementation of device_check_pm_callbacks to power/main.c as it
doesn't belong to CONFIG_PM_SLEEP.
- Take dev->power.lock before modifying flag.
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/common.c | 27 +++++++++++++++++++++++++++
drivers/base/power/domain.c | 5 +++++
drivers/base/power/main.c | 8 ++++++++
drivers/base/power/power.h | 6 ++++++
drivers/usb/core/port.c | 6 ++++++
drivers/usb/core/usb.c | 11 ++++++++++-
include/linux/pm.h | 1 +
8 files changed, 66 insertions(+), 1 deletion(-)
--
2.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2015-09-30 9:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-30 9:58 Tomeu Vizoso [this message]
2015-09-30 9:58 ` [PATCH v7 1/2] PM / sleep: Go direct_complete if driver has no callbacks Tomeu Vizoso
2015-09-30 11:33 ` Ulf Hansson
2015-09-30 13:05 ` Rafael J. Wysocki
2015-09-30 13:23 ` Ulf Hansson
2015-09-30 13:59 ` Tomeu Vizoso
2015-09-30 21:17 ` Rafael J. Wysocki
2015-10-01 9:04 ` Ulf Hansson
2015-10-01 22:23 ` Rafael J. Wysocki
2015-09-30 9:58 ` [PATCH v7 2/2] USB / PM: Allow USB devices to remain runtime-suspended when sleeping Tomeu Vizoso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1443607098-26666-1-git-send-email-tomeu.vizoso@collabora.com \
--to=tomeu.vizoso-zgy8ohtn/8qb+jhodadfcq@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=khilman-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=martyn.welch-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org \
--cc=pavel-+ZI9xUNit7I@public.gmane.org \
--cc=rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org \
--cc=stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org \
--cc=ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox