drivers: serial: stm32: store IRQ config function in a single place
When CONFIG_PM=y, the IRQ function also needs to be stored, something the "generic" uart_device_config cannot support. This uses the config irq_config_func field to store the function in all situations, thus removing unnecessary logic and finally dropping uart_device_config. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
32a3a028f2
commit
e101cc78e9
2 changed files with 9 additions and 19 deletions
|
@ -20,7 +20,6 @@
|
|||
struct uart_stm32_config {
|
||||
/* USART instance */
|
||||
USART_TypeDef *usart;
|
||||
struct uart_device_config uconf;
|
||||
/* clock subsystem driving this peripheral */
|
||||
struct stm32_pclken pclken;
|
||||
/* initial hardware flow control, 1 for RTS/CTS */
|
||||
|
@ -30,9 +29,8 @@ struct uart_stm32_config {
|
|||
/* switch to enable single wire / half duplex feature */
|
||||
bool single_wire;
|
||||
const struct pinctrl_dev_config *pcfg;
|
||||
#if defined(CONFIG_PM) \
|
||||
&& !defined(CONFIG_UART_INTERRUPT_DRIVEN) \
|
||||
&& !defined(CONFIG_UART_ASYNC_API)
|
||||
#if defined(CONFIG_UART_INTERRUPT_DRIVEN) || defined(CONFIG_UART_ASYNC_API) || \
|
||||
defined(CONFIG_PM)
|
||||
uart_irq_config_func_t irq_config_func;
|
||||
#endif
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue