drivers: intc: stm32: remove STM32_EXTI_LINE_NONE macro

The EXTI driver API defined in exti_stm32.h is reserved for exclusive usage
by the STM32 GPIO driver, which doesn't use this macro. Since there is no
usecase for it anyways, it can be removed for future-proofing.

The STM32 UART driver is an unintended user of this definition, however.
Replace it with a private #define which is more appropriate anyways.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
This commit is contained in:
Mathieu Choplain 2024-08-22 16:50:37 +02:00 committed by Anas Nashif
parent 8bbcab485d
commit b1b85fcf48
2 changed files with 7 additions and 5 deletions

View File

@ -20,7 +20,6 @@
#include <zephyr/sys/__assert.h>
#include <soc.h>
#include <zephyr/init.h>
#include <zephyr/drivers/interrupt_controller/exti_stm32.h>
#include <zephyr/drivers/clock_control.h>
#include <zephyr/pm/policy.h>
#include <zephyr/pm/device.h>
@ -67,6 +66,11 @@ LOG_MODULE_REGISTER(uart_stm32, CONFIG_UART_LOG_LEVEL);
#define HAS_DRIVER_ENABLE 0
#endif
#ifdef CONFIG_PM
/* Placeholder value when wakeup-line DT property is not defined */
#define STM32_WAKEUP_LINE_NONE 0xFFFFFFFF
#endif
#if HAS_LPUART
#ifdef USART_PRESC_PRESCALER
uint32_t lpuartdiv_calc(const uint64_t clock_rate, const uint16_t presc_idx,
@ -2064,7 +2068,7 @@ static int uart_stm32_registers_configure(const struct device *dev)
#endif
LL_USART_EnableInStopMode(usart);
if (config->wakeup_line != STM32_EXTI_LINE_NONE) {
if (config->wakeup_line != STM32_WAKEUP_LINE_NONE) {
/* Prepare the WAKEUP with the expected EXTI line */
LL_EXTI_EnableIT_0_31(BIT(config->wakeup_line));
}
@ -2290,7 +2294,7 @@ static void uart_stm32_irq_config_func_##index(const struct device *dev) \
.wakeup_source = DT_INST_PROP(index, wakeup_source), \
.wakeup_line = COND_CODE_1(DT_INST_NODE_HAS_PROP(index, wakeup_line), \
(DT_INST_PROP(index, wakeup_line)), \
(STM32_EXTI_LINE_NONE)),
(STM32_WAKEUP_LINE_NONE)),
#else
#define STM32_UART_PM_WAKEUP(index) /* Not used */
#endif

View File

@ -23,8 +23,6 @@
#include <zephyr/types.h>
#define STM32_EXTI_LINE_NONE 0xFFFFFFFFU
/**
* @brief enable EXTI interrupt for specific line
*