cc_pm.h 994 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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_fini(struct cc_drvdata *drvdata);
  13. int cc_pm_suspend(struct device *dev);
  14. int cc_pm_resume(struct device *dev);
  15. int cc_pm_get(struct device *dev);
  16. int cc_pm_put_suspend(struct device *dev);
  17. #else
  18. static inline int cc_pm_init(struct cc_drvdata *drvdata)
  19. {
  20. return 0;
  21. }
  22. static inline void cc_pm_fini(struct cc_drvdata *drvdata) {}
  23. static inline int cc_pm_suspend(struct device *dev)
  24. {
  25. return 0;
  26. }
  27. static inline int cc_pm_resume(struct device *dev)
  28. {
  29. return 0;
  30. }
  31. static inline int cc_pm_get(struct device *dev)
  32. {
  33. return 0;
  34. }
  35. static inline int cc_pm_put_suspend(struct device *dev)
  36. {
  37. return 0;
  38. }
  39. #endif
  40. #endif /*__POWER_MGR_H__*/