4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 1) /* SPDX-License-Identifier: GPL-2.0 */
03963caeb0dd7 (Gilad Ben-Yossef 2019-04-18 16:38:53 +0300 2) /* Copyright (C) 2012-2019 ARM Limited (or its affiliates). */
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 3)
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 4) /* \file cc_pm.h
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 5) */
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 6)
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 7) #ifndef __CC_POWER_MGR_H__
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 8) #define __CC_POWER_MGR_H__
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 9)
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 10) #include "cc_driver.h"
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 11)
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 12) #define CC_SUSPEND_TIMEOUT 3000
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 13)
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 14) #if defined(CONFIG_PM)
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 15)
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 16) extern const struct dev_pm_ops ccree_pm;
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 17)
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 18) int cc_pm_get(struct device *dev);
bc88606ac030c (Gilad Ben-Yossef 2020-01-16 12:14:45 +0200 19) void cc_pm_put_suspend(struct device *dev);
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 20)
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 21) #else
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 22)
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 23) static inline int cc_pm_get(struct device *dev)
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 24) {
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 25) return 0;
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 26) }
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 27)
bc88606ac030c (Gilad Ben-Yossef 2020-01-16 12:14:45 +0200 28) static inline void cc_pm_put_suspend(struct device *dev) {}
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 29)
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 30) #endif
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 31)
4c3f97276e156 (Gilad Ben-Yossef 2018-01-22 09:27:00 +0000 32) #endif /*__POWER_MGR_H__*/