PM / Domains: Power on the PM domain right after attach completes
authorUlf Hansson <ulf.hansson@linaro.org>
Mon, 17 Nov 2014 15:19:10 +0000 (16:19 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 20 Nov 2014 20:38:50 +0000 (21:38 +0100)
Vast amount of platform drivers which enables runtime PM, don't invoke
a pm_runtime_get_sync() while probing their devices.

Instead, once they have turned on their PM resourses during ->probe()
and are ready to handle I/O, these invokes pm_runtime_set_active() to
synchronize its state towards the runtime PM core.

From the runtime PM point of view this behavior is perfectly acceptable,
but we encounter probe failures if their corresponding devices resides
in the generic PM domain. The issues are observed for those devices,
which requires its PM domain to stay powered during ->probe() since
that's not being controlled.

While using the generic OF-based PM domain look-up, a device's PM
domain will be attached during the probe sequence. For this path, let's
fix the probe failures, by simply power on the PM domain right after
when it's been attached to the device.

The generic PM domain stays powered until all of its devices becomes
runtime PM enabled and runtime PM suspended.

The old SOCs which makes use of the generic PM domain but don't use the
generic OF-based PM domain look-up, will not be affected from this
change.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/domain.c

index 3989eb63d53828c9e943cb1477b6485a66dc271f..1bfb54ce60e88c620c8e9d03da5929eaff977e03 100644 (file)
@@ -2235,6 +2235,7 @@ int genpd_dev_pm_attach(struct device *dev)
        }
 
        dev->pm_domain->detach = genpd_dev_pm_detach;
+       pm_genpd_poweron(pd);
 
        return 0;
 }
This page took 0.025328 seconds and 5 git commands to generate.