On Fri, Sep 21, 2012 at 08:18:21PM +0200, Peter Stuge wrote: > Hi, > > Sarah Sharp wrote: > > Two weeks ago at Linux Plumbers Conference, I presented about the > > Intel Lynx Point USB port power off mechanism. > > Good session with some participation, thanks to all! > > > > The end result of those patches is that we expose a sysfs file per USB > > port to userspace to allow users to set power to either on or off. The > > port will only be powered off if all ports under the same power resource > > have the sysfs file set to off. > > How will userspace know why powering off the port does not work? We can expose the power resources in sysfs, so userspace can figure out which ports are under which power resources. If userspace really wants the port off (e.g. to disconnect and reconnect a misbehaving device), then it can set the sysfs file to off. When the policy is set to auto, it can find out the port status via a different sysfs file. But it's sort of like writing auto to the power/control file for a USB device. Userspace is telling the kernel it's allowed to power off the device, but it might not be immediately placed into suspend. > Also, will there be usbfs API for turning these knobs, or will sysfs > be the one true way? I'm not sure. We have sysfs files right now. I don't see why we'd need two interfaces. Did you have a particular reason for wanting the interface to be exposed via usbfs? Sarah Sharp -- 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