On Thu, 19 Mar 2015, Roger Quadros wrote: > > It would be a lot simpler to unbind the host controller driver > > completely when switching to device mode and rebind it when switching > > back. I guess that is the sort of heavy-duty approach you want to > > avoid, but it may be the only practical way forward. > > So you mean directly calling usb_add/remove_hcd() from the OTG core? Well, actually I meant calling device_release_driver() and driver_probe_device(). But usb_add/remove_hcd() might work just about as well, although I think some of the HCDs may still require a little rewriting. Peter Chen says it works for Chipidea. > I don't see any issues with that other than it being a heavy-duty operation > like you said and hope that it doesn't violate the OTG spec timing. The timing is a tough issue. I'm not sure what we can do about it, though. > Looking at Figure 5-3: "HNP Sequence of Events (FS)" of the OTG 2.0 spec > we have about 150ms (X10) to switch from B-Device detected A connect (b_wait_acon state) > to driving bus reset (b_host state). I don't think this should be an issue in modern SoCs > but I'm not very sure. > > In any case I can migrate to the add/remove hcd approach to simplify things. Good luck. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html