pm-common.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) 2013 Samsung Electronics Co., Ltd.
  4. * Tomasz Figa <[email protected]>
  5. * Copyright (c) 2004 Simtec Electronics
  6. * http://armlinux.simtec.co.uk/
  7. * Written by Ben Dooks, <[email protected]>
  8. */
  9. #ifndef __PLAT_SAMSUNG_PM_COMMON_H
  10. #define __PLAT_SAMSUNG_PM_COMMON_H __FILE__
  11. #include <linux/irq.h>
  12. #include <linux/soc/samsung/s3c-pm.h>
  13. /* sleep save info */
  14. /**
  15. * struct sleep_save - save information for shared peripherals.
  16. * @reg: Pointer to the register to save.
  17. * @val: Holder for the value saved from reg.
  18. *
  19. * This describes a list of registers which is used by the pm core and
  20. * other subsystem to save and restore register values over suspend.
  21. */
  22. struct sleep_save {
  23. void __iomem *reg;
  24. unsigned long val;
  25. };
  26. #define SAVE_ITEM(x) \
  27. { .reg = (x) }
  28. /* helper functions to save/restore lists of registers. */
  29. extern void s3c_pm_do_save(struct sleep_save *ptr, int count);
  30. extern void s3c_pm_do_restore(const struct sleep_save *ptr, int count);
  31. extern void s3c_pm_do_restore_core(const struct sleep_save *ptr, int count);
  32. #endif