* Re: [RFC - PATCH] base:pm: prepare driver for common clock framework
[not found] <1347661174-15404-1-git-send-email-m-karicheri2@ti.com>
@ 2012-09-18 21:34 ` Rafael J. Wysocki
2012-09-19 14:09 ` Karicheri, Muralidharan
0 siblings, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2012-09-18 21:34 UTC (permalink / raw)
To: Murali Karicheri
Cc: linux-pm, linux-kernel, cyril, mturquette, Magnus Damm,
Linux-sh list
On Saturday, September 15, 2012, Murali Karicheri wrote:
> As part of my work to migrate davinci SoC code to
> use common clk framework, I encountered an issue with this driver
> which is calling clk_enable() and clk_disable() without prepare()/
> unprepare(). This change is needed to enable common clock migration
> for davinci SoCs.
>
> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
There are other users of this code than davinci. For example, sh
and ARM/shmobile both use it. Have you verified that your changes will
work for them too?
Rafael
> diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c
> index eb78e96..9d8fde7 100644
> --- a/drivers/base/power/clock_ops.c
> +++ b/drivers/base/power/clock_ops.c
> @@ -99,7 +99,7 @@ static void __pm_clk_remove(struct pm_clock_entry *ce)
>
> if (ce->status < PCE_STATUS_ERROR) {
> if (ce->status = PCE_STATUS_ENABLED)
> - clk_disable(ce->clk);
> + clk_disable_unprepare(ce->clk);
>
> if (ce->status >= PCE_STATUS_ACQUIRED)
> clk_put(ce->clk);
> @@ -396,7 +396,7 @@ static void enable_clock(struct device *dev, const char *con_id)
>
> clk = clk_get(dev, con_id);
> if (!IS_ERR(clk)) {
> - clk_enable(clk);
> + clk_prepare_enable(clk);
> clk_put(clk);
> dev_info(dev, "Runtime PM disabled, clock forced on.\n");
> }
> @@ -413,7 +413,7 @@ static void disable_clock(struct device *dev, const char *con_id)
>
> clk = clk_get(dev, con_id);
> if (!IS_ERR(clk)) {
> - clk_disable(clk);
> + clk_disable_unprepare(clk);
> clk_put(clk);
> dev_info(dev, "Runtime PM disabled, clock forced off.\n");
> }
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [RFC - PATCH] base:pm: prepare driver for common clock framework
2012-09-18 21:34 ` [RFC - PATCH] base:pm: prepare driver for common clock framework Rafael J. Wysocki
@ 2012-09-19 14:09 ` Karicheri, Muralidharan
2012-09-19 14:13 ` Karicheri, Muralidharan
2012-09-19 20:53 ` Rafael J. Wysocki
0 siblings, 2 replies; 4+ messages in thread
From: Karicheri, Muralidharan @ 2012-09-19 14:09 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
Chemparathy, Cyril, mturquette@linaro.org, Magnus Damm,
Linux-sh list
>> -----Original Message-----
>> From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
>> Sent: Tuesday, September 18, 2012 5:34 PM
>> To: Karicheri, Muralidharan
>> Cc: linux-pm@vger.kernel.org; linux-kernel@vger.kernel.org; Chemparathy, Cyril;
>> mturquette@linaro.org; Magnus Damm; Linux-sh list
>> Subject: Re: [RFC - PATCH] base:pm: prepare driver for common clock framework
>>
>> On Saturday, September 15, 2012, Murali Karicheri wrote:
>> > As part of my work to migrate davinci SoC code to
>> > use common clk framework, I encountered an issue with this driver
>> > which is calling clk_enable() and clk_disable() without prepare()/
>> > unprepare(). This change is needed to enable common clock migration
>> > for davinci SoCs.
>> >
>> > Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
>>
>> There are other users of this code than davinci. For example, sh
>> and ARM/shmobile both use it. Have you verified that your changes will
>> work for them too?
>>
Rafael,
Technically do you agree with the changes or do I need to get it reviewed by someone in particular? I have no way of verifying if this works for sh and ARM/shmobile. I have copied this RFC patch to the list showed up by scripts/get_maintainer.pl list. Any idea how I can get this patch reviewed by the sh and ARM/shmobile maintainers and get it tested as well? This is required for DaVinci for sure unless there is an alternate way of doing this. Well, then that is the idea of sending an RFC patch.
-Murali
>> Rafael
>>
>>
>> > diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c
>> > index eb78e96..9d8fde7 100644
>> > --- a/drivers/base/power/clock_ops.c
>> > +++ b/drivers/base/power/clock_ops.c
>> > @@ -99,7 +99,7 @@ static void __pm_clk_remove(struct pm_clock_entry *ce)
>> >
>> > if (ce->status < PCE_STATUS_ERROR) {
>> > if (ce->status = PCE_STATUS_ENABLED)
>> > - clk_disable(ce->clk);
>> > + clk_disable_unprepare(ce->clk);
>> >
>> > if (ce->status >= PCE_STATUS_ACQUIRED)
>> > clk_put(ce->clk);
>> > @@ -396,7 +396,7 @@ static void enable_clock(struct device *dev, const char
>> *con_id)
>> >
>> > clk = clk_get(dev, con_id);
>> > if (!IS_ERR(clk)) {
>> > - clk_enable(clk);
>> > + clk_prepare_enable(clk);
>> > clk_put(clk);
>> > dev_info(dev, "Runtime PM disabled, clock forced on.\n");
>> > }
>> > @@ -413,7 +413,7 @@ static void disable_clock(struct device *dev, const char
>> *con_id)
>> >
>> > clk = clk_get(dev, con_id);
>> > if (!IS_ERR(clk)) {
>> > - clk_disable(clk);
>> > + clk_disable_unprepare(clk);
>> > clk_put(clk);
>> > dev_info(dev, "Runtime PM disabled, clock forced off.\n");
>> > }
>> >
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [RFC - PATCH] base:pm: prepare driver for common clock framework
2012-09-19 14:09 ` Karicheri, Muralidharan
@ 2012-09-19 14:13 ` Karicheri, Muralidharan
2012-09-19 20:53 ` Rafael J. Wysocki
1 sibling, 0 replies; 4+ messages in thread
From: Karicheri, Muralidharan @ 2012-09-19 14:13 UTC (permalink / raw)
To: Karicheri, Muralidharan, Rafael J. Wysocki, Len Brown
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
Chemparathy, Cyril, mturquette@linaro.org, Magnus Damm,
Linux-sh list
+ Len Brown
>> -----Original Message-----
>> From: linux-pm-owner@vger.kernel.org [mailto:linux-pm-owner@vger.kernel.org] On
>> Behalf Of Karicheri, Muralidharan
>> Sent: Wednesday, September 19, 2012 10:09 AM
>> To: Rafael J. Wysocki
>> Cc: linux-pm@vger.kernel.org; linux-kernel@vger.kernel.org; Chemparathy, Cyril;
>> mturquette@linaro.org; Magnus Damm; Linux-sh list
>> Subject: RE: [RFC - PATCH] base:pm: prepare driver for common clock framework
>>
>> >> -----Original Message-----
>> >> From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
>> >> Sent: Tuesday, September 18, 2012 5:34 PM
>> >> To: Karicheri, Muralidharan
>> >> Cc: linux-pm@vger.kernel.org; linux-kernel@vger.kernel.org; Chemparathy, Cyril;
>> >> mturquette@linaro.org; Magnus Damm; Linux-sh list
>> >> Subject: Re: [RFC - PATCH] base:pm: prepare driver for common clock framework
>> >>
>> >> On Saturday, September 15, 2012, Murali Karicheri wrote:
>> >> > As part of my work to migrate davinci SoC code to
>> >> > use common clk framework, I encountered an issue with this driver
>> >> > which is calling clk_enable() and clk_disable() without prepare()/
>> >> > unprepare(). This change is needed to enable common clock migration
>> >> > for davinci SoCs.
>> >> >
>> >> > Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
>> >>
>> >> There are other users of this code than davinci. For example, sh
>> >> and ARM/shmobile both use it. Have you verified that your changes will
>> >> work for them too?
>> >>
>> Rafael,
>>
>> Technically do you agree with the changes or do I need to get it reviewed by someone in
>> particular? I have no way of verifying if this works for sh and ARM/shmobile. I have
>> copied this RFC patch to the list showed up by scripts/get_maintainer.pl list. Any idea
>> how I can get this patch reviewed by the sh and ARM/shmobile maintainers and get it
>> tested as well? This is required for DaVinci for sure unless there is an alternate way of
>> doing this. Well, then that is the idea of sending an RFC patch.
>>
>> -Murali
>>
>> >> Rafael
>> >>
>> >>
>> >> > diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c
>> >> > index eb78e96..9d8fde7 100644
>> >> > --- a/drivers/base/power/clock_ops.c
>> >> > +++ b/drivers/base/power/clock_ops.c
>> >> > @@ -99,7 +99,7 @@ static void __pm_clk_remove(struct pm_clock_entry *ce)
>> >> >
>> >> > if (ce->status < PCE_STATUS_ERROR) {
>> >> > if (ce->status = PCE_STATUS_ENABLED)
>> >> > - clk_disable(ce->clk);
>> >> > + clk_disable_unprepare(ce->clk);
>> >> >
>> >> > if (ce->status >= PCE_STATUS_ACQUIRED)
>> >> > clk_put(ce->clk);
>> >> > @@ -396,7 +396,7 @@ static void enable_clock(struct device *dev, const char
>> >> *con_id)
>> >> >
>> >> > clk = clk_get(dev, con_id);
>> >> > if (!IS_ERR(clk)) {
>> >> > - clk_enable(clk);
>> >> > + clk_prepare_enable(clk);
>> >> > clk_put(clk);
>> >> > dev_info(dev, "Runtime PM disabled, clock forced on.\n");
>> >> > }
>> >> > @@ -413,7 +413,7 @@ static void disable_clock(struct device *dev, const char
>> >> *con_id)
>> >> >
>> >> > clk = clk_get(dev, con_id);
>> >> > if (!IS_ERR(clk)) {
>> >> > - clk_disable(clk);
>> >> > + clk_disable_unprepare(clk);
>> >> > clk_put(clk);
>> >> > dev_info(dev, "Runtime PM disabled, clock forced off.\n");
>> >> > }
>> >> >
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC - PATCH] base:pm: prepare driver for common clock framework
2012-09-19 14:09 ` Karicheri, Muralidharan
2012-09-19 14:13 ` Karicheri, Muralidharan
@ 2012-09-19 20:53 ` Rafael J. Wysocki
1 sibling, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2012-09-19 20:53 UTC (permalink / raw)
To: Karicheri, Muralidharan
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
Chemparathy, Cyril, mturquette@linaro.org, Magnus Damm,
Linux-sh list
On Wednesday, September 19, 2012, Karicheri, Muralidharan wrote:
> >> -----Original Message-----
> >> From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
> >> Sent: Tuesday, September 18, 2012 5:34 PM
> >> To: Karicheri, Muralidharan
> >> Cc: linux-pm@vger.kernel.org; linux-kernel@vger.kernel.org; Chemparathy, Cyril;
> >> mturquette@linaro.org; Magnus Damm; Linux-sh list
> >> Subject: Re: [RFC - PATCH] base:pm: prepare driver for common clock framework
> >>
> >> On Saturday, September 15, 2012, Murali Karicheri wrote:
> >> > As part of my work to migrate davinci SoC code to
> >> > use common clk framework, I encountered an issue with this driver
> >> > which is calling clk_enable() and clk_disable() without prepare()/
> >> > unprepare(). This change is needed to enable common clock migration
> >> > for davinci SoCs.
> >> >
> >> > Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
> >>
> >> There are other users of this code than davinci. For example, sh
> >> and ARM/shmobile both use it. Have you verified that your changes will
> >> work for them too?
> >>
> Rafael,
>
> Technically do you agree with the changes or do I need to get it reviewed
> by someone in particular?
You may ask the people on the linux-sh list to review your patch, but there's
no guarantee that anyone will have the time to do that.
> I have no way of verifying if this works for sh and
> ARM/shmobile. I have copied this RFC patch to the list showed up by
> scripts/get_maintainer.pl list.
Well, you can send whatever you like as an RFC, but if you request that the
patch be merged, it should be submitted without the "RFC" in the subject.
> Any idea how I can get this patch reviewed by
> the sh and ARM/shmobile maintainers and get it tested as well? This is
> required for DaVinci for sure unless there is an alternate way of doing this.
> Well, then that is the idea of sending an RFC patch.
The general rule is that if you want a change to be made in the core, you
have to make sure that your change won't cause problems to happen to
anyone. If you don't do that and your change turns out to cause problems
to happen after it's been applied, it will be reverted anyway.
Thanks,
Rafael
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-09-19 20:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1347661174-15404-1-git-send-email-m-karicheri2@ti.com>
2012-09-18 21:34 ` [RFC - PATCH] base:pm: prepare driver for common clock framework Rafael J. Wysocki
2012-09-19 14:09 ` Karicheri, Muralidharan
2012-09-19 14:13 ` Karicheri, Muralidharan
2012-09-19 20:53 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).