drivers/serial: stm32: Enable use of dt pinctrl as serial signals

When available, use dt pinctrl to configure a variable number of
serial signals.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2020-06-05 10:57:52 +02:00 committed by Kumar Gala
commit 252a623ca2
5 changed files with 47 additions and 0 deletions

View file

@ -12,6 +12,8 @@
#ifndef ZEPHYR_DRIVERS_SERIAL_UART_STM32_H_
#define ZEPHYR_DRIVERS_SERIAL_UART_STM32_H_
#include <drivers/pinmux.h>
/* device config */
struct uart_stm32_config {
struct uart_device_config uconf;
@ -21,6 +23,8 @@ struct uart_stm32_config {
bool hw_flow_control;
/* initial parity, 0 for none, 1 for odd, 2 for even */
int parity;
const struct soc_gpio_pinctrl *pinctrl_list;
size_t pinctrl_list_size;
};
/* driver data */