pm: Use pm_device_action_run instead of state_set
Since drivers implement a callback based on action and not the state, we should be using the API based on the action instead of the one based on the state. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
80d26d996e
commit
6451626ce7
13 changed files with 76 additions and 79 deletions
|
@ -4364,8 +4364,8 @@ static void shutdown_uart(void)
|
|||
if (ictx.uart_on) {
|
||||
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_STATE_SUSPENDED);
|
||||
rc = pm_device_action_run(ictx.mdm_ctx.uart_dev,
|
||||
PM_DEVICE_ACTION_SUSPEND);
|
||||
if (rc) {
|
||||
LOG_ERR("Error disabling UART peripheral (%d)", rc);
|
||||
}
|
||||
|
@ -4381,8 +4381,8 @@ 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_STATE_ACTIVE);
|
||||
rc = pm_device_action_run(ictx.mdm_ctx.uart_dev,
|
||||
PM_DEVICE_ACTION_RESUME);
|
||||
if (rc) {
|
||||
LOG_ERR("Error enabling UART peripheral (%d)", rc);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue