diff options
| author | Jean-Sébastien Pédron <dumbbell@FreeBSD.org> | 2026-04-20 22:04:27 +0000 |
|---|---|---|
| committer | Jean-Sébastien Pédron <dumbbell@FreeBSD.org> | 2026-04-22 18:09:55 +0000 |
| commit | 06cfd1047da6f3cdba80da371592980a7143a7b6 (patch) | |
| tree | e08d4e6f401e8f56c8ada63d8a90a73af268eb6e | |
| parent | 7f59126493d44f21d9a2b1a0b5b81c30f9a438f0 (diff) | |
linuxkpi: Add `register_pm_notifier()` and `unregister_pm_notifier()`
They are empty stub returning success for now, like the previously
defined stubs in this header.
Several constant are also defined in the process.
The amdgpu DRM driver started to use them in Linux 6.12.x.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56572
| -rw-r--r-- | sys/compat/linuxkpi/common/include/linux/suspend.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/suspend.h b/sys/compat/linuxkpi/common/include/linux/suspend.h index 3d5d5d594127..3a8bec392437 100644 --- a/sys/compat/linuxkpi/common/include/linux/suspend.h +++ b/sys/compat/linuxkpi/common/include/linux/suspend.h @@ -20,10 +20,29 @@ extern suspend_state_t pm_suspend_target_state; #define PM_SUSPEND_MIN PM_SUSPEND_TO_IDLE #define PM_SUSPEND_MAX 4 +#define PM_HIBERNATION_PREPARE 0x0001 +#define PM_POST_HIBERNATION 0x0002 +#define PM_SUSPEND_PREPARE 0x0003 +#define PM_POST_SUSPEND 0x0004 +#define PM_RESTORE_PREPARE 0x0005 +#define PM_POST_RESTORE 0x0006 + static inline int pm_suspend_via_firmware(void) { - return 0; + return (0); +} + +static inline int +register_pm_notifier(struct notifier_block *nb) +{ + return (0); +} + +static inline int +unregister_pm_notifier(struct notifier_block *nb) +{ + return (0); } #endif /* _LINUXKPI_LINUX_SUSPEND_H_ */ |
