Skip to content

Commit

Permalink
[test] pm: add default pm state for cavs platform
Browse files Browse the repository at this point in the history
Cavs platform only support one pm state : PM_STATE_SOFT_OFF, so it
can't find any pm state for next.

Signed-off-by: Rander Wang <[email protected]>
  • Loading branch information
RanderWang committed Oct 25, 2023
1 parent 432dbba commit 867c9e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zephyr/lib/pm_runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ DECLARE_SOF_UUID("power", power_uuid, 0x76cc9773, 0x440c, 0x4df9,
DECLARE_TR_CTX(power_tr, SOF_UUID(power_uuid), LOG_LEVEL_INFO);

#if defined(CONFIG_PM_POLICY_CUSTOM)
struct pm_state_info default_pm_state = {PM_STATE_ACTIVE, 0, 0};
const struct pm_state_info *pm_policy_next_state(uint8_t cpu, int32_t ticks)
{
unsigned int num_cpu_states;
Expand Down Expand Up @@ -65,7 +66,7 @@ const struct pm_state_info *pm_policy_next_state(uint8_t cpu, int32_t ticks)
}
}

return NULL;
return &default_pm_state;
}
#endif /* CONFIG_PM_POLICY_CUSTOM */

Expand Down

0 comments on commit 867c9e3

Please sign in to comment.