Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0acaab53 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge branch 'pm-runtime'

* pm-runtime:
  PM / Runtime: Improve prepare handling at system suspend for genpd
  PM / Runtime: Asyncronous idle|suspend parent devices at removal
  PM / Runtime: Asyncronous idle|suspend devices at system resume
parents c940c8ce 84167035
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -920,7 +920,7 @@ static int pm_genpd_prepare(struct device *dev)
		pm_wakeup_event(dev, 0);

	if (pm_wakeup_pending()) {
		pm_runtime_put_sync(dev);
		pm_runtime_put(dev);
		return -EBUSY;
	}

@@ -961,7 +961,7 @@ static int pm_genpd_prepare(struct device *dev)
		pm_runtime_enable(dev);
	}

	pm_runtime_put_sync(dev);
	pm_runtime_put(dev);
	return ret;
}

@@ -1327,7 +1327,7 @@ static void pm_genpd_complete(struct device *dev)
		pm_generic_complete(dev);
		pm_runtime_set_active(dev);
		pm_runtime_enable(dev);
		pm_runtime_idle(dev);
		pm_request_idle(dev);
	}
}

+1 −1
Original line number Diff line number Diff line
@@ -324,6 +324,6 @@ void pm_generic_complete(struct device *dev)
	 * Let runtime PM try to suspend devices that haven't been in use before
	 * going into the system-wide sleep state we're resuming from.
	 */
	pm_runtime_idle(dev);
	pm_request_idle(dev);
}
#endif /* CONFIG_PM_SLEEP */
+1 −1
Original line number Diff line number Diff line
@@ -756,7 +756,7 @@ static void device_complete(struct device *dev, pm_message_t state)

	device_unlock(dev);

	pm_runtime_put_sync(dev);
	pm_runtime_put(dev);
}

/**
+1 −1
Original line number Diff line number Diff line
@@ -1400,5 +1400,5 @@ void pm_runtime_remove(struct device *dev)
	if (dev->power.runtime_status == RPM_ACTIVE)
		pm_runtime_set_suspended(dev);
	if (dev->power.irq_safe && dev->parent)
		pm_runtime_put_sync(dev->parent);
		pm_runtime_put(dev->parent);
}