xref: /src/sys/compat/linuxkpi/common/include/linux/pm_runtime.h (revision 1609b4d456109ac2ec70bd1b38c559f13160f632)
1456a92d5SEmmanuel Vadot /* Public domain. */
2456a92d5SEmmanuel Vadot 
3456a92d5SEmmanuel Vadot #ifndef _LINUXKPI_LINUX_PM_RUNTIME_H_
4456a92d5SEmmanuel Vadot #define _LINUXKPI_LINUX_PM_RUNTIME_H_
5456a92d5SEmmanuel Vadot 
6456a92d5SEmmanuel Vadot #include <linux/device.h>
7456a92d5SEmmanuel Vadot #include <linux/pm.h>
8456a92d5SEmmanuel Vadot 
9456a92d5SEmmanuel Vadot #define pm_runtime_mark_last_busy(x) (void)(x)
10456a92d5SEmmanuel Vadot #define pm_runtime_use_autosuspend(x) (void)(x)
11456a92d5SEmmanuel Vadot #define pm_runtime_dont_use_autosuspend(x) (void)(x)
12456a92d5SEmmanuel Vadot #define pm_runtime_put_autosuspend(x) (void)(x)
13456a92d5SEmmanuel Vadot #define pm_runtime_set_autosuspend_delay(x, y) (void)(x); (void)(y)
14456a92d5SEmmanuel Vadot #define pm_runtime_set_active(x) (void)(x)
15456a92d5SEmmanuel Vadot #define pm_runtime_allow(x) (void)(x)
16456a92d5SEmmanuel Vadot #define pm_runtime_put_noidle(x) (void)(x)
17456a92d5SEmmanuel Vadot #define pm_runtime_forbid(x) (void)(x)
18456a92d5SEmmanuel Vadot #define pm_runtime_get_noresume(x) (void)(x)
19456a92d5SEmmanuel Vadot #define pm_runtime_put(x) (void)(x)
20456a92d5SEmmanuel Vadot #define pm_runtime_enable(x) (void)(x)
21456a92d5SEmmanuel Vadot #define pm_runtime_disable(x) (void)(x)
22456a92d5SEmmanuel Vadot #define pm_runtime_autosuspend(x) (void)(x)
23456a92d5SEmmanuel Vadot #define pm_runtime_resume(x) (void)(x)
24456a92d5SEmmanuel Vadot 
25456a92d5SEmmanuel Vadot static inline int
pm_runtime_get_sync(struct device * dev)26456a92d5SEmmanuel Vadot pm_runtime_get_sync(struct device *dev)
27456a92d5SEmmanuel Vadot {
28456a92d5SEmmanuel Vadot 	return 0;
29456a92d5SEmmanuel Vadot }
30456a92d5SEmmanuel Vadot 
31456a92d5SEmmanuel Vadot static inline int
pm_runtime_get_if_in_use(struct device * dev)32456a92d5SEmmanuel Vadot pm_runtime_get_if_in_use(struct device *dev)
33456a92d5SEmmanuel Vadot {
34456a92d5SEmmanuel Vadot 	return 1;
35456a92d5SEmmanuel Vadot }
36456a92d5SEmmanuel Vadot 
371609b4d4SJean-Sébastien Pédron #if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION < 60900
38456a92d5SEmmanuel Vadot static inline int
pm_runtime_get_if_active(struct device * dev,bool x)39456a92d5SEmmanuel Vadot pm_runtime_get_if_active(struct device *dev, bool x)
401609b4d4SJean-Sébastien Pédron #else
411609b4d4SJean-Sébastien Pédron static inline int
421609b4d4SJean-Sébastien Pédron pm_runtime_get_if_active(struct device *dev)
431609b4d4SJean-Sébastien Pédron #endif
44456a92d5SEmmanuel Vadot {
45456a92d5SEmmanuel Vadot 	return 1;
46456a92d5SEmmanuel Vadot }
47456a92d5SEmmanuel Vadot 
48710c6084SJean-Sébastien Pédron static inline int
pm_runtime_suspended(struct device * dev)49710c6084SJean-Sébastien Pédron pm_runtime_suspended(struct device *dev)
50710c6084SJean-Sébastien Pédron {
51710c6084SJean-Sébastien Pédron 	return 0;
52710c6084SJean-Sébastien Pédron }
53710c6084SJean-Sébastien Pédron 
54456a92d5SEmmanuel Vadot #endif	/* _LINUXKPI_LINUX_PM_RUNTIME_H_ */
55