Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281860
b: refs/heads/master
c: 3c50729
h: refs/heads/master
v: v3
  • Loading branch information
Santosh Shilimkar authored and Kevin Hilman committed Dec 8, 2011
1 parent bbcb4f2 commit 87004c0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 361b02f3538bc5603a426ed3bb04129a8d7b9a67
refs/heads/master: 3c50729b3fa1cd8ca1f347e6caf1081204cf1a7c
19 changes: 19 additions & 0 deletions trunk/arch/arm/mach-omap2/pm44xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/slab.h>

#include "common.h"
#include "clockdomain.h"
#include "powerdomain.h"

struct power_state {
Expand Down Expand Up @@ -73,6 +74,22 @@ static const struct platform_suspend_ops omap_pm_ops = {
};
#endif /* CONFIG_SUSPEND */

/*
* Enable hardware supervised mode for all clockdomains if it's
* supported. Initiate sleep transition for other clockdomains, if
* they are not used
*/
static int __init clkdms_setup(struct clockdomain *clkdm, void *unused)
{
if (clkdm->flags & CLKDM_CAN_ENABLE_AUTO)
clkdm_allow_idle(clkdm);
else if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP &&
atomic_read(&clkdm->usecount) == 0)
clkdm_sleep(clkdm);
return 0;
}


static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused)
{
struct power_state *pwrst;
Expand Down Expand Up @@ -146,6 +163,8 @@ static int __init omap4_pm_init(void)
goto err2;
}

(void) clkdm_for_each(clkdms_setup, NULL);

#ifdef CONFIG_SUSPEND
suspend_set_ops(&omap_pm_ops);
#endif /* CONFIG_SUSPEND */
Expand Down

0 comments on commit 87004c0

Please sign in to comment.