cc_pm.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* Copyright (C) 2012-2018 ARM Limited or its affiliates. */
  3. /* \file cc_pm.h
  4. */
  5. #ifndef __CC_POWER_MGR_H__
  6. #define __CC_POWER_MGR_H__
  7. #include "cc_driver.h"
  8. #define CC_SUSPEND_TIMEOUT 3000
  9. #if defined(CONFIG_PM)
  10. extern const struct dev_pm_ops ccree_pm;
  11. int cc_pm_init(struct cc_drvdata *drvdata);
  12. void cc_pm_go(struct cc_drvdata *drvdata);
  13. void cc_pm_fini(struct cc_drvdata *drvdata);
  14. int cc_pm_suspend(struct device *dev);
  15. int cc_pm_resume(struct device *dev);
  16. int cc_pm_get(struct device *dev);
  17. int cc_pm_put_suspend(struct device *dev);
  18. #else
  19. static inline int cc_pm_init(struct cc_drvdata *drvdata)
  20. {
  21. return 0;
  22. }
  23. static inline void cc_pm_go(struct cc_drvdata *drvdata) {}
  24. static inline void cc_pm_fini(struct cc_drvdata *drvdata) {}
  25. static inline int cc_pm_suspend(struct device *dev)
  26. {
  27. return 0;
  28. }
  29. static inline int cc_pm_resume(struct device *dev)
  30. {
  31. return 0;
  32. }
  33. static inline int cc_pm_get(struct device *dev)
  34. {
  35. return 0;
  36. }
  37. static inline int cc_pm_put_suspend(struct device *dev)
  38. {
  39. return 0;
  40. }
  41. #endif
  42. #endif /*__POWER_MGR_H__*/