On Fri, 13 Oct 2006, Oliver Neukum wrote: > > Oh yes, there's one detail I forgot to mention before. You need to set > > the supports_autosuspend flag in the usb_driver structure (can be done > > OK. > > > statically) and the needs_remote_wakeup flag in the usb_interface > > structure (must be done during probe). > > This is not optimal. I want remote wakeup only while the device is open.
Then set it in the open routine and clear it in the close routine (before calling usb_autopm_put_interface). You should understand that this flag doesn't indicate whether the driver _wants_ remote wakeup -- it indicates that the driver _needs_ remote wakeup. If the flag is set and remote wakeup isn't available then the device will not be autosuspended. However even if no driver needs remote wakeup, it will be enabled unless it isn't supported or is disallowed by device_set_wakeup_enable(). Note that once the device is suspended, its remote wakeup setting can't be changed without resuming it. So if the device is open and autosuspended, and then the device file is closed, remote wakeup will remain on. Alan Stern ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel