lkml.org 
[lkml]   [2015]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 1/9] usb: hcd: Introduce usb_start/stop_hcd()
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



\
 
 \ /
  Last update: 2015-03-19 15:41    [W:0.230 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site