pm: device: Align state names with system states

Change device pm states to the same pattern used by system power
management.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2021-05-07 14:18:57 -07:00 committed by Anas Nashif
commit 0c607adb63
51 changed files with 258 additions and 258 deletions

View file

@ -3490,7 +3490,7 @@ static void shutdown_uart(void)
HL7800_IO_DBG_LOG("Power OFF the UART");
uart_irq_rx_disable(ictx.mdm_ctx.uart_dev);
rc = pm_device_state_set(ictx.mdm_ctx.uart_dev,
PM_DEVICE_OFF_STATE, NULL, NULL);
PM_DEVICE_STATE_OFF, NULL, NULL);
if (rc) {
LOG_ERR("Error disabling UART peripheral (%d)", rc);
}
@ -3507,7 +3507,7 @@ static void power_on_uart(void)
if (!ictx.uart_on) {
HL7800_IO_DBG_LOG("Power ON the UART");
rc = pm_device_state_set(ictx.mdm_ctx.uart_dev,
PM_DEVICE_ACTIVE_STATE, NULL, NULL);
PM_DEVICE_STATE_ACTIVE, NULL, NULL);
if (rc) {
LOG_ERR("Error enabling UART peripheral (%d)", rc);
}

View file

@ -198,16 +198,16 @@ 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_LOW_POWER_STATE
pm_device_state_set(ctx->uart_dev, PM_DEVICE_LOW_POWER_STATE, NULL, NULL);
#ifdef PM_DEVICE_STATE_LOW_POWER
pm_device_state_set(ctx->uart_dev, PM_DEVICE_STATE_LOW_POWER, NULL, NULL);
#endif
return 0;
}
int mdm_receiver_wake(struct mdm_receiver_context *ctx)
{
#ifdef PM_DEVICE_LOW_POWER_STATE
pm_device_state_set(ctx->uart_dev, PM_DEVICE_ACTIVE_STATE, NULL, NULL);
#ifdef PM_DEVICE_STATE_LOW_POWER
pm_device_state_set(ctx->uart_dev, PM_DEVICE_STATE_ACTIVE, NULL, NULL);
#endif
uart_irq_rx_enable(ctx->uart_dev);