Hi, On Thu, Nov 22, 2012 at 09:35:06PM -0500, Alan Stern wrote: > On Thu, 22 Nov 2012, Felipe Balbi wrote: > > > > The latter, more or less. For example, maybe we can tell usbcore > > > somehow that regulator X is in control of a device attached to host > > > controller Y (not sure how we would express X and Y though). Then when > > > usb_add_hcd() sees that the host controller being added is Y, it will > > > know to turn on regulator X. Similarly for usb_remove_hcd(). > > > > that'd look very nice indeed. Perhaps we could even take care of such > > details for the roothub, even. Maybe some systems might show up where > > roothub need external regulators provided by e.g. PMIC ?!? > > As far as I can see, that ought to work provided the controller's > platform driver is careful not to access the controller hardware before > calling usb_add_hcd(). > > And maybe the same sort of scheme could be used for clocks, although I > don't know how to do it in a generic way that will work on all > platforms. perhaps making use of pm_clk_add() and letting PM layer do the rest for us ? If that doesn't work then it means PM layer's clk handling could be improved, I suppose. -- balbi
Attachment:
signature.asc
Description: Digital signature