Merge branches 'pm-core', 'pm-clk', 'pm-domains' and 'pm-pci'
* pm-core: PM / runtime: Asynchronous "idle" in pm_runtime_allow() PM / runtime: print error when activating a child to unactive parent * pm-clk: PM / clk: Add support for adding a specific clock from device-tree PM / clk: export symbols for existing pm_clk_<...> API fcns * pm-domains: PM / Domains: Convert pm_genpd_init() to return an error code PM / Domains: Stop/start devices during system PM suspend/resume in genpd PM / Domains: Allow runtime PM during system PM phases PM / Runtime: Avoid resuming devices again in pm_runtime_force_resume() PM / Domains: Remove redundant pm_request_idle() call in genpd PM / Domains: Remove redundant wrapper functions for system PM PM / Domains: Allow genpd to power on during system PM phases * pm-pci: PCI / PM: check all fields in pci_set_platform_pm()
This commit is contained in:
@@ -1045,10 +1045,14 @@ int __pm_runtime_set_status(struct device *dev, unsigned int status)
|
||||
*/
|
||||
if (!parent->power.disable_depth
|
||||
&& !parent->power.ignore_children
|
||||
&& parent->power.runtime_status != RPM_ACTIVE)
|
||||
&& parent->power.runtime_status != RPM_ACTIVE) {
|
||||
dev_err(dev, "runtime PM trying to activate child device %s but parent (%s) is not active\n",
|
||||
dev_name(dev),
|
||||
dev_name(parent));
|
||||
error = -EBUSY;
|
||||
else if (dev->power.runtime_status == RPM_SUSPENDED)
|
||||
} else if (dev->power.runtime_status == RPM_SUSPENDED) {
|
||||
atomic_inc(&parent->power.child_count);
|
||||
}
|
||||
|
||||
spin_unlock(&parent->power.lock);
|
||||
|
||||
@@ -1256,7 +1260,7 @@ void pm_runtime_allow(struct device *dev)
|
||||
|
||||
dev->power.runtime_auto = true;
|
||||
if (atomic_dec_and_test(&dev->power.usage_count))
|
||||
rpm_idle(dev, RPM_AUTO);
|
||||
rpm_idle(dev, RPM_AUTO | RPM_ASYNC);
|
||||
|
||||
out:
|
||||
spin_unlock_irq(&dev->power.lock);
|
||||
@@ -1506,6 +1510,9 @@ int pm_runtime_force_resume(struct device *dev)
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!pm_runtime_status_suspended(dev))
|
||||
goto out;
|
||||
|
||||
ret = pm_runtime_set_active(dev);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
Reference in New Issue
Block a user