From 179d435a3090317767dafd811b573b16efe2733a Mon Sep 17 00:00:00 2001 From: Erwan Gouriou Date: Fri, 13 Oct 2023 10:09:12 +0200 Subject: [PATCH] Revert "drivers: serial: stm32: Make it compatible with runtime PM .... This reverts commit 1c2d326579ee8cea4c809eb737585537e3482677. which was limited to CONFIG_UART_ASYNC_API=y case and causing regression otherwise. Fixes #63885 Signed-off-by: Erwan Gouriou --- drivers/serial/uart_stm32.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/serial/uart_stm32.c b/drivers/serial/uart_stm32.c index 8cf10e6a151..9243b10d7e7 100644 --- a/drivers/serial/uart_stm32.c +++ b/drivers/serial/uart_stm32.c @@ -23,7 +23,6 @@ #include #include #include -#include #ifdef CONFIG_UART_ASYNC_API #include @@ -672,11 +671,6 @@ static void uart_stm32_poll_out_visitor(const struct device *dev, void *out, pol */ uart_stm32_pm_policy_state_lock_get(dev); - /* Resume device if needed before enabling IT */ - if (pm_device_runtime_is_enabled(dev)) { - (void)pm_device_runtime_get(dev); - } - /* Enable TC interrupt so we can release suspend * constraint when done */ @@ -1269,11 +1263,6 @@ static void uart_stm32_isr(const struct device *dev) async_evt_tx_done(data); #ifdef CONFIG_PM - /* Device can now be released */ - if (pm_device_runtime_is_enabled(dev)) { - (void)pm_device_runtime_put(dev); - } - uart_stm32_pm_policy_state_lock_put(dev); #endif } else if (LL_USART_IsEnabledIT_RXNE(config->usart) &&