Re: [PATCH v2] usb: dwc2: add bus suspend/resume for dwc2

2014-11-10 Thread Julius Werner
>> The contract for bus_suspend() is that it will suspend all ports not >> yet suspended, keep track of those ports and then only resume those in >> bus_resume() (compare, for example, how XHCI keeps track of that with >> xhci_bus_state.bus_suspended in xhci_bus_suspend/resume()). So you >> need so

Re: [PATCH v2] usb: dwc2: add bus suspend/resume for dwc2

2014-11-10 Thread Kever Yang
Hi Julius, On 11/07/2014 06:11 AM, Julius Werner wrote: On Wed, Nov 5, 2014 at 5:30 PM, Kever Yang wrote: Hcd controller needs bus_suspend/resume, dwc2 controller make root hub generate suspend/resume signal with hprt0 register when work in host mode. After the root hub enter suspend, we can m

Re: [PATCH v2] usb: dwc2: add bus suspend/resume for dwc2

2014-11-06 Thread Julius Werner
On Wed, Nov 5, 2014 at 5:30 PM, Kever Yang wrote: > Hcd controller needs bus_suspend/resume, dwc2 controller make > root hub generate suspend/resume signal with hprt0 register > when work in host mode. > After the root hub enter suspend, we can make controller enter > low power state with PCGCTL r

Re: [PATCH v2] usb: dwc2: add bus suspend/resume for dwc2

2014-11-06 Thread Felipe Balbi
Hi, On Thu, Nov 06, 2014 at 06:35:53PM +, Paul Zimmerman wrote: > > From: Felipe Balbi [mailto:ba...@ti.com] > > Sent: Thursday, November 06, 2014 9:40 AM > > > > On Thu, Nov 06, 2014 at 06:21:42PM +0100, Romain Perier wrote: > > > > > > 2014-11-06 2:30 GMT+01:00 Kever Yang : > > > > > > > >

RE: [PATCH v2] usb: dwc2: add bus suspend/resume for dwc2

2014-11-06 Thread Paul Zimmerman
> From: Felipe Balbi [mailto:ba...@ti.com] > Sent: Thursday, November 06, 2014 9:40 AM > > On Thu, Nov 06, 2014 at 06:21:42PM +0100, Romain Perier wrote: > > > > 2014-11-06 2:30 GMT+01:00 Kever Yang : > > > > > > +static int _dwc2_hcd_suspend(struct usb_hcd *hcd) > > > +{ > > > + struct dwc2

Re: [PATCH v2] usb: dwc2: add bus suspend/resume for dwc2

2014-11-06 Thread Felipe Balbi
On Thu, Nov 06, 2014 at 06:21:42PM +0100, Romain Perier wrote: > Hi Kever, > > > 2014-11-06 2:30 GMT+01:00 Kever Yang : > > > > +static int _dwc2_hcd_suspend(struct usb_hcd *hcd) > > +{ > > + struct dwc2_hsotg *hsotg = dwc2_hcd_to_hsotg(hcd); > > + u32 hprt0; > > + > > + if (!((

Re: [PATCH v2] usb: dwc2: add bus suspend/resume for dwc2

2014-11-06 Thread Romain Perier
Hi Kever, 2014-11-06 2:30 GMT+01:00 Kever Yang : > > +static int _dwc2_hcd_suspend(struct usb_hcd *hcd) > +{ > + struct dwc2_hsotg *hsotg = dwc2_hcd_to_hsotg(hcd); > + u32 hprt0; > + > + if (!((hsotg->op_state == OTG_STATE_B_HOST) || > + (hsotg->op_state == OTG_STA