On Fri, 25 Nov 2005, Benjamin Herrenschmidt wrote: > Ok, so my driver should dpm_runtime_suspend() on itself, which will > cause the driver->suspend() routine to be called from which I can then > call usb_suspend_device(), right ?
It's hard to answer your question, partly because you haven't explained the context. Are you worried about suspending a root hub, a USB device, an interface driver, or what? Also, what you wrote is a little mixed up. Normally usb_suspend_device calls driver->suspend, not the other way around. > I know we don't have proper infrastructure yet, just wondering what to > do in the meantime as I may give a try at doing some runtime suspend to > a couple of drivers to save power on my laptop :) Drivers for USB devices? Okay. To suspend a USB device, you need to call dpm_runtime_suspend for each of the device's interface, and then for the device itself. When the infrastructure is in place, it will automatically take care of suspending the device once all the interfaces are suspended. For now, however, that's your responsibility. Alan Stern ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel