On Tue, 22 Oct 2013, Peter Chen wrote: > Hi Alan, > > Currently, the controller's wakeup setting is enabled by default, > is it ok let it be disabled by default, and let the user control it. > Enable usb wakeup will cause more power consumption(some phy logic > need to be on to detect wakeup) and unexpected usb wakeup may be > considered as an unexpected behaviour. Isn't this the sort of thing that should be handled in userspace? If the user (or the distro) sets the appropriate wakeup value for the controller then the default doesn't matter. It's not possible for the kernel to guess what the user wants. For example, if there's a USB keyboard then probably wakeup should be enabled. But what if there's a mouse and no keyboard? The kernel can't tell. In the end, we have to let the user tell us. > Meanwhile, the controller may not be dedicated for host, it may otg > controller, the hcd is deleted when switches to device mode, > the wakeup setting for controller is still enabled, it is not suitable. If the HC is deleted and the UDC is added then the wakeup settings should be determined by the UDC, not by the HC. The next time the system goes to sleep, the UDC driver should be responsible for enabling or disabling wakeup. Alan Stern -- 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