On Mon, Oct 28, 2013 at 10:37:52AM -0400, Alan Stern wrote: > On Mon, 28 Oct 2013, Peter Chen wrote: > > > > > Just like you said: > > > > > The physical wakeup setting is controlled by both the controller driver > > > > > and the platform driver. > > > > But currently, it is controlled (or affected) by hcd layer. > > > > > > It is _initialized_ by the HCD layer. The platform driver can always > > > override this. It's easy; just call device_set_wakeup_enable(dev, 0) > > > after usb_add_hcd(). > > > > > > In fact, your platform driver probably should remember the current > > > wakeup setting when the HC is removed. The next time it is added you > > > should change the wakeup setting to the remembered value. That way, if > > > the user adjusts the setting and switches between host and device mode, > > > the desired setting will persist. > > > > > > > Yes, we can do that. But if there is no initializing for wakeup setting > > at usb_add_hcd, the controller driver needs to do nothing, No matter > > HC is removed or peripheral switches to HC, the wakeup setting > > will be totally decided by user, and the default setting is 0. > > Okay. I'll make a deal with you: You can remove the single > device_wakeup_enable() call from usb_add_hcd() provided, in the same > patch, you add device_wakeup_enable() calls to every HCD (except yours, > obviously). > Thanks, Alan. -- Best Regards, Peter Chen -- 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