hal: drivers: update Zephyr constraints API

The API has changed to:

pm_constraint_set: pm_policy_state_lock_get
pm_constraint_release: pm_policy_state_lock_put

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2022-02-28 22:11:55 +01:00 committed by Gerard Marull-Paretas
parent ba4823f6be
commit 2a5891d874
1 changed files with 5 additions and 5 deletions

View File

@ -71,7 +71,7 @@
#include DeviceFamily_constructPath(driverlib/setup.h)
#include DeviceFamily_constructPath(driverlib/ccfgread.h)
#include <pm/pm.h>
#include <pm/policy.h>
static unsigned int configureXOSCHF(unsigned int action);
static unsigned int nopResourceHandler(unsigned int action);
@ -461,10 +461,10 @@ int_fast16_t Power_releaseConstraint(uint_fast16_t constraintId)
/* forward constraint release to Zephyr */
switch (constraintId) {
case PowerCC26XX_DISALLOW_STANDBY:
pm_constraint_release(PM_STATE_STANDBY);
pm_policy_state_lock_put(PM_STATE_STANDBY);
break;
case PowerCC26XX_DISALLOW_IDLE:
pm_constraint_release(PM_STATE_RUNTIME_IDLE);
pm_policy_state_lock_put(PM_STATE_RUNTIME_IDLE);
break;
default:
break;
@ -578,10 +578,10 @@ int_fast16_t Power_setConstraint(uint_fast16_t constraintId)
/* forward constraint set to Zephyr */
switch (constraintId) {
case PowerCC26XX_DISALLOW_STANDBY:
pm_constraint_set(PM_STATE_STANDBY);
pm_policy_state_lock_get(PM_STATE_STANDBY);
break;
case PowerCC26XX_DISALLOW_IDLE:
pm_constraint_set(PM_STATE_RUNTIME_IDLE);
pm_policy_state_lock_get(PM_STATE_RUNTIME_IDLE);
break;
default:
break;