xref: /linux/drivers/crypto/ccree/cc_pm.h (revision ead5d1f4d877e92c051e1a1ade623d0d30e71619)
14c3f9727SGilad Ben-Yossef /* SPDX-License-Identifier: GPL-2.0 */
203963caeSGilad Ben-Yossef /* Copyright (C) 2012-2019 ARM Limited (or its affiliates). */
34c3f9727SGilad Ben-Yossef 
44c3f9727SGilad Ben-Yossef /* \file cc_pm.h
54c3f9727SGilad Ben-Yossef  */
64c3f9727SGilad Ben-Yossef 
74c3f9727SGilad Ben-Yossef #ifndef __CC_POWER_MGR_H__
84c3f9727SGilad Ben-Yossef #define __CC_POWER_MGR_H__
94c3f9727SGilad Ben-Yossef 
104c3f9727SGilad Ben-Yossef #include "cc_driver.h"
114c3f9727SGilad Ben-Yossef 
124c3f9727SGilad Ben-Yossef #define CC_SUSPEND_TIMEOUT 3000
134c3f9727SGilad Ben-Yossef 
144c3f9727SGilad Ben-Yossef #if defined(CONFIG_PM)
154c3f9727SGilad Ben-Yossef 
164c3f9727SGilad Ben-Yossef extern const struct dev_pm_ops ccree_pm;
174c3f9727SGilad Ben-Yossef 
184c3f9727SGilad Ben-Yossef int cc_pm_get(struct device *dev);
19*bc88606aSGilad Ben-Yossef void cc_pm_put_suspend(struct device *dev);
204c3f9727SGilad Ben-Yossef 
214c3f9727SGilad Ben-Yossef #else
224c3f9727SGilad Ben-Yossef 
cc_pm_get(struct device * dev)234c3f9727SGilad Ben-Yossef static inline int cc_pm_get(struct device *dev)
244c3f9727SGilad Ben-Yossef {
254c3f9727SGilad Ben-Yossef 	return 0;
264c3f9727SGilad Ben-Yossef }
274c3f9727SGilad Ben-Yossef 
cc_pm_put_suspend(struct device * dev)28*bc88606aSGilad Ben-Yossef static inline void cc_pm_put_suspend(struct device *dev) {}
294c3f9727SGilad Ben-Yossef 
304c3f9727SGilad Ben-Yossef #endif
314c3f9727SGilad Ben-Yossef 
324c3f9727SGilad Ben-Yossef #endif /*__POWER_MGR_H__*/
33