[PATCH 4/9] serial: fsl_lpuart: Use common rs485 device tree parsing function
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Wed Jun 21 03:21:25 PDT 2017
From: Sascha Hauer <s.hauer at pengutronix.de>
We just got a common helper for parsing the rs485 specific
device tree properties. Use it and drop the open coded parser.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
---
drivers/tty/serial/fsl_lpuart.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index 15df1ba78095..7988a8a981d1 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -2054,8 +2054,9 @@ static int lpuart_probe(struct platform_device *pdev)
dev_info(sport->port.dev, "DMA rx channel request failed, "
"operating without rx DMA\n");
- if (of_property_read_bool(np, "linux,rs485-enabled-at-boot-time")) {
- sport->port.rs485.flags |= SER_RS485_ENABLED;
+ of_get_rs485_mode(np, &sport->port.rs485);
+
+ if (sport->port.rs485.flags & SER_RS485_ENABLED) {
sport->port.rs485.flags |= SER_RS485_RTS_ON_SEND;
writeb(UARTMODEM_TXRTSE, sport->port.membase + UARTMODEM);
}
--
2.11.0
More information about the linux-arm-kernel
mailing list