14c3f9727SGilad Ben-Yossef /* SPDX-License-Identifier: GPL-2.0 */ 24c3f9727SGilad Ben-Yossef /* Copyright (C) 2012-2018 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_init(struct cc_drvdata *drvdata); 191358c13aSGilad Ben-Yossef void cc_pm_go(struct cc_drvdata *drvdata); 204c3f9727SGilad Ben-Yossef void cc_pm_fini(struct cc_drvdata *drvdata); 214c3f9727SGilad Ben-Yossef int cc_pm_suspend(struct device *dev); 224c3f9727SGilad Ben-Yossef int cc_pm_resume(struct device *dev); 234c3f9727SGilad Ben-Yossef int cc_pm_get(struct device *dev); 244c3f9727SGilad Ben-Yossef int cc_pm_put_suspend(struct device *dev); 254c3f9727SGilad Ben-Yossef 264c3f9727SGilad Ben-Yossef #else 274c3f9727SGilad Ben-Yossef 284c3f9727SGilad Ben-Yossef static inline int cc_pm_init(struct cc_drvdata *drvdata) 294c3f9727SGilad Ben-Yossef { 304c3f9727SGilad Ben-Yossef return 0; 314c3f9727SGilad Ben-Yossef } 324c3f9727SGilad Ben-Yossef 331358c13aSGilad Ben-Yossef static void cc_pm_go(struct cc_drvdata *drvdata) {} 341358c13aSGilad Ben-Yossef 354c3f9727SGilad Ben-Yossef static inline void cc_pm_fini(struct cc_drvdata *drvdata) {} 364c3f9727SGilad Ben-Yossef 374c3f9727SGilad Ben-Yossef static inline int cc_pm_suspend(struct device *dev) 384c3f9727SGilad Ben-Yossef { 394c3f9727SGilad Ben-Yossef return 0; 404c3f9727SGilad Ben-Yossef } 414c3f9727SGilad Ben-Yossef 424c3f9727SGilad Ben-Yossef static inline int cc_pm_resume(struct device *dev) 434c3f9727SGilad Ben-Yossef { 444c3f9727SGilad Ben-Yossef return 0; 454c3f9727SGilad Ben-Yossef } 464c3f9727SGilad Ben-Yossef 474c3f9727SGilad Ben-Yossef static inline int cc_pm_get(struct device *dev) 484c3f9727SGilad Ben-Yossef { 494c3f9727SGilad Ben-Yossef return 0; 504c3f9727SGilad Ben-Yossef } 514c3f9727SGilad Ben-Yossef 524c3f9727SGilad Ben-Yossef static inline int cc_pm_put_suspend(struct device *dev) 534c3f9727SGilad Ben-Yossef { 544c3f9727SGilad Ben-Yossef return 0; 554c3f9727SGilad Ben-Yossef } 564c3f9727SGilad Ben-Yossef 574c3f9727SGilad Ben-Yossef #endif 584c3f9727SGilad Ben-Yossef 594c3f9727SGilad Ben-Yossef #endif /*__POWER_MGR_H__*/ 60