pm: policy: Consider substates for state lock functions

Extend the current pm_policy_state_lock_*() functions to support
substates.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
This commit is contained in:
Carlo Caione 2022-04-07 13:06:12 +02:00 committed by Carles Cufí
commit 69b28bfd07
19 changed files with 145 additions and 55 deletions

View file

@ -681,7 +681,7 @@ static void uart_ns16550_irq_tx_enable(const struct device *dev)
* different states.
*/
for (uint8_t i = 0U; i < num_cpu_states; i++) {
pm_policy_state_lock_get(cpu_states[i].state);
pm_policy_state_lock_get(cpu_states[i].state, PM_ALL_SUBSTATES);
}
}
#endif
@ -718,7 +718,7 @@ static void uart_ns16550_irq_tx_disable(const struct device *dev)
* to different states.
*/
for (uint8_t i = 0U; i < num_cpu_states; i++) {
pm_policy_state_lock_put(cpu_states[i].state);
pm_policy_state_lock_put(cpu_states[i].state, PM_ALL_SUBSTATES);
}
}
#endif