File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -480,16 +480,6 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
480480 `bool pm_runtime_status_suspended(struct device *dev); `
481481 - return true if the device's runtime PM status is 'suspended'
482482
483- `void pm_runtime_allow(struct device *dev); `
484- - set the power.runtime_auto flag for the device and decrease its usage
485- counter (used by the /sys/devices/.../power/control interface to
486- effectively allow the device to be power managed at run time)
487-
488- `void pm_runtime_forbid(struct device *dev); `
489- - unset the power.runtime_auto flag for the device and increase its usage
490- counter (used by the /sys/devices/.../power/control interface to
491- effectively prevent the device from being power managed at run time)
492-
493483 `void pm_runtime_no_callbacks(struct device *dev); `
494484 - set the power.no_callbacks flag for the device and remove the runtime
495485 PM attributes from /sys/devices/.../power (or prevent them from being
Original file line number Diff line number Diff line change @@ -1664,9 +1664,12 @@ EXPORT_SYMBOL_GPL(devm_pm_runtime_get_noresume);
16641664 * pm_runtime_forbid - Block runtime PM of a device.
16651665 * @dev: Device to handle.
16661666 *
1667- * Increase the device's usage count and clear its power.runtime_auto flag,
1668- * so that it cannot be suspended at run time until pm_runtime_allow() is called
1669- * for it.
1667+ * Resume @dev if already suspended and block runtime suspend of @dev in such
1668+ * a way that it can be unblocked via the /sys/devices/.../power/control
1669+ * interface, or otherwise by calling pm_runtime_allow().
1670+ *
1671+ * Calling this function many times in a row has the same effect as calling it
1672+ * once.
16701673 */
16711674void pm_runtime_forbid (struct device * dev )
16721675{
@@ -1687,7 +1690,13 @@ EXPORT_SYMBOL_GPL(pm_runtime_forbid);
16871690 * pm_runtime_allow - Unblock runtime PM of a device.
16881691 * @dev: Device to handle.
16891692 *
1690- * Decrease the device's usage count and set its power.runtime_auto flag.
1693+ * Unblock runtime suspend of @dev after it has been blocked by
1694+ * pm_runtime_forbid() (for instance, if it has been blocked via the
1695+ * /sys/devices/.../power/control interface), check if @dev can be
1696+ * suspended and suspend it in that case.
1697+ *
1698+ * Calling this function many times in a row has the same effect as calling it
1699+ * once.
16911700 */
16921701void pm_runtime_allow (struct device * dev )
16931702{
You can’t perform that action at this time.
0 commit comments