pm: converge to suspend state for low power modes

The difference between low power and suspend states is a thin blur line
that is is not clear and most drivers have used indistinctly. This patch
converges to the usage of the suspend state for low power, since
contrary to the low power state, it is used by both system and runtime
device PM. The low power state is still kept, but its future is unclear
and needs some discussion.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2021-07-30 11:34:09 +02:00 committed by Anas Nashif
commit 56a35e5682
17 changed files with 20 additions and 32 deletions

View file

@ -198,15 +198,15 @@ int mdm_receiver_send(struct mdm_receiver_context *ctx,
int mdm_receiver_sleep(struct mdm_receiver_context *ctx)
{
uart_irq_rx_disable(ctx->uart_dev);
#ifdef PM_DEVICE_STATE_LOW_POWER
pm_device_state_set(ctx->uart_dev, PM_DEVICE_STATE_LOW_POWER);
#ifdef CONFIG_PM_DEVICE
pm_device_state_set(ctx->uart_dev, PM_DEVICE_STATE_SUSPEND);
#endif
return 0;
}
int mdm_receiver_wake(struct mdm_receiver_context *ctx)
{
#ifdef PM_DEVICE_STATE_LOW_POWER
#ifdef CONFIG_PM_DEVICE
pm_device_state_set(ctx->uart_dev, PM_DEVICE_STATE_ACTIVE);
#endif
uart_irq_rx_enable(ctx->uart_dev);