summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2012-06-15 10:54:33 +0200
committerTushar Behera <tushar.behera@linaro.org>2012-07-20 14:29:38 +0530
commit1ea037214e12b81902c4b6b5666766584777de99 (patch)
treed479672abdec298ccc0c025c75a240752a2f2112
parentd2fcfab272b6e39476b57a1c7af4e46c2539b67c (diff)
ARM: Exynos4: pm_domains: register devices in 'need_restore' statetracking-samslt-pd-ll-20120727.0tracking-samslt-pd-ll-20120723.0
Commit ca1d72f033 ('PM / Domains: Make it possible to add devices to inactive domains') introduced possibility to add devices to inactive power domains and added pm_genpd_dev_need_restore() function which lets platform core to notify power domain core that the specified device must be restored (with its runtime_resume() callback) before first use. This patch adds the pm_genpd_dev_need_restore() call what brings back the suspend/resume behaviour for the client devices known from the previous power domain driver (removed by commit 91cfbd4ee0 - 'ARM: EXYNOS: Hook up power domains to generic power domain infrastructure'). Client device drivers relay on that suspend/resume behaviour, thus this patch fixes runtime pm operation for client devices. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
-rw-r--r--arch/arm/mach-exynos/pm_domains.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c
index 0a952a5c45bd..373c3c00d24c 100644
--- a/arch/arm/mach-exynos/pm_domains.c
+++ b/arch/arm/mach-exynos/pm_domains.c
@@ -119,7 +119,9 @@ static __init void exynos_pm_add_dev_to_genpd(struct platform_device *pdev,
struct exynos_pm_domain *pd)
{
if (pdev->dev.bus) {
- if (pm_genpd_add_device(&pd->pd, &pdev->dev))
+ if (!pm_genpd_add_device(&pd->pd, &pdev->dev))
+ pm_genpd_dev_need_restore(&pdev->dev, true);
+ else
pr_info("%s: error in adding %s device to %s power"
"domain\n", __func__, dev_name(&pdev->dev),
pd->name);