[PATCH v4 6/7] PM: wakeup: Add device_clr_wakeup_path()

Shawn Lin shawn.lin at rock-chips.com
Sun Nov 3 23:32:00 PST 2024


device_clr_wakeup_path() is used to disable wakeup path support
which is symmetrical to device_set_wakeup_path().

Signed-off-by: Shawn Lin <shawn.lin at rock-chips.com>
---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 include/linux/pm_wakeup.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/linux/pm_wakeup.h b/include/linux/pm_wakeup.h
index 76cd1f9..45405a3 100644
--- a/include/linux/pm_wakeup.h
+++ b/include/linux/pm_wakeup.h
@@ -94,6 +94,11 @@ static inline void device_set_wakeup_path(struct device *dev)
 	dev->power.wakeup_path = true;
 }
 
+static inline void device_clr_wakeup_path(struct device *dev)
+{
+	dev->power.wakeup_path = false;
+}
+
 /* drivers/base/power/wakeup.c */
 extern struct wakeup_source *wakeup_source_create(const char *name);
 extern void wakeup_source_destroy(struct wakeup_source *ws);
@@ -177,6 +182,8 @@ static inline bool device_wakeup_path(struct device *dev)
 
 static inline void device_set_wakeup_path(struct device *dev) {}
 
+static inline void device_clr_wakeup_path(struct device *dev) {}
+
 static inline void __pm_stay_awake(struct wakeup_source *ws) {}
 
 static inline void pm_stay_awake(struct device *dev) {}
-- 
2.7.4




More information about the Linux-rockchip mailing list