1 /*
2  * Copyright 2023 NXP
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 #include "sm_power.h"
7 #include "scmi_power.h"
8 
SM_POWER_SetState(sm_power_t * sm_power)9 void SM_POWER_SetState(sm_power_t *sm_power)
10 {
11     uint32_t channel       = sm_power->channel;
12     uint32_t domain_id      = sm_power->domain_id;
13     uint32_t flag          = sm_power->flag;
14     uint32_t power_st       = sm_power->power_st;
15     SCMI_PowerStateSet(channel, domain_id, flag, power_st);
16 }
17 
SM_POWER_GetState(sm_power_t * sm_power)18 uint32_t SM_POWER_GetState(sm_power_t *sm_power)
19 {
20     uint32_t power_state    = SCMI_POWER_DOMAIN_STATE_OFF;
21     uint32_t channel       = sm_power->channel;
22     uint32_t domain_id      = sm_power->domain_id;
23 
24     SCMI_PowerStateGet(channel, domain_id, &power_state);
25 
26     return power_state;
27 }
28