On Mon, Feb 24, 2014 at 2:17 AM, Oliver Neukum <oneukum@xxxxxxx> wrote: > On Fri, 2014-02-21 at 16:10 -0800, Dan Williams wrote: >> From: Lan Tianyu <tianyu.lan@xxxxxxxxx> >> >> describe the mechanisms for controlling port power policy and >> discovering the port power state. >> >> Cc: Oliver Neukum <oneukum@xxxxxxx> >> Signed-off-by: Lan Tianyu <tianyu.lan@xxxxxxxxx> >> [sarah]: wordsmithing >> [djbw]: updates for peer port changes >> Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx> >> --- >> Documentation/usb/power-management.txt | 237 ++++++++++++++++++++++++++++++++ >> 1 files changed, 237 insertions(+), 0 deletions(-) >> >> diff --git a/Documentation/usb/power-management.txt b/Documentation/usb/power-management.txt >> index 1392b61d6ebe..e67c1d4d1994 100644 >> --- a/Documentation/usb/power-management.txt >> +++ b/Documentation/usb/power-management.txt >> @@ -5,6 +5,25 @@ >> October 28, 2010 >> >> >> + Contents: >> + --------- >> + * What is Power Management? >> + * What is Remote Wakeup? >> + * When is a USB device idle? >> + * Forms of dynamic PM >> + * The user interface for dynamic PM >> + * Changing the default idle-delay time >> + * Warnings >> + * The driver interface for Power Management >> + * The driver interface for autosuspend and autoresume >> + * Other parts of the driver interface >> + * Mutual exclusion >> + * Interaction between dynamic PM and system PM >> + * xHCI hardware link PM >> + * USB Port Power Control >> + * User Interface for Port Power Control >> + * Suggested Userspace Port Power Policy >> + >> >> What is Power Management? >> ------------------------- >> @@ -516,3 +535,221 @@ relevant attribute files is usb2_hardware_lpm. >> driver will enable hardware LPM for the device. You >> can write y/Y/1 or n/N/0 to the file to enable/disable >> USB2 hardware LPM manually. This is for test purpose mainly. >> + >> + >> + USB Port Power Control >> + ---------------------- >> + >> +In addition to suspending endpoint devices and enabling hardware >> +controlled link power management, the USB subsystem also has the >> +capability to disable power to individual ports. Power is controlled > > Not necessary individual ports. You explain the limitations of ganged > switching further below. I'd prefer "ports under some conditions" Ok. >> +* wakeup note: the implementation does not allow a port connected to a >> + device with wakeup capability to be powered off. > > The capability may be there. It just mustn't be enabled. I'm not sure I grok this comment? Specifically I am referring to this logic: usb_port_suspend() { [..] if (status == 0 && !udev->do_remote_wakeup && udev->persist_enabled) { pm_runtime_put_sync(&port_dev->dev); port_dev->did_runtime_put = true; } [..] } I have a follow-on patch to go clear ->do_remote_wakeup on a hub once all its downstream ports are suspended, but until then the simply does not allow such ports to suspend. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html