Re: [PATCH v2] clk: add more managed APIs

2017-01-31 Thread Guenter Roeck
On Tue, Jan 31, 2017 at 10:26:29AM -0800, Dmitry Torokhov wrote: > On Tue, Jan 31, 2017 at 9:20 AM, Guenter Roeck wrote: > > On Mon, Jan 30, 2017 at 04:59:57PM -0800, Dmitry Torokhov wrote: > >> On Mon, Jan 30, 2017 at 11:22:14AM -0800, Guenter Roeck wrote: > >> > On Mon, Jan 30, 2017 at 10:55:51A

Re: [PATCH v2] clk: add more managed APIs

2017-01-31 Thread Dmitry Torokhov
On Tue, Jan 31, 2017 at 9:20 AM, Guenter Roeck wrote: > On Mon, Jan 30, 2017 at 04:59:57PM -0800, Dmitry Torokhov wrote: >> On Mon, Jan 30, 2017 at 11:22:14AM -0800, Guenter Roeck wrote: >> > On Mon, Jan 30, 2017 at 10:55:51AM -0800, Stephen Boyd wrote: >> > > On 01/29, Dmitry Torokhov wrote: >> >

Re: [PATCH v2] clk: add more managed APIs

2017-01-31 Thread Guenter Roeck
On Mon, Jan 30, 2017 at 04:59:57PM -0800, Dmitry Torokhov wrote: > On Mon, Jan 30, 2017 at 11:22:14AM -0800, Guenter Roeck wrote: > > On Mon, Jan 30, 2017 at 10:55:51AM -0800, Stephen Boyd wrote: > > > On 01/29, Dmitry Torokhov wrote: > > > > When converting a driver to managed resources it is desi

Re: [PATCH v2] clk: add more managed APIs

2017-01-31 Thread Geert Uytterhoeven
Hi Günter, On Mon, Jan 30, 2017 at 11:51 PM, Guenter Roeck wrote: > On Mon, Jan 30, 2017 at 09:42:28PM +, Russell King - ARM Linux wrote: >> On Mon, Jan 30, 2017 at 11:22:14AM -0800, Guenter Roeck wrote: >> > Maybe the additional calls make sense; I can imagine they would. >> > However, I per

Re: [PATCH v2] clk: add more managed APIs

2017-01-30 Thread Dmitry Torokhov
On Mon, Jan 30, 2017 at 11:22:14AM -0800, Guenter Roeck wrote: > On Mon, Jan 30, 2017 at 10:55:51AM -0800, Stephen Boyd wrote: > > On 01/29, Dmitry Torokhov wrote: > > > When converting a driver to managed resources it is desirable to be able > > > to > > > manage all resources in the same fashion

Re: [PATCH v2] clk: add more managed APIs

2017-01-30 Thread Guenter Roeck
On Mon, Jan 30, 2017 at 09:42:28PM +, Russell King - ARM Linux wrote: > On Mon, Jan 30, 2017 at 11:22:14AM -0800, Guenter Roeck wrote: > > Maybe the additional calls make sense; I can imagine they would. > > However, I personally would be a bit wary of changing the initialization > > order of m

Re: [PATCH v2] clk: add more managed APIs

2017-01-30 Thread Russell King - ARM Linux
On Mon, Jan 30, 2017 at 01:58:05PM -0800, Dmitry Torokhov wrote: > FWIW I do not think that kitchen sink calls, like > "devm_clk_get_prepare_set_rate_enable" are helpful. Resource > acquisition and use of said resource are logically separate. That alone is an argument against devm_clk_get_prepare_

Re: [PATCH v2] clk: add more managed APIs

2017-01-30 Thread Dmitry Torokhov
On Mon, Jan 30, 2017 at 1:42 PM, Russell King - ARM Linux wrote: > On Mon, Jan 30, 2017 at 11:22:14AM -0800, Guenter Roeck wrote: >> Maybe the additional calls make sense; I can imagine they would. >> However, I personally would be a bit wary of changing the initialization >> order of multi-clock

Re: [PATCH v2] clk: add more managed APIs

2017-01-30 Thread Russell King - ARM Linux
On Mon, Jan 30, 2017 at 11:22:14AM -0800, Guenter Roeck wrote: > Maybe the additional calls make sense; I can imagine they would. > However, I personally would be a bit wary of changing the initialization > order of multi-clock initializations, and I am not sure how a single call > could address se

Re: [PATCH v2] clk: add more managed APIs

2017-01-30 Thread Guenter Roeck
On Mon, Jan 30, 2017 at 10:55:51AM -0800, Stephen Boyd wrote: > On 01/29, Dmitry Torokhov wrote: > > When converting a driver to managed resources it is desirable to be able to > > manage all resources in the same fashion. This change allows managing > > clocks in the same way we manage many other

Re: [PATCH v2] clk: add more managed APIs

2017-01-30 Thread Stephen Boyd
On 01/29, Dmitry Torokhov wrote: > When converting a driver to managed resources it is desirable to be able to > manage all resources in the same fashion. This change allows managing > clocks in the same way we manage many other resources. Can you please add 'managing clock prepared and enabled st

Re: [PATCH v2] clk: add more managed APIs

2017-01-29 Thread Guenter Roeck
On 01/29/2017 10:07 AM, Dmitry Torokhov wrote: When converting a driver to managed resources it is desirable to be able to manage all resources in the same fashion. This change allows managing clocks in the same way we manage many other resources. This adds the following managed APIs: - devm_cl

[PATCH v2] clk: add more managed APIs

2017-01-29 Thread Dmitry Torokhov
When converting a driver to managed resources it is desirable to be able to manage all resources in the same fashion. This change allows managing clocks in the same way we manage many other resources. This adds the following managed APIs: - devm_clk_prepare()/devm_clk_unprepare(); - devm_clk_prep