diff options
author | Patrice Chotard <patrice.chotard@st.com> | 2020-11-19 08:25:39 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2020-11-23 18:34:55 +0100 |
commit | 4e1d9a737d00f2cc811dc5654f82c92c7d80e98c (patch) | |
tree | 71088fb08b6d338b88fbab7de414d05c5452461e /include/linux/pm_wakeup.h | |
parent | ab150c3f80dcce670926ab3ca412be5047011d22 (diff) |
PM: sleep: Add dev_wakeup_path() helper
Add dev_wakeup_path() helper to avoid to spread
dev->power.wakeup_path test in drivers.
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/pm_wakeup.h')
-rw-r--r-- | include/linux/pm_wakeup.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/pm_wakeup.h b/include/linux/pm_wakeup.h index aa3da6611533..196a157456aa 100644 --- a/include/linux/pm_wakeup.h +++ b/include/linux/pm_wakeup.h @@ -84,6 +84,11 @@ static inline bool device_may_wakeup(struct device *dev) return dev->power.can_wakeup && !!dev->power.wakeup; } +static inline bool device_wakeup_path(struct device *dev) +{ + return dev->power.wakeup_path; +} + static inline void device_set_wakeup_path(struct device *dev) { dev->power.wakeup_path = true; @@ -174,6 +179,11 @@ static inline bool device_may_wakeup(struct device *dev) return dev->power.can_wakeup && dev->power.should_wakeup; } +static inline bool device_wakeup_path(struct device *dev) +{ + return false; +} + static inline void device_set_wakeup_path(struct device *dev) {} static inline void __pm_stay_awake(struct wakeup_source *ws) {} |