summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRabin Vincent <rabin.vincent@stericsson.com>2011-05-31 11:41:47 +0530
committersaid m bagheri <ebgheri@steludxu2848.(none)>2011-06-17 13:42:10 +0200
commit34502442e90c06af22e4d43404618ca2c5417c0f (patch)
treecd29b239776f2548ff44285e670ebcedd538d37e
parent4d5aa1e52ab0849925952566cdeea2948a84daf1 (diff)
ux500: pm_runtime: call driver's callback when forcing suspend/resume
Call the driver's callback (if it exists) when forcing runtime suspend/ resume during the system sleep transactions. ST-Ericsson Linux next: - ST-Ericsson ID: 343071 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I81fc08952ef7eeedb46887b190942d4c2f18e5e1 Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/24227 Reviewed-by: QATEST Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Reviewed-by: Per FORLIN <per.forlin@stericsson.com>
-rw-r--r--arch/arm/mach-ux500/pm/runtime.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/mach-ux500/pm/runtime.c b/arch/arm/mach-ux500/pm/runtime.c
index 2d07b2facf8..40b360b684b 100644
--- a/arch/arm/mach-ux500/pm/runtime.c
+++ b/arch/arm/mach-ux500/pm/runtime.c
@@ -137,6 +137,7 @@ static int ux500_pd_runtime_resume(struct device *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__);
@@ -153,6 +154,10 @@ 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);
}
@@ -178,7 +183,9 @@ 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.
*/
- return ux500_pd_runtime_resume(dev);
+ ux500_pd_runtime_resume(dev);
+
+ return pm_generic_runtime_resume(dev);
}
static int ux500_pd_bus_notify(struct notifier_block *nb,