Re: [PATCH] usb: dwc3: keystone: switch to use runtime pm

2014-01-31 Thread Santosh Shilimkar
On Friday 31 January 2014 05:15 PM, Felipe Balbi wrote: > Hi, > > On Fri, Jan 31, 2014 at 02:20:48PM -0500, Santosh Shilimkar wrote: > > [ snip ] > >>> note that because of pm_runtime_set_active() that first >>> pm_runtime_get_sync() in probe() will simply increase the reference >>> counter with

Re: [PATCH] usb: dwc3: keystone: switch to use runtime pm

2014-01-31 Thread Felipe Balbi
Hi, On Fri, Jan 31, 2014 at 02:20:48PM -0500, Santosh Shilimkar wrote: [ snip ] > > note that because of pm_runtime_set_active() that first > > pm_runtime_get_sync() in probe() will simply increase the reference > > counter without calling my ->runtime_resume() callback, which is exactly > > wha

Re: [PATCH] usb: dwc3: keystone: switch to use runtime pm

2014-01-31 Thread Felipe Balbi
On Fri, Jan 31, 2014 at 04:13:19PM -0500, Alan Stern wrote: > On Fri, 31 Jan 2014, Felipe Balbi wrote: > > > probe() > > { > > ... > > > > clk_get(dev, "fck"); > > clk_prepare(clk); > > clk_enable(clk); > > pm_runtime_set_active(dev); > > pm_runtime_enable(dev); > > pm

Re: [PATCH] usb: dwc3: keystone: switch to use runtime pm

2014-01-31 Thread Alan Stern
On Fri, 31 Jan 2014, Felipe Balbi wrote: > probe() > { > ... > > clk_get(dev, "fck"); > clk_prepare(clk); > clk_enable(clk); > pm_runtime_set_active(dev); > pm_runtime_enable(dev); > pm_runtime_get_sync(dev); > ... > } > note that because of pm_run

Re: [PATCH] usb: dwc3: keystone: switch to use runtime pm

2014-01-31 Thread Santosh Shilimkar
On Friday 31 January 2014 11:45 AM, Felipe Balbi wrote: > On Fri, Jan 31, 2014 at 10:50:40AM -0500, Santosh Shilimkar wrote: >> On Friday 31 January 2014 10:47 AM, Felipe Balbi wrote: >>> On Fri, Jan 31, 2014 at 10:43:21AM -0500, Santosh Shilimkar wrote: On Friday 31 January 2014 10:19 AM, Fel

Re: [PATCH] usb: dwc3: keystone: switch to use runtime pm

2014-01-31 Thread Felipe Balbi
On Fri, Jan 31, 2014 at 10:50:40AM -0500, Santosh Shilimkar wrote: > On Friday 31 January 2014 10:47 AM, Felipe Balbi wrote: > > On Fri, Jan 31, 2014 at 10:43:21AM -0500, Santosh Shilimkar wrote: > >> On Friday 31 January 2014 10:19 AM, Felipe Balbi wrote: > >>> Hi, > >>> > >>> On Fri, Jan 31, 2014

Re: [PATCH] usb: dwc3: keystone: switch to use runtime pm

2014-01-31 Thread Santosh Shilimkar
On Friday 31 January 2014 10:47 AM, Felipe Balbi wrote: > On Fri, Jan 31, 2014 at 10:43:21AM -0500, Santosh Shilimkar wrote: >> On Friday 31 January 2014 10:19 AM, Felipe Balbi wrote: >>> Hi, >>> >>> On Fri, Jan 31, 2014 at 03:20:26PM +0200, Grygorii Strashko wrote: The Keystone PM management

Re: [PATCH] usb: dwc3: keystone: switch to use runtime pm

2014-01-31 Thread Felipe Balbi
On Fri, Jan 31, 2014 at 10:43:21AM -0500, Santosh Shilimkar wrote: > On Friday 31 January 2014 10:19 AM, Felipe Balbi wrote: > > Hi, > > > > On Fri, Jan 31, 2014 at 03:20:26PM +0200, Grygorii Strashko wrote: > >> The Keystone PM management layer has been implemented using PM bus for > >> power man

Re: [PATCH] usb: dwc3: keystone: switch to use runtime pm

2014-01-31 Thread Santosh Shilimkar
On Friday 31 January 2014 10:19 AM, Felipe Balbi wrote: > Hi, > > On Fri, Jan 31, 2014 at 03:20:26PM +0200, Grygorii Strashko wrote: >> The Keystone PM management layer has been implemented using PM bus for >> power management clocks. As result, most of Keystone drivers don't need >> to manage clo

Re: [PATCH] usb: dwc3: keystone: switch to use runtime pm

2014-01-31 Thread Felipe Balbi
Hi, On Fri, Jan 31, 2014 at 03:20:26PM +0200, Grygorii Strashko wrote: > The Keystone PM management layer has been implemented using PM bus for > power management clocks. As result, most of Keystone drivers don't need > to manage clocks directly. They just need to enable runtime PM and use it > to

Re: [PATCH] usb: dwc3: keystone: switch to use runtime pm

2014-01-31 Thread Santosh Shilimkar
On Friday 31 January 2014 08:20 AM, Grygorii Strashko wrote: > The Keystone PM management layer has been implemented using PM bus for > power management clocks. As result, most of Keystone drivers don't need > to manage clocks directly. They just need to enable runtime PM and use it > to handle the

[PATCH] usb: dwc3: keystone: switch to use runtime pm

2014-01-31 Thread Grygorii Strashko
The Keystone PM management layer has been implemented using PM bus for power management clocks. As result, most of Keystone drivers don't need to manage clocks directly. They just need to enable runtime PM and use it to handle their PM state and clocks. Hence, remove clock management code and swit