On Thu, 4 Aug 2016, Felipe Balbi wrote:

> > What are you trying to accomplish?  Is the problem that wakeup signals
> > only cause the platform device to be runtime-resumed, but you also need
> > the HCD to wake up?  And conversely, whenever the HCD gets
> > runtime-suspended you also want the platform device to go into runtime
> > suspend?
> 
> this is DWC3 as peripheral-only. PCI Wakeup (PME) wakes up dwc3-pci, but
> we need dwc3 core (a platform device) to be resumed as well.

Oh, so I got the types wrong.  But the basic idea is still the same: 
When the parent wakes up, it does a runtime-resume of the child.  The 
child is then responsible for making sure it stays awake as long as 
necessary, and when it goes back to low power the parent naturally does 
the same.

> > If that's so, the proper solution is for the platform device's
> > runtime_resume routine to call pm_runtime_resume() for the HCD, and
> > never to do pm_runtime_get_* or pm_runtime_put_* on the platform
> > device.  The HCD's callback routines would then be responsible for
> > doing runtime-PM gets and puts on the HCD as required.
> 
> hmm, interesting approach. Should probably work with my setup as
> well. I'll test that out tomorrow :-)
> 
> Thanks for the hint. In any case, I suppose this would be material for
> v4.9 while $subject is -rc material, agree?

Sure.

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