treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / crypto / ccree / cc_pm.h
blob80a18e11cae43f3dc8b1cac9abcac671e6a9555d
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (C) 2012-2019 ARM Limited (or its affiliates). */
4 /* \file cc_pm.h
5 */
7 #ifndef __CC_POWER_MGR_H__
8 #define __CC_POWER_MGR_H__
10 #include "cc_driver.h"
12 #define CC_SUSPEND_TIMEOUT 3000
14 #if defined(CONFIG_PM)
16 extern const struct dev_pm_ops ccree_pm;
18 int cc_pm_init(struct cc_drvdata *drvdata);
19 void cc_pm_go(struct cc_drvdata *drvdata);
20 void cc_pm_fini(struct cc_drvdata *drvdata);
21 int cc_pm_suspend(struct device *dev);
22 int cc_pm_resume(struct device *dev);
23 int cc_pm_get(struct device *dev);
24 void cc_pm_put_suspend(struct device *dev);
25 bool cc_pm_is_dev_suspended(struct device *dev);
27 #else
29 static inline int cc_pm_init(struct cc_drvdata *drvdata)
31 return 0;
34 static inline void cc_pm_go(struct cc_drvdata *drvdata) {}
36 static inline void cc_pm_fini(struct cc_drvdata *drvdata) {}
38 static inline int cc_pm_get(struct device *dev)
40 return 0;
43 static inline void cc_pm_put_suspend(struct device *dev) {}
45 static inline bool cc_pm_is_dev_suspended(struct device *dev)
47 /* if PM not supported device is never suspend */
48 return false;
51 #endif
53 #endif /*__POWER_MGR_H__*/