Commit 8b25deb1 authored by Sascha Hauer's avatar Sascha Hauer Committed by Greg Kroah-Hartman
Browse files

serial: imx: Use common rs485 device tree parsing function



This adds support for the rs485 specific properties defined in
Documentation/devicetree/bindings/serial/rs485.txt.

Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Forwarded: id:20170913081833.2740-7-u.kleine-koenig@pengutronix.de (v5)
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent be7da1a2
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2051,6 +2051,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
@@ -2112,7 +2114,7 @@ static int serial_imx_probe(struct platform_device *pdev)
	sport->port.fifosize = 32;
	sport->port.ops = &imx_pops;
	sport->port.rs485_config = imx_rs485_config;
	sport->port.rs485.flags = SER_RS485_RTS_ON_SEND;
	sport->port.rs485.flags |= SER_RS485_RTS_ON_SEND;
	sport->port.flags = UPF_BOOT_AUTOCONF;
	init_timer(&sport->timer);
	sport->timer.function = imx_timeout;