summaryrefslogtreecommitdiffstats
path: root/Documentation/ABI/testing
diff options
context:
space:
mode:
authorLan Tianyu <tianyu.lan@intel.com>2012-09-05 07:44:38 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-10 22:04:01 +0200
commitca9c9d0c922e4f1dac80699ebab1269d6dbaff85 (patch)
treeacd82e9f8275ddbc34a9a69b05105337b32ce8fc /Documentation/ABI/testing
parentusb: Fail a get config when the port is powered off. (diff)
downloadlinux-ca9c9d0c922e4f1dac80699ebab1269d6dbaff85.tar.xz
linux-ca9c9d0c922e4f1dac80699ebab1269d6dbaff85.zip
usb : Add sysfs files to control port power.
This patch adds two sysfs files for each usb hub port to allow userspace to control the port power policy. For an upcoming Intel xHCI roothub, this will translate into ACPI calls to completely power off or power on the port. As a reminder, when these ports are completely powered off, the USB host and device will see a physical disconnect. All future USB device connections will be lost, and the device will not be able to signal a remote wakeup. The control sysfs file can be written to with two options: "on" - port power must be on. "off" - port must be off. The state sysfs file reports usb port's power state: "on" - powered on "off" - powered off "error" - can't get power state For now, let userspace dictate the port power off policy. Future patches may add an in-kernel policy. Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/ABI/testing')
-rw-r--r--Documentation/ABI/testing/sysfs-bus-usb24
1 files changed, 24 insertions, 0 deletions
diff --git a/Documentation/ABI/testing/sysfs-bus-usb b/Documentation/ABI/testing/sysfs-bus-usb
index b6fbe514a869..13f3eeee1599 100644
--- a/Documentation/ABI/testing/sysfs-bus-usb
+++ b/Documentation/ABI/testing/sysfs-bus-usb
@@ -227,3 +227,27 @@ Contact: Lan Tianyu <tianyu.lan@intel.com>
Description:
The /sys/bus/usb/devices/.../(hub interface)/portX
is usb port device's sysfs directory.
+
+What: /sys/bus/usb/devices/.../(hub interface)/portX/control
+Date: August 2012
+Contact: Lan Tianyu <tianyu.lan@intel.com>
+Description:
+ The /sys/bus/usb/devices/.../(hub interface)/portX/control
+ attribute allows user space to control the power policy on
+ the usb port.
+
+ All ports have one of the following two values for control
+ "on" - port power must be on.
+ "off" - port power must be off.
+
+What: /sys/bus/usb/devices/.../(hub interface)/portX/state
+Date: August 2012
+Contact: Lan Tianyu <tianyu.lan@intel.com>
+Description:
+ The /sys/bus/usb/devices/.../(hub interface)/portX/state
+ attribute allows user space to check hub port's power state.
+
+ All ports have three following states
+ "on" - port power on
+ "off" - port power off
+ "error" - can't get the hub port's power state