Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 272855
b: refs/heads/master
c: 4c4cbce
h: refs/heads/master
i:
  272853: 28eb251
  272851: 9eeefcd
  272847: f6564c7
v: v3
  • Loading branch information
Arnaud Patard (Rtp) authored and Arnd Bergmann committed Oct 7, 2011
1 parent 43af9df commit 4b7e205
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ca4e419c20bd4dfc8f4e6af5a4ec3928b21e76a3
refs/heads/master: 4c4cbce68f57555cddb9d77da333bf50875148ce
15 changes: 12 additions & 3 deletions trunk/arch/arm/mach-mx5/pm-imx5.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@

static struct clk *gpc_dvfs_clk;

static int mx5_suspend_prepare(void)
{
return clk_enable(gpc_dvfs_clk);
}

static int mx5_suspend_enter(suspend_state_t state)
{
clk_enable(gpc_dvfs_clk);
switch (state) {
case PM_SUSPEND_MEM:
mx5_cpu_lp_set(STOP_POWER_OFF);
Expand All @@ -42,19 +46,24 @@ static int mx5_suspend_enter(suspend_state_t state)
__raw_writel(0, MXC_SRPG_EMPGC1_SRPGCR);
}
cpu_do_idle();
clk_disable(gpc_dvfs_clk);

return 0;
}

static void mx5_suspend_finish(void)
{
clk_disable(gpc_dvfs_clk);
}

static int mx5_pm_valid(suspend_state_t state)
{
return (state > PM_SUSPEND_ON && state <= PM_SUSPEND_MAX);
}

static const struct platform_suspend_ops mx5_suspend_ops = {
.valid = mx5_pm_valid,
.prepare = mx5_suspend_prepare,
.enter = mx5_suspend_enter,
.finish = mx5_suspend_finish,
};

static int __init mx5_pm_init(void)
Expand Down

0 comments on commit 4b7e205

Please sign in to comment.