mtk_hibernate_dpm.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef __MTK_HIBERNATE_DPM_H
  2. #define __MTK_HIBERNATE_DPM_H
  3. #include <linux/device.h>
  4. /* -------------other configure-------------------------// */
  5. #define MAX_CB_FUNCS (10)
  6. /* -------------error code define-----------------------// */
  7. #define E_NO_EXIST (-1)
  8. #define E_PARAM (-2)
  9. typedef enum {
  10. ID_M_BEGIN = 0,
  11. ID_M_DEVAPC = 0,
  12. ID_M_VCODEC = 1,
  13. ID_M_SPC = 2,
  14. ID_M_MSDC = 3,
  15. ID_M_MALI = 4,
  16. ID_M_GPU = 4,
  17. ID_M_MJC = 5,
  18. ID_M_CONNSYS = 6,
  19. ID_M_END = MAX_CB_FUNCS,
  20. } KERN_FUNC_ID;
  21. /* -------------structure define------------------------// */
  22. typedef int (*swsusp_cb_func_t) (struct device *device);
  23. typedef struct {
  24. KERN_FUNC_ID id;
  25. swsusp_cb_func_t func;
  26. struct device *device;
  27. } swsusp_cb_func_info;
  28. /* -----------------export function declaration----------------------------// */
  29. int register_swsusp_restore_noirq_func(unsigned int id, swsusp_cb_func_t func,
  30. struct device *device);
  31. int unregister_swsusp_restore_noirq_func(unsigned int id);
  32. int exec_swsusp_restore_noirq_func(unsigned int id);
  33. #endif