From 0a36d212228a8d093a03bbab94e9e6ffe99c87c3 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Tue, 20 Jun 2017 20:29:13 -0300 Subject: [PATCH 1/2] serial: imx: Support 'linux,rs485-enabled-at-boot-time' According to Documentation/devicetree/bindings/serial/rs485.txt, the "linux,rs485-enabled-at-boot-time" property can be used to indicate that RS485 is enabled during boot time. Add support for it in the driver. Signed-off-by: Fabio Estevam --- drivers/tty/serial/imx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 92606b1..90f8a5d 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -2123,6 +2123,9 @@ static int serial_imx_probe(struct platform_device *pdev) sport->port.rs485_config = imx_rs485_config; sport->port.rs485.flags = SER_RS485_RTS_ON_SEND | SER_RS485_RX_DURING_TX; + if (of_get_property(np, "linux,rs485-enabled-at-boot-time", NULL)) + sport->port.rs485.flags |= SER_RS485_ENABLED; + sport->port.flags = UPF_BOOT_AUTOCONF; init_timer(&sport->timer); sport->timer.function = imx_timeout; -- 2.7.4