summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorBich HEMON <bich.hemon@st.com>2018-03-15 08:44:46 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-15 17:39:43 +0100
commit7d8f68619e4f530e19c17e7c0d04f0a791891a77 (patch)
tree05cf61dd21150a2b1bf697c40ee65aa1882d8825 /drivers/tty
parentdbb3fb45edfff70ac62e5b841a8da634f7e3c1d9 (diff)
downloadlinux-0-day-7d8f68619e4f530e19c17e7c0d04f0a791891a77.tar.gz
linux-0-day-7d8f68619e4f530e19c17e7c0d04f0a791891a77.tar.xz
serial: stm32: fix initialization of RS485 mode
Configure RS485 mode during port initialization. Fixes: 1bcda09d2910 ("serial: stm32: add support for RS485 hardware control mode") Signed-off-by: Bich Hemon <bich.hemon@st.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/stm32-usart.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c
index 345fbf3142696..e8d7a7bb4339e 100644
--- a/drivers/tty/serial/stm32-usart.c
+++ b/drivers/tty/serial/stm32-usart.c
@@ -809,6 +809,10 @@ static int stm32_init_port(struct stm32_port *stm32port,
port->ops = &stm32_uart_ops;
port->dev = &pdev->dev;
port->irq = platform_get_irq(pdev, 0);
+ port->rs485_config = stm32_config_rs485;
+
+ stm32_init_rs485(port, pdev);
+
stm32port->wakeirq = platform_get_irq(pdev, 1);
stm32port->fifoen = stm32port->info->cfg.has_fifo;