On Thu, 8 Jun 2006, David Brownell wrote: > Agreed that with USB at least we know some good things to do which > we have not yet done ... like autosuspending devices, and thereby > reducing VBUS consumption by factors on the order of 100. (And > because the functionality is associated with interfaces not devices, > achieving some of those things calls for USB framework updates.) > But this is another case where USB has PM needs that the rest of > the kernel hasn't yet thought about yet.
Interesting you should bring this up. As part of my autosuspend development, I decided it would simplify things if devices and their interfaces were always suspended together. That is, I changed the bus-level suspend and resume routines so that a PM request directed at a USB device always affects the device _and_ its interfaces, while a request directed at an interface does nothing (but returns 0). For system sleep this won't hurt anything, since everything always gets suspended and resumed. For runtime-PM using sysfs it simplifies things, since userspace no longer needs to worry about interfaces. In most cases this is the appropriate thing to do. For single-interface devices, or devices where a single driver manages multiple cooperating interfaces (such as CDC), we definitely want this behavior. Indeed, the alternative possibility -- that the device might be awake while the interface drivers are suspended -- is pretty bad, because the drivers will rely on remote-wakeup messages to notify them when something interesting happens, and remote wakeup doesn't operate unless the device is suspended. There might be a few cases where somebody _does_ want to suspend some but not all of a device's interfaces. But such cases are likely to be quite rare. For now it should be okay to disallow them. Do you agree with this reasoning? Alan Stern _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel