On Sat, 10 Sep 2005, Luca Risolia wrote: > On Fri, Sep 09, 2005 at 05:08:48PM -0400, Alan Stern wrote: > > On Fri, 9 Sep 2005, Luca Risolia wrote: > > > > > Do you know what's the best approach to avoid power consuption > > > while an USB2 device is not in use? > > > > At the moment, two solutions occur to me: (1) Write a patch to resume > > suspended devices when binding, or (2) Unplug/turn off the device. > > Is it possible to suspend and resume from userspace through /sysfs? > If I remember well, it's possible, but I can't find any documentation > in the kernel about the corresponding attributes under /sysfs/bus/usb/
Yes, it is possible. (You'll have to verify that the path is correct, my example might have a typo.) It goes like this: To suspend: echo -n 3 >/sys/bus/usb/.../device/power/state To resume: echo -n 0 >/sys/bus/usb/.../device/power/state Of course, this works only if you have enabled CONFIG_USB_SUSPEND, CONFIG_PM, and CONFIG_EXPERIMENTAL. Alan Stern ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel