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 ne

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

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_

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. > > > >

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

2013-03-19 Thread Bill Huang
d notifier events are: PRE_CLK_PREPARE POST_CLK_PREPARE ABORT_CLK_PREPARE PRE_CLK_UNPREPARE POST_CLK_UNPREPARE Signed-off-by: Bill Huang --- drivers/clk/clk.c | 88 ++- include/linux/clk.h |5 +++ 2 files changed, 57 insertions(+), 36

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 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 > &g

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 > >> knowi

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 u

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

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 Schrijve

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 t

[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 --- drivers/clk/clk.c | 75

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 &

[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 --- drivers/clk/clk.c |3

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 i

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 wro

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 -

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 notifi

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 >

[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: [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 u

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 (

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 clk_set

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

2013-02-28 Thread Bill Huang
Mike Turquette 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 an affecte