Re: Question about suspend/resume clock handling in dwc3-of-simple.c

2016-09-13 Thread Felipe Balbi
Hi, Guenter Roeck writes: > On 09/12/2016 10:35 PM, Felipe Balbi wrote: >> >> Hi, >> >> Guenter Roeck writes: > Should it be clk_disable_unprepare(), or maybe something like the > following > > if (!pm_runtime_status_suspended(dev)) > clk_disable_unprepare(); >>>

Re: Question about suspend/resume clock handling in dwc3-of-simple.c

2016-09-13 Thread Guenter Roeck
On 09/12/2016 10:35 PM, Felipe Balbi wrote: Hi, Guenter Roeck writes: Should it be clk_disable_unprepare(), or maybe something like the following if (!pm_runtime_status_suspended(dev)) clk_disable_unprepare(); else clk_unprepare(); I'm not su

Re: Question about suspend/resume clock handling in dwc3-of-simple.c

2016-09-12 Thread Felipe Balbi
Hi, Guenter Roeck writes: >> > Should it be clk_disable_unprepare(), or maybe something like the >> > following >> > >> >if (!pm_runtime_status_suspended(dev)) >> >clk_disable_unprepare(); >> >else >> >clk_unprepare(); >> >> I'm not sure how balanced those calls

Re: Question about suspend/resume clock handling in dwc3-of-simple.c

2016-09-12 Thread Guenter Roeck
Hi Felipe, On Mon, Sep 12, 2016 at 10:05:00PM +0300, Felipe Balbi wrote: > > Hi Guenter, > > Guenter Roeck writes: > > Hi folks, > > > > In dwc3-of-simple.c:dwc3_of_simple_remove(), I see the following code. > > > > for (i = 0; i < simple->num_clocks; i++) { > > clk_unprepar

Re: Question about suspend/resume clock handling in dwc3-of-simple.c

2016-09-12 Thread Felipe Balbi
Hi Guenter, Guenter Roeck writes: > Hi folks, > > In dwc3-of-simple.c:dwc3_of_simple_remove(), I see the following code. > > for (i = 0; i < simple->num_clocks; i++) { > clk_unprepare(simple->clks[i]); > clk_put(simple->clks[i]); > } > > What I don't und

Question about suspend/resume clock handling in dwc3-of-simple.c

2016-09-12 Thread Guenter Roeck
Hi folks, In dwc3-of-simple.c:dwc3_of_simple_remove(), I see the following code. for (i = 0; i < simple->num_clocks; i++) { clk_unprepare(simple->clks[i]); clk_put(simple->clks[i]); } What I don't understand is why clk_unprepare() is called instead