Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (C) 2025, Advanced Micro Devices, Inc.
4 */
5
6#ifndef _AMDXDNA_PM_H_
7#define _AMDXDNA_PM_H_
8
9#include "amdxdna_pci_drv.h"
10
11int amdxdna_pm_suspend(struct device *dev);
12int amdxdna_pm_resume(struct device *dev);
13int amdxdna_pm_resume_get(struct amdxdna_dev *xdna);
14void amdxdna_pm_suspend_put(struct amdxdna_dev *xdna);
15void amdxdna_pm_init(struct amdxdna_dev *xdna);
16void amdxdna_pm_fini(struct amdxdna_dev *xdna);
17
18static inline int amdxdna_pm_resume_get_locked(struct amdxdna_dev *xdna)
19{
20 int ret;
21
22 mutex_unlock(&xdna->dev_lock);
23 ret = amdxdna_pm_resume_get(xdna);
24 mutex_lock(&xdna->dev_lock);
25
26 return ret;
27}
28
29#endif /* _AMDXDNA_PM_H_ */