]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
serial: stm32: fix initialization of RS485 mode
authorBich HEMON <bich.hemon@st.com>
Thu, 15 Mar 2018 08:44:46 +0000 (08:44 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Mar 2018 16:39:43 +0000 (17:39 +0100)
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>
drivers/tty/serial/stm32-usart.c

index 345fbf3142696f02e94d522017e74d7b4013e78e..e8d7a7bb4339e4ef40fc22cb433588c54dbd43c0 100644 (file)
@@ -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;