diff options
author | Jonas Aaberg <jonas.aberg@stericsson.com> | 2011-09-30 08:41:53 +0200 |
---|---|---|
committer | Rabin VINCENT <rabin.vincent@stericsson.com> | 2011-10-03 09:18:42 +0200 |
commit | 36fe5ea2a6ce0c8c0b2c007ca54b6ac8167cff45 (patch) | |
tree | a8cb61ace33655423c9c40225ab70427bae031a8 | |
parent | 7875f29dff625d03ab881d4d8a94649d4fa9a28d (diff) |
ARM: ux500: pm-runtime: Fix callbacks
Actually call the drivers registered runtime_suspend/resume callbacks
upon pm_runtime_get/put.
ST-Ericsson Linux next: -
ST-Ericsson ID: -
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I2c4efe1f2e01ec05bb790883c7634a715649a4a3
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32596
Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
-rw-r--r-- | arch/arm/mach-ux500/pm/runtime.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/arch/arm/mach-ux500/pm/runtime.c b/arch/arm/mach-ux500/pm/runtime.c index 34a85431824..d0e07421af0 100644 --- a/arch/arm/mach-ux500/pm/runtime.c +++ b/arch/arm/mach-ux500/pm/runtime.c @@ -99,13 +99,19 @@ static int ux500_pd_runtime_idle(struct device *dev) static int ux500_pd_runtime_suspend(struct device *dev) { + int ret; struct pm_runtime_data *prd = __to_prd(dev); dev_vdbg(dev, "%s()\n", __func__); platform_pm_runtime_bug(dev, prd); + ret = pm_generic_runtime_suspend(dev); + if (ret) + return ret; + if (prd && test_bit(BIT_ACTIVE, &prd->flags)) { + if (prd->pins) ux500_pins_disable(prd->pins); @@ -134,15 +140,14 @@ static int ux500_pd_runtime_resume(struct device *dev) ux500_regulator_atomic_enable(prd->regulator); set_bit(BIT_ENABLED, &prd->flags); - } - return 0; + } + return pm_generic_runtime_resume(dev); } static int ux500_pd_suspend_noirq(struct device *dev) { struct pm_runtime_data *prd = __to_prd(dev); - int ret; dev_vdbg(dev, "%s()\n", __func__); @@ -159,10 +164,6 @@ static int ux500_pd_suspend_noirq(struct device *dev) * reason. We still need to do the power save stuff when going into * suspend, so force it here. */ - ret = pm_generic_runtime_suspend(dev); - if (ret) - return ret; - return ux500_pd_runtime_suspend(dev); } @@ -188,9 +189,7 @@ static int ux500_pd_resume_noirq(struct device *dev) * but we forced it down in suspend_noirq above. Bring it * up since pm-runtime thinks it is not suspended. */ - ux500_pd_runtime_resume(dev); - - return pm_generic_runtime_resume(dev); + return ux500_pd_runtime_resume(dev); } static int ux500_pd_bus_notify(struct notifier_block *nb, |