Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-21 Thread Mike Turquette
Quoting Ulf Hansson (2013-03-18 03:36:29) > On 15 March 2013 20:38, Stephen Warren wrote: > > On 03/15/2013 06:33 AM, Ulf Hansson wrote: > >> On 15 March 2013 13:06, Bill Huang wrote: > >>> On Fri, 2013-03-15 at 18:08 +0800, Ulf Hansson wrote: > > ... > Some prerequisites; I think am in favo

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-18 Thread Ulf Hansson
On 15 March 2013 20:38, Stephen Warren wrote: > On 03/15/2013 06:33 AM, Ulf Hansson wrote: >> On 15 March 2013 13:06, Bill Huang wrote: >>> On Fri, 2013-03-15 at 18:08 +0800, Ulf Hansson wrote: > ... Some prerequisites; I think am in favor of using the clk API to trigger DVFS changes an

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-15 Thread Bill Huang
On Sat, 2013-03-16 at 01:09 +0800, Russell King - ARM Linux wrote: > On Tue, Mar 12, 2013 at 10:40:04PM -0700, Bill Huang wrote: > > That will be too bad, it looks like we deadlock in the mechanism, we > > cannot change existing drivers behavior (that means some call > > clk_disable/enable directly

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-15 Thread Bill Huang
On Fri, 2013-03-15 at 20:33 +0800, Ulf Hansson wrote: > I guess you did not fully got what I meant with "dvfs clock type". It > will not affect the clock API. But instead the dvfs is handled by > implementing a specific clk hw type. So the same thing is accomplished > as with clk notifiers, no chan

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-15 Thread Bill Huang
On Sat, 2013-03-16 at 03:38 +0800, Stephen Warren wrote: > On 03/15/2013 06:33 AM, Ulf Hansson wrote: > > On 15 March 2013 13:06, Bill Huang wrote: > >> On Fri, 2013-03-15 at 18:08 +0800, Ulf Hansson wrote: > ... > >>> Some prerequisites; I think am in favor of using the clk API to > >>> trigger D

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-15 Thread Stephen Warren
On 03/15/2013 06:33 AM, Ulf Hansson wrote: > On 15 March 2013 13:06, Bill Huang wrote: >> On Fri, 2013-03-15 at 18:08 +0800, Ulf Hansson wrote: ... >>> Some prerequisites; I think am in favor of using the clk API to >>> trigger DVFS changes and then I agree on that clk_prepare|unprepare >>> needs

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-15 Thread Nicolas Pitre
On Fri, 15 Mar 2013, Russell King - ARM Linux wrote: > On Tue, Mar 12, 2013 at 06:47:53PM -0700, Bill Huang wrote: > > On Tue, 2013-03-12 at 21:40 +0800, Russell King - ARM Linux wrote: > > > On Tue, Mar 12, 2013 at 05:37:41AM -0700, Bill Huang wrote: > > > > Add the below four notifier events so

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-15 Thread Russell King - ARM Linux
On Thu, Mar 14, 2013 at 11:22:47PM -0600, Stephen Warren wrote: > Is clk_set_rate() only legal to call in non-atomic contexts then? The > header file doesn't say, although I guess since many other functions > explicitly say they can't, then by omission it can... I think when all this was discussed

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-15 Thread Russell King - ARM Linux
On Tue, Mar 12, 2013 at 10:40:04PM -0700, Bill Huang wrote: > That will be too bad, it looks like we deadlock in the mechanism, we > cannot change existing drivers behavior (that means some call > clk_disable/enable directly, some are not), and we cannot hook notifier > in clk_disable/enable either

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-15 Thread Russell King - ARM Linux
On Tue, Mar 12, 2013 at 10:42:30PM -0600, Stephen Warren wrote: > I believe the point Russell is making is not that the idea behind this > patch is wrong, but simply that the function where you put the hooks is > wrong. The hooks should at least be in clk_enable/clk_disable and not Indeed, remembe

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-15 Thread Russell King - ARM Linux
On Tue, Mar 12, 2013 at 06:47:53PM -0700, Bill Huang wrote: > On Tue, 2013-03-12 at 21:40 +0800, Russell King - ARM Linux wrote: > > On Tue, Mar 12, 2013 at 05:37:41AM -0700, Bill Huang wrote: > > > Add the below four notifier events so drivers which are interested in > > > knowing the clock status

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-15 Thread Ulf Hansson
On 15 March 2013 13:06, Bill Huang wrote: > On Fri, 2013-03-15 at 18:08 +0800, Ulf Hansson wrote: >> On 15 March 2013 10:39, Peter De Schrijver wrote: >> > On Fri, Mar 15, 2013 at 06:22:47AM +0100, Stephen Warren wrote: >> >> On 03/14/2013 07:20 PM, Bill Huang wrote: >> >> > On Fri, 2013-03-15 at

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-15 Thread Bill Huang
On Fri, 2013-03-15 at 18:08 +0800, Ulf Hansson wrote: > On 15 March 2013 10:39, Peter De Schrijver wrote: > > On Fri, Mar 15, 2013 at 06:22:47AM +0100, Stephen Warren wrote: > >> On 03/14/2013 07:20 PM, Bill Huang wrote: > >> > On Fri, 2013-03-15 at 01:54 +0800, Stephen Warren wrote: > >> >> On 03

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-15 Thread Ulf Hansson
On 15 March 2013 10:39, Peter De Schrijver wrote: > On Fri, Mar 15, 2013 at 06:22:47AM +0100, Stephen Warren wrote: >> On 03/14/2013 07:20 PM, Bill Huang wrote: >> > On Fri, 2013-03-15 at 01:54 +0800, Stephen Warren wrote: >> >> On 03/14/2013 03:28 AM, Bill Huang wrote: >> >>> On Thu, 2013-03-14 a

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-15 Thread Peter De Schrijver
On Fri, Mar 15, 2013 at 06:22:47AM +0100, Stephen Warren wrote: > On 03/14/2013 07:20 PM, Bill Huang wrote: > > On Fri, 2013-03-15 at 01:54 +0800, Stephen Warren wrote: > >> On 03/14/2013 03:28 AM, Bill Huang wrote: > >>> On Thu, 2013-03-14 at 17:21 +0800, Peter De Schrijver wrote: > On Thu, M

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-14 Thread Bill Huang
On Fri, 2013-03-15 at 13:22 +0800, Stephen Warren wrote: > On 03/14/2013 07:20 PM, Bill Huang wrote: > > On Fri, 2013-03-15 at 01:54 +0800, Stephen Warren wrote: > >> On 03/14/2013 03:28 AM, Bill Huang wrote: > >>> On Thu, 2013-03-14 at 17:21 +0800, Peter De Schrijver wrote: > On Thu, Mar 14,

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-14 Thread Stephen Warren
On 03/14/2013 07:20 PM, Bill Huang wrote: > On Fri, 2013-03-15 at 01:54 +0800, Stephen Warren wrote: >> On 03/14/2013 03:28 AM, Bill Huang wrote: >>> On Thu, 2013-03-14 at 17:21 +0800, Peter De Schrijver wrote: On Thu, Mar 14, 2013 at 03:15:11AM +0100, Bill Huang wrote: > I don't thin

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-14 Thread Bill Huang
On Fri, 2013-03-15 at 01:54 +0800, Stephen Warren wrote: > On 03/14/2013 03:28 AM, Bill Huang wrote: > > On Thu, 2013-03-14 at 17:21 +0800, Peter De Schrijver wrote: > >> On Thu, Mar 14, 2013 at 03:15:11AM +0100, Bill Huang wrote: > >> > >>> I don't think deferring will work either, considering the

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-14 Thread Stephen Warren
On 03/14/2013 03:28 AM, Bill Huang wrote: > On Thu, 2013-03-14 at 17:21 +0800, Peter De Schrijver wrote: >> On Thu, Mar 14, 2013 at 03:15:11AM +0100, Bill Huang wrote: >> >>> I don't think deferring will work either, considering the usage of DVFS, >>> device voltage is tightly coupled with frequenc

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-14 Thread Bill Huang
On Thu, 2013-03-14 at 17:21 +0800, Peter De Schrijver wrote: > On Thu, Mar 14, 2013 at 03:15:11AM +0100, Bill Huang wrote: > > > I don't think deferring will work either, considering the usage of DVFS, > > device voltage is tightly coupled with frequency, when clock rate is > > about to increase,

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-14 Thread Peter De Schrijver
On Thu, Mar 14, 2013 at 03:15:11AM +0100, Bill Huang wrote: > I don't think deferring will work either, considering the usage of DVFS, > device voltage is tightly coupled with frequency, when clock rate is > about to increase, we have to boost voltage first and we can lower the > voltage after the

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-13 Thread Bill Huang
On Thu, 2013-03-14 at 02:10 +0800, Stephen Warren wrote: > On 03/12/2013 11:40 PM, Bill Huang wrote: > > On Wed, 2013-03-13 at 13:24 +0800, Stephen Warren wrote: > >> On 03/12/2013 11:08 PM, Bill Huang wrote: > >>> On Wed, 2013-03-13 at 12:42 +0800, Stephen Warren wrote: > On 03/12/2013 07:47

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-13 Thread Stephen Warren
On 03/12/2013 11:40 PM, Bill Huang wrote: > On Wed, 2013-03-13 at 13:24 +0800, Stephen Warren wrote: >> On 03/12/2013 11:08 PM, Bill Huang wrote: >>> On Wed, 2013-03-13 at 12:42 +0800, Stephen Warren wrote: On 03/12/2013 07:47 PM, Bill Huang wrote: > On Tue, 2013-03-12 at 21:40 +0800, Russ

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-12 Thread Bill Huang
On Wed, 2013-03-13 at 13:24 +0800, Stephen Warren wrote: > On 03/12/2013 11:08 PM, Bill Huang wrote: > > On Wed, 2013-03-13 at 12:42 +0800, Stephen Warren wrote: > >> On 03/12/2013 07:47 PM, Bill Huang wrote: > >>> On Tue, 2013-03-12 at 21:40 +0800, Russell King - ARM Linux wrote: > On Tue, Ma

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-12 Thread Stephen Warren
On 03/12/2013 11:08 PM, Bill Huang wrote: > On Wed, 2013-03-13 at 12:42 +0800, Stephen Warren wrote: >> On 03/12/2013 07:47 PM, Bill Huang wrote: >>> On Tue, 2013-03-12 at 21:40 +0800, Russell King - ARM Linux wrote: On Tue, Mar 12, 2013 at 05:37:41AM -0700, Bill Huang wrote: > Add the bel

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-12 Thread Bill Huang
On Wed, 2013-03-13 at 12:42 +0800, Stephen Warren wrote: > On 03/12/2013 07:47 PM, Bill Huang wrote: > > On Tue, 2013-03-12 at 21:40 +0800, Russell King - ARM Linux wrote: > >> On Tue, Mar 12, 2013 at 05:37:41AM -0700, Bill Huang wrote: > >>> Add the below four notifier events so drivers which are

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-12 Thread Stephen Warren
On 03/12/2013 07:47 PM, Bill Huang wrote: > On Tue, 2013-03-12 at 21:40 +0800, Russell King - ARM Linux wrote: >> On Tue, Mar 12, 2013 at 05:37:41AM -0700, Bill Huang wrote: >>> Add the below four notifier events so drivers which are interested in >>> knowing the clock status can act accordingly. T

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-12 Thread Bill Huang
On Tue, 2013-03-12 at 21:40 +0800, Russell King - ARM Linux wrote: > On Tue, Mar 12, 2013 at 05:37:41AM -0700, Bill Huang wrote: > > Add the below four notifier events so drivers which are interested in > > knowing the clock status can act accordingly. This is extremely useful > > in some of the DV

Re: [RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-12 Thread Russell King - ARM Linux
On Tue, Mar 12, 2013 at 05:37:41AM -0700, Bill Huang wrote: > Add the below four notifier events so drivers which are interested in > knowing the clock status can act accordingly. This is extremely useful > in some of the DVFS (Dynamic Voltage Frequency Scaling) design. > > PRE_CLK_ENABLE > POST_C

[RFC 1/1] clk: Add notifier support in clk_prepare_enable/clk_disable_unprepare

2013-03-12 Thread Bill Huang
Add the below four notifier events so drivers which are interested in knowing the clock status can act accordingly. This is extremely useful in some of the DVFS (Dynamic Voltage Frequency Scaling) design. PRE_CLK_ENABLE POST_CLK_ENABLE PRE_CLK_DISABLE POST_CLK_DISABLE Signed-off-by: Bill Huang -