On Fri, 20 Nov 2015, Peter Chen wrote:

> > > > Hi Alan, we have several designs that the on-board HUB need to
> > > > be reset by gpio pin and its clock is also from the board or
> > > > the SoC. Any suggestions how to add these platform information
> > > > for HUB device?
> > > 
> > > How about putting it in the device tree?
> > > http://www.firmware.org/1275/bindings/usb/usb-1_0.ps
> > > clocks and reset-gpios properties could be added to the USB hub node.
> > 
> > Something like this is necessary.  Instead of making the hub driver
> > take care of the reset gpio and the clock, I suggest you make the host
> > controller's platform driver do these things.
> > 
> > This is because USB hubs are generic devices, not specific to any 
> > platform and (usually) hot-pluggable.  Associating platform-specific 
> > data with a hub is out of the ordinary, and it deserves to be handled 
> > by platform-specific code -- there is no such code in the hub driver.
> > 
> 
> If this on-board HUB is special, its reset pin needs to be toggled
> after power on, no matter for Intel or ARM platforms, how we handle
> it? It is not feasible we add this for all platform drivers.

I don't know.  Probably it should be handled the same way as any other 
hardware with special requirements.

Are you saying that it would be better to modify the hub driver than to 
modify all the platform drivers?  If you can figure out a way to make 
it work, then maybe -- I don't see how to do it.

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

Reply via email to