[PATCH 8/9] serial: imx: Use common rs485 device tree parsing function

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Wed Jun 21 03:21:29 PDT 2017


From: Sascha Hauer <s.hauer at pengutronix.de>

Make use of the new of_get_rs485_mode function to initialize rs485 specific
settings.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
---
Cc: Shawn Guo <shawnguo at kernel.org>
Cc: Fabio Estevam <fabio.estevam at nxp.com>

 drivers/tty/serial/imx.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index d5deeef0cd5b..951bb754ad9b 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -2076,6 +2076,8 @@ static int serial_imx_probe_dt(struct imx_port *sport,
 	if (of_get_property(np, "rts-gpios", NULL))
 		sport->have_rtsgpio = 1;
 
+	of_get_rs485_mode(np, &sport->port.rs485);
+
 	return 0;
 }
 #else
-- 
2.11.0




More information about the linux-arm-kernel mailing list