On Mon, Aug 11, 2014 at 08:45:52AM -0500, Felipe Balbi wrote: > On Mon, Aug 11, 2014 at 09:44:05AM -0400, Alan Stern wrote: > > On Mon, 11 Aug 2014, Felipe Balbi wrote: > > > > > > > I don't know what exactly problem you met, but current pullup dp during loading > > > > > gadget driver behavior is not suitable for webcam and android use case even vbus > > > > > is there. > > > > > > > > Why not? What's wrong with it? > > > > > > g_uvc needs a userspace counterpart. If we connect to the host before > > > userspace is ready, we might connect as a non-usable function. > > > > Okay, but can't that be fixed in g_uvc? Have it disable the pullup > > until the userspace component is ready, then enable the pullup. > > that might be too late, although propbably not catastrophic. The uvc gadget already does disable the udc on uvc_function_bind with usb_function_deactivate. > > I'm not sure how this could be made to work in a composite gadget, > > though. What if there were two uvc functions? The pullup would have > > you can refcount the disables, right ? The refcounting is handled by usb_function_deactivate. > > to remain disabled until both userspace components were ready. > > right It got enabled when the userspace opens the associated v4l2 video device. IMHO we have all parts to keep the gadget safe for working until the userspace is ready to work. Michael -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- 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