Re: [PATCH 1/5] clk: allow reentrant calls into the clk framework

2013-03-26 Thread Bill Huang
On Thu, 2013-02-28 at 12:49 +0800, Mike Turquette wrote: Reentrancy into the clock framework from the clk.h api is highly desirable. This feature is necessary for clocks that are prepared and unprepared via i2c_transfer (which includes many PMICs and discrete audio chips) and it is also

Re: [PATCH 1/1] clk: Add notifier support in clk_prepare/clk_unprepare

2013-03-20 Thread Bill Huang
On Wed, 2013-03-20 at 22:47 +0800, Mike Turquette wrote: Quoting Bill Huang (2013-03-19 21:39:44) On Wed, 2013-03-20 at 11:31 +0800, Mike Turquette wrote: Quoting Bill Huang (2013-03-19 19:55:49) On Wed, 2013-03-20 at 01:01 +0800, Mike Turquette wrote: I'm still not sure about

Re: [PATCH 1/1] clk: Add notifier support in clk_prepare/clk_unprepare

2013-03-19 Thread Bill Huang
On Wed, 2013-03-20 at 01:01 +0800, Mike Turquette wrote: Quoting Bill Huang (2013-03-19 06:28:32) Add notifier calls in clk_prepare and clk_unprepare so drivers which are interested in knowing that clk_prepare/unprepare call can act accordingly. The existing clk_set_rate notifier

Re: [PATCH 1/1] clk: Add notifier support in clk_prepare/clk_unprepare

2013-03-19 Thread Bill Huang
On Wed, 2013-03-20 at 11:31 +0800, Mike Turquette wrote: Quoting Bill Huang (2013-03-19 19:55:49) On Wed, 2013-03-20 at 01:01 +0800, Mike Turquette wrote: Quoting Bill Huang (2013-03-19 06:28:32) Add notifier calls in clk_prepare and clk_unprepare so drivers which are interested

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 pdeschrij...@nvidia.com 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

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 bilhu...@nvidia.com 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

Re: [RFC v2 1/1] clk: Add notifier support in clk_prepare/clk_unprepare

2013-03-15 Thread Bill Huang
On Sat, 2013-03-16 at 03:51 +0800, Stephen Warren wrote: On 03/15/2013 11:45 AM, Russell King - ARM Linux wrote: On Thu, Mar 14, 2013 at 02:31:04AM -0700, Bill Huang wrote: Add the below two notifier events so drivers which are interested in knowing the clock status can act accordingly

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, some

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 changes

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, we have

[RFC v2 1/1] clk: Add notifier support in clk_prepare/clk_unprepare

2013-03-14 Thread Bill Huang
Add the below two 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. CLK_PREPARED CLK_UNPREPARED Signed-off-by: Bill Huang bilhu...@nvidia.com --- drivers/clk

Re: [RFC v2 1/1] clk: Add notifier support in clk_prepare/clk_unprepare

2013-03-14 Thread Bill Huang
On Thu, 2013-03-14 at 17:31 +0800, Bill Huang wrote: Add the below two 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. CLK_PREPARED CLK_UNPREPARED

[RFC v3 1/1] clk: Add notifier support in clk_prepare/clk_unprepare

2013-03-14 Thread Bill Huang
Add the below two 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. CLK_PREPARED CLK_UNPREPARED Signed-off-by: Bill Huang bilhu...@nvidia.com --- drivers/clk

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 usage

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, 2013 at 03:15

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 PM, Bill Huang

[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

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 DVFS

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

Re: [PATCH 2/5] clk: notifier handler for dynamic voltage scaling

2013-03-01 Thread Bill Huang
On Thu, 2013-02-28 at 12:49 +0800, Mike Turquette wrote: Dynamic voltage and frequency scaling (dvfs) is a common power saving technique in many of today's modern processors. This patch introduces a common clk rate-change notifier handler which scales voltage appropriately whenever

Re: [PATCH 2/5] clk: notifier handler for dynamic voltage scaling

2013-03-01 Thread Bill Huang
On Sat, 2013-03-02 at 04:48 +0800, Mike Turquette wrote: Quoting Mike Turquette (2013-03-01 10:22:34) Quoting Bill Huang (2013-03-01 01:41:31) On Thu, 2013-02-28 at 12:49 +0800, Mike Turquette wrote: Dynamic voltage and frequency scaling (dvfs) is a common power saving technique

Re: [PATCH 2/5] clk: notifier handler for dynamic voltage scaling

2013-03-01 Thread Bill Huang
On Sat, 2013-03-02 at 04:49 +0800, Stephen Warren wrote: On 03/01/2013 02:41 AM, Bill Huang wrote: On Thu, 2013-02-28 at 12:49 +0800, Mike Turquette wrote: There are three prerequisites to using this feature: 1) the affected clocks must be using the common clk framework 2) voltage must

Re: [PATCH 2/5] clk: notifier handler for dynamic voltage scaling

2013-02-28 Thread Bill Huang
Mike Turquette mturquette@... writes: Dynamic voltage and frequency scaling (dvfs) is a common power saving technique in many of today's modern processors. This patch introduces a common clk rate-change notifier handler which scales voltage appropriately whenever clk_set_rate is called on