diff options
author | Jonas Aaberg <jonas.aberg@stericsson.com> | 2011-09-30 08:41:53 +0200 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2012-01-05 10:14:01 +0000 |
commit | 70466acb66274da798a53ccb1b272f9ec7a89911 (patch) | |
tree | 1a9b690db814ae05d10dac766a0c1a29d46ac55d /arch/arm/mach-ux500 | |
parent | b2a8c4f99ad2a9caf6c069f3695d98aa85cb5683 (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>
Diffstat (limited to 'arch/arm/mach-ux500')
-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 ef27c87a3b9..3d822d955cd 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, |