On 2012/7/7 2:14, Greg KH wrote:
On Fri, Jul 06, 2012 at 02:14:00PM +0800, Lan Tianyu wrote:
Change since v5: Add usb_autopm_get/put_interface() around the port
power operations in the control attribute's callback to deal with
situation that control attribute is changed when the usb hub is suspended.

Change since v4: Add clear PORT_POWER if power policy is "off" in the
hub_power_on(). Return -EIO if set/clear PORT_POWER fails in the 
store_port_power_control()

This patch is to add two attributes for each usb hub ports to control port's 
power.
Control port's power through setting or clearing PORT_POWER feature.

control has two options. "auto", "on" and "off"
"on" - port power must be on.
"off" - port power must be off.

state reports usb port's power state
"on" - power on
"off" - power off
"error" - can't get power state

Acked-by: Alan Stern<st...@rowland.harvard.edu>
Signed-off-by: Lan Tianyu<tianyu....@intel.com>
---
  Documentation/ABI/testing/sysfs-bus-usb |   25 ++++++
  drivers/usb/core/hub.c                  |  133 ++++++++++++++++++++++++++++++-
  2 files changed, 157 insertions(+), 1 deletions(-)

diff --git a/Documentation/ABI/testing/sysfs-bus-usb 
b/Documentation/ABI/testing/sysfs-bus-usb
index 6df4e6f..abe4ea4 100644
--- a/Documentation/ABI/testing/sysfs-bus-usb
+++ b/Documentation/ABI/testing/sysfs-bus-usb
@@ -208,3 +208,28 @@ Description:
                such as ACPI. This file will read either "removable" or
                "fixed" if the information is available, and "unknown"
                otherwise.
+
+What:          /sys/bus/usb/devices/.../(hub interface)/portX/control
+Date:          June 2012

It is no longer June 2012  :)

Oh. Sorry. Forgot to modify. Time is too quick. :)
Will update soon.

--
Best Regards
Tianyu Lan
linux kernel enabling team
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to