amdxdna_pm.h 698 B

1234567891011121314151617181920212223242526272829
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) 2025, Advanced Micro Devices, Inc.
  4. */
  5. #ifndef _AMDXDNA_PM_H_
  6. #define _AMDXDNA_PM_H_
  7. #include "amdxdna_pci_drv.h"
  8. int amdxdna_pm_suspend(struct device *dev);
  9. int amdxdna_pm_resume(struct device *dev);
  10. int amdxdna_pm_resume_get(struct amdxdna_dev *xdna);
  11. void amdxdna_pm_suspend_put(struct amdxdna_dev *xdna);
  12. void amdxdna_pm_init(struct amdxdna_dev *xdna);
  13. void amdxdna_pm_fini(struct amdxdna_dev *xdna);
  14. static inline int amdxdna_pm_resume_get_locked(struct amdxdna_dev *xdna)
  15. {
  16. int ret;
  17. mutex_unlock(&xdna->dev_lock);
  18. ret = amdxdna_pm_resume_get(xdna);
  19. mutex_lock(&xdna->dev_lock);
  20. return ret;
  21. }
  22. #endif /* _AMDXDNA_PM_H_ */