xref: /freebsd/sys/compat/linuxkpi/common/include/linux/pm_runtime.h (revision 1609b4d456109ac2ec70bd1b38c559f13160f632)
1 /* Public domain. */
2 
3 #ifndef _LINUXKPI_LINUX_PM_RUNTIME_H_
4 #define _LINUXKPI_LINUX_PM_RUNTIME_H_
5 
6 #include <linux/device.h>
7 #include <linux/pm.h>
8 
9 #define pm_runtime_mark_last_busy(x) (void)(x)
10 #define pm_runtime_use_autosuspend(x) (void)(x)
11 #define pm_runtime_dont_use_autosuspend(x) (void)(x)
12 #define pm_runtime_put_autosuspend(x) (void)(x)
13 #define pm_runtime_set_autosuspend_delay(x, y) (void)(x); (void)(y)
14 #define pm_runtime_set_active(x) (void)(x)
15 #define pm_runtime_allow(x) (void)(x)
16 #define pm_runtime_put_noidle(x) (void)(x)
17 #define pm_runtime_forbid(x) (void)(x)
18 #define pm_runtime_get_noresume(x) (void)(x)
19 #define pm_runtime_put(x) (void)(x)
20 #define pm_runtime_enable(x) (void)(x)
21 #define pm_runtime_disable(x) (void)(x)
22 #define pm_runtime_autosuspend(x) (void)(x)
23 #define pm_runtime_resume(x) (void)(x)
24 
25 static inline int
pm_runtime_get_sync(struct device * dev)26 pm_runtime_get_sync(struct device *dev)
27 {
28 	return 0;
29 }
30 
31 static inline int
pm_runtime_get_if_in_use(struct device * dev)32 pm_runtime_get_if_in_use(struct device *dev)
33 {
34 	return 1;
35 }
36 
37 #if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION < 60900
38 static inline int
pm_runtime_get_if_active(struct device * dev,bool x)39 pm_runtime_get_if_active(struct device *dev, bool x)
40 #else
41 static inline int
42 pm_runtime_get_if_active(struct device *dev)
43 #endif
44 {
45 	return 1;
46 }
47 
48 static inline int
pm_runtime_suspended(struct device * dev)49 pm_runtime_suspended(struct device *dev)
50 {
51 	return 0;
52 }
53 
54 #endif	/* _LINUXKPI_LINUX_PM_RUNTIME_H_ */
55