diff --git a/drivers/console/uart_console.c b/drivers/console/uart_console.c index 6cdf6e438565d4..5e5e10963f0c4b 100644 --- a/drivers/console/uart_console.c +++ b/drivers/console/uart_console.c @@ -99,8 +99,11 @@ static int console_out(int c) } uart_poll_out(uart_console_dev, c); - /* As errors cannot be returned, ignore the return value */ - (void)pm_device_runtime_put(uart_console_dev); + /* Use async put to avoid useless device suspension/resumption + * when tranmiting chain of chars. + * As errors cannot be returned, ignore the return value + */ + (void)pm_device_runtime_put_async(uart_console_dev, K_MSEC(1)); return c; } diff --git a/subsys/logging/backends/log_backend_uart.c b/subsys/logging/backends/log_backend_uart.c index 4173180f62731b..0cb3e29df1a0a5 100644 --- a/subsys/logging/backends/log_backend_uart.c +++ b/subsys/logging/backends/log_backend_uart.c @@ -114,8 +114,11 @@ static int char_out(uint8_t *data, size_t length, void *ctx) (void)err; cleanup: - /* As errors cannot be returned, ignore the return value */ - (void)pm_device_runtime_put(uart_dev); + /* Use async put to avoid useless device suspension/resumption + * when tranmiting chain of chars. + * As errors cannot be returned, ignore the return value + */ + (void)pm_device_runtime_put_async(uart_dev, K_MSEC(1)); return length; }