diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2025-02-18 23:13:09 +0300 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2025-02-18 23:43:06 +0300 |
| commit | 758cc55ce3d5d79e8f98adbd03ad2cd29133af33 (patch) | |
| tree | 605ad2bf4ed4992c1cbd5f8d4112f2c2d06cd651 /include/linux | |
| parent | 3e5eee147b7b0f5a93f56beffe34e81fdd00fa0d (diff) | |
| download | linux-758cc55ce3d5d79e8f98adbd03ad2cd29133af33.tar.xz | |
PM: runtime: Introduce pm_runtime_blocked()
Introduce a new helper function called pm_runtime_blocked()
for checking the power.last_status value indicating whether or not
enabling runtime PM for the given device has been blocked (which
happens in the "prepare" phase of system-wide suspend if runtime
PM is disabled for the given device at that point).
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://patch.msgid.link/4632087.LvFx2qVVIh@rjwysocki.net
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/pm_runtime.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index 10769119867b..aea0395c10a1 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h @@ -81,6 +81,7 @@ extern void pm_runtime_block_if_disabled(struct device *dev); extern void pm_runtime_unblock(struct device *dev); extern void pm_runtime_enable(struct device *dev); extern void __pm_runtime_disable(struct device *dev, bool check_resume); +extern bool pm_runtime_blocked(struct device *dev); extern void pm_runtime_allow(struct device *dev); extern void pm_runtime_forbid(struct device *dev); extern void pm_runtime_no_callbacks(struct device *dev); @@ -277,6 +278,7 @@ static inline void pm_runtime_block_if_disabled(struct device *dev) {} static inline void pm_runtime_unblock(struct device *dev) {} static inline void pm_runtime_enable(struct device *dev) {} static inline void __pm_runtime_disable(struct device *dev, bool c) {} +static inline bool pm_runtime_blocked(struct device *dev) { return true; } static inline void pm_runtime_allow(struct device *dev) {} static inline void pm_runtime_forbid(struct device *dev) {} |
