syscore_ops.h 635 B

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