blob: 50cac33de11832bcdf1f6e5effca9b3a237a180c [file] [log] [blame]
Gilad Ben-Yossef4c3f9722018-01-22 09:27:00 +00001/* SPDX-License-Identifier: GPL-2.0 */
Gilad Ben-Yossef03963ca2019-04-18 16:38:53 +03002/* Copyright (C) 2012-2019 ARM Limited (or its affiliates). */
Gilad Ben-Yossef4c3f9722018-01-22 09:27:00 +00003
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
16extern const struct dev_pm_ops ccree_pm;
17
Gilad Ben-Yossef4c3f9722018-01-22 09:27:00 +000018int cc_pm_get(struct device *dev);
Gilad Ben-Yossefbc886062020-01-16 12:14:45 +020019void cc_pm_put_suspend(struct device *dev);
Gilad Ben-Yossef4c3f9722018-01-22 09:27:00 +000020
21#else
22
Gilad Ben-Yossef4c3f9722018-01-22 09:27:00 +000023static inline int cc_pm_get(struct device *dev)
24{
25 return 0;
26}
27
Gilad Ben-Yossefbc886062020-01-16 12:14:45 +020028static inline void cc_pm_put_suspend(struct device *dev) {}
Gilad Ben-Yossef4c3f9722018-01-22 09:27:00 +000029
Gilad Ben-Yossef4c3f9722018-01-22 09:27:00 +000030#endif
31
32#endif /*__POWER_MGR_H__*/