pm: replace DEVICE_PM_* states with PM_DEVICE_*

Prefix device PM states with PM.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2021-05-03 17:36:10 +02:00 committed by Anas Nashif
commit 2c7b763e47
52 changed files with 331 additions and 331 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 = device_set_power_state(ictx.mdm_ctx.uart_dev,
DEVICE_PM_OFF_STATE, NULL, NULL);
PM_DEVICE_OFF_STATE, 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 = device_set_power_state(ictx.mdm_ctx.uart_dev,
DEVICE_PM_ACTIVE_STATE, NULL, NULL);
PM_DEVICE_ACTIVE_STATE, 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 DEVICE_PM_LOW_POWER_STATE
device_set_power_state(ctx->uart_dev, DEVICE_PM_LOW_POWER_STATE, NULL, NULL);
#ifdef PM_DEVICE_LOW_POWER_STATE
device_set_power_state(ctx->uart_dev, PM_DEVICE_LOW_POWER_STATE, NULL, NULL);
#endif
return 0;
}
int mdm_receiver_wake(struct mdm_receiver_context *ctx)
{
#ifdef DEVICE_PM_LOW_POWER_STATE
device_set_power_state(ctx->uart_dev, DEVICE_PM_ACTIVE_STATE, NULL, NULL);
#ifdef PM_DEVICE_LOW_POWER_STATE
device_set_power_state(ctx->uart_dev, PM_DEVICE_ACTIVE_STATE, NULL, NULL);
#endif
uart_irq_rx_enable(ctx->uart_dev);