On Wed, 13 Aug 2014, Paul Zimmerman wrote: > > > The UDC driver ought to know when Vbus turns on or off, without > > > polling. It should get an interrupt when that happens, or its > > > ops->vbus_session routine should be called. So at that time, the UDC > > > driver could invoke a new usb_gadget_driver callback. Let's also call > > > it vbus_session. > > > > > > Since composite.c defines a usb_gadget_driver structure, it can have a > > > composite_vbus_session() callback. When this routine is called, it > > > will check to see whether all the functions are activated. If they are > > > and Vbus is now on, it will call usb_gadget_connect(); otherwise it > > > will call usb_gadget_disconnect(). > > Is there a difference between a VBus on/off and a connect/disconnect? > Because AFAIK the Synopsys USB 3.0 controller (unless it is configured > for OTG mode) does not have a way to detect when VBus is enabled/ > disabled, other than by a connect/disconnect interrupt.
That's an excellent point; it completely slipped my mind. So we already have all the callbacks we need. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html