xref: /rk3399_ARM-atf/plat/mediatek/mt8195/drivers/spm/mt_spm_conservation.h (revision 7fa35d068ff9eabbf252414fd778cc4de7a4b141)
1*859e346bSEdward-JW Yang /*
2*859e346bSEdward-JW Yang  * Copyright (c) 2021, MediaTek Inc. All rights reserved.
3*859e346bSEdward-JW Yang  *
4*859e346bSEdward-JW Yang  * SPDX-License-Identifier: BSD-3-Clause
5*859e346bSEdward-JW Yang  */
6*859e346bSEdward-JW Yang 
7*859e346bSEdward-JW Yang #ifndef MT_SPM_CONSERVATION_H
8*859e346bSEdward-JW Yang #define MT_SPM_CONSERVATION_H
9*859e346bSEdward-JW Yang 
10*859e346bSEdward-JW Yang #include <mt_spm_internal.h>
11*859e346bSEdward-JW Yang 
12*859e346bSEdward-JW Yang extern int spm_conservation(int state_id, unsigned int ext_opand,
13*859e346bSEdward-JW Yang 			    struct spm_lp_scen *spm_lp,
14*859e346bSEdward-JW Yang 			    unsigned int resource_req);
15*859e346bSEdward-JW Yang extern void spm_conservation_finish(int state_id, unsigned int ext_opand,
16*859e346bSEdward-JW Yang 				    struct spm_lp_scen *spm_lp,
17*859e346bSEdward-JW Yang 				    struct wake_status **status);
18*859e346bSEdward-JW Yang extern int spm_conservation_get_result(struct wake_status **res);
19*859e346bSEdward-JW Yang extern void spm_conservation_pwrctrl_init(struct pwr_ctrl *pwrctrl);
20*859e346bSEdward-JW Yang #endif /* MT_SPM_CONSERVATION_H */
21