Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 2 | /* Copyright (C) 2012-2019 ARM Limited (or its affiliates). */ |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 3 | |
| 4 | /* \file cc_pm.h |
| 5 | */ |
| 6 | |
| 7 | #ifndef __CC_POWER_MGR_H__ |
| 8 | #define __CC_POWER_MGR_H__ |
| 9 | |
| 10 | #include "cc_driver.h" |
| 11 | |
| 12 | #define CC_SUSPEND_TIMEOUT 3000 |
| 13 | |
| 14 | #if defined(CONFIG_PM) |
| 15 | |
| 16 | extern const struct dev_pm_ops ccree_pm; |
| 17 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 18 | int cc_pm_get(struct device *dev); |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 19 | void cc_pm_put_suspend(struct device *dev); |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 20 | |
| 21 | #else |
| 22 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 23 | static inline int cc_pm_get(struct device *dev) |
| 24 | { |
| 25 | return 0; |
| 26 | } |
| 27 | |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 28 | static inline void cc_pm_put_suspend(struct device *dev) {} |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame] | 29 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 30 | #endif |
| 31 | |
| 32 | #endif /*__POWER_MGR_H__*/ |