diff mbox series

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

Message ID 1730705521-23081-7-git-send-email-shawn.lin@rock-chips.com (mailing list archive)
State Superseded
Headers show
Series Initial support for RK3576 UFS controller | expand

Commit Message

Shawn Lin Nov. 4, 2024, 7:32 a.m. UTC
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@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 mbox series

Patch

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) {}