On Fri, Nov 14, 2014 at 03:33:44PM +0800, Peter Chen wrote: > On Thu, Nov 13, 2014 at 09:55:34PM -0600, Felipe Balbi wrote: > > Hi, > > > > On Fri, Nov 14, 2014 at 08:03:15AM +0800, Peter Chen wrote: > > > Add controller reset API, it may be used for host/otg driver in future. > > > > you need a better commit log here. How would it be used ? when ? And, > > more importantly, why ? > > > > I will add more information > > > Why would we need to reset the IP outside of ->probe() ? > > > > I don't oppose to the refactoring, but why would we ever need to reset > > this IP ? > > Usually, we need to below reset controller at below situations: > - Role switch, host->device and device->host > - Return from hibernation, which the controller will lost its power, > and the content of the register are lost. resetting is probably not the best solution in either case, though. It might be the easiest, but not the best. For suspend/resume, you would be better off saving/restoring contenxt and for role switch, you could just reprogram the few registers which need to change when role swapping. -- balbi
Attachment:
signature.asc
Description: Digital signature