syscore_ops.h 633 B

12345678910111213141516171819202122232425262728
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * syscore_ops.h - System core operations.
  4. *
  5. * Copyright (C) 2011 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc.
  6. */
  7. #ifndef _LINUX_SYSCORE_OPS_H
  8. #define _LINUX_SYSCORE_OPS_H
  9. #include <linux/list.h>
  10. struct syscore_ops {
  11. struct list_head node;
  12. int (*suspend)(void);
  13. void (*resume)(void);
  14. void (*shutdown)(void);
  15. };
  16. extern void register_syscore_ops(struct syscore_ops *ops);
  17. extern void unregister_syscore_ops(struct syscore_ops *ops);
  18. #ifdef CONFIG_PM_SLEEP
  19. extern int syscore_suspend(void);
  20. extern void syscore_resume(void);
  21. #endif
  22. extern void syscore_shutdown(void);
  23. #endif