* [PATCH] PM / Runtime: Handle clocks correctly if CONFIG_PM_RUNTIME is unset
@ 2011-06-20 23:28 Rafael J. Wysocki
2011-06-21 7:10 ` [PATCH] PM / Runtime: Handle clocks correctly if Magnus Damm
0 siblings, 1 reply; 2+ messages in thread
From: Rafael J. Wysocki @ 2011-06-20 23:28 UTC (permalink / raw)
To: Linux PM mailing list; +Cc: Kevin Hilman, Magnus Damm, LKML, linux-sh
From: Rafael J. Wysocki <rjw@sisk.pl>
Commit 85eb8c8d0b0900c073b0e6f89979ac9c439ade1a (PM / Runtime:
Generic clock manipulation rountines for runtime PM (v6)) converted
the shmobile platform to using generic code for runtime PM clock
management, but it changed the behavior for CONFIG_PM_RUNTIME unset
incorrectly.
Specifically, for CONFIG_PM_RUNTIME unset pm_runtime_clk_notify()
should enable clocks for action equal to BUS_NOTIFY_BIND_DRIVER and
it should disable them for action equal to BUS_NOTIFY_UNBOUND_DRIVER
(instead of BUS_NOTIFY_ADD_DEVICE and BUS_NOTIFY_DEL_DEVICE,
respectively). Make this function behave as appropriate.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
drivers/base/power/clock_ops.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux-2.6/drivers/base/power/clock_ops.c
=================================--- linux-2.6.orig/drivers/base/power/clock_ops.c
+++ linux-2.6/drivers/base/power/clock_ops.c
@@ -387,7 +387,7 @@ static int pm_runtime_clk_notify(struct
clknb = container_of(nb, struct pm_clk_notifier_block, nb);
switch (action) {
- case BUS_NOTIFY_ADD_DEVICE:
+ case BUS_NOTIFY_BIND_DRIVER:
if (clknb->con_ids[0]) {
for (con_id = clknb->con_ids; *con_id; con_id++)
enable_clock(dev, *con_id);
@@ -395,7 +395,7 @@ static int pm_runtime_clk_notify(struct
enable_clock(dev, NULL);
}
break;
- case BUS_NOTIFY_DEL_DEVICE:
+ case BUS_NOTIFY_UNBOUND_DRIVER:
if (clknb->con_ids[0]) {
for (con_id = clknb->con_ids; *con_id; con_id++)
disable_clock(dev, *con_id);
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] PM / Runtime: Handle clocks correctly if
2011-06-20 23:28 [PATCH] PM / Runtime: Handle clocks correctly if CONFIG_PM_RUNTIME is unset Rafael J. Wysocki
@ 2011-06-21 7:10 ` Magnus Damm
0 siblings, 0 replies; 2+ messages in thread
From: Magnus Damm @ 2011-06-21 7:10 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Linux PM mailing list, Kevin Hilman, LKML, linux-sh
On Tue, Jun 21, 2011 at 8:28 AM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> From: Rafael J. Wysocki <rjw@sisk.pl>
>
> Commit 85eb8c8d0b0900c073b0e6f89979ac9c439ade1a (PM / Runtime:
> Generic clock manipulation rountines for runtime PM (v6)) converted
> the shmobile platform to using generic code for runtime PM clock
> management, but it changed the behavior for CONFIG_PM_RUNTIME unset
> incorrectly.
>
> Specifically, for CONFIG_PM_RUNTIME unset pm_runtime_clk_notify()
> should enable clocks for action equal to BUS_NOTIFY_BIND_DRIVER and
> it should disable them for action equal to BUS_NOTIFY_UNBOUND_DRIVER
> (instead of BUS_NOTIFY_ADD_DEVICE and BUS_NOTIFY_DEL_DEVICE,
> respectively). Make this function behave as appropriate.
>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Thanks Rafael!
Acked-by: Magnus Damm <damm@opensource.se>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-06-21 7:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-20 23:28 [PATCH] PM / Runtime: Handle clocks correctly if CONFIG_PM_RUNTIME is unset Rafael J. Wysocki
2011-06-21 7:10 ` [PATCH] PM / Runtime: Handle clocks correctly if Magnus Damm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox