[PATCH 2/2] serial: imx: allow enabling RX during TX operation with DT option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This commit changes the driver behaviour: new default is no RX during
TX when RS485 is also enabled, so boards requiring this should explicitly
enable rs485-rx-during-tx in their device trees.

Signed-off-by: Alexey Ignatov <lexszero@xxxxxxxxx>
---
 drivers/tty/serial/imx.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 38c55c309953..a1d4ed71312f 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -2050,6 +2050,10 @@ static int serial_imx_probe_dt(struct imx_port *sport,
 
 	if (of_property_read_bool(np, "linux,rs485-enabled-at-boot-time"))
 		sport->port.rs485.flags |= SER_RS485_ENABLED;
+	
+	if (of_get_property(np, "rs485-rx-during-tx", NULL))
+		sport->port.rs485.flags |= SER_RS485_RX_DURING_TX;
+
 	return 0;
 }
 #else
@@ -2112,7 +2116,7 @@ static int serial_imx_probe(struct platform_device *pdev)
 	sport->port.ops = &imx_pops;
 	sport->port.rs485_config = imx_rs485_config;
 	sport->port.rs485.flags |=
-		SER_RS485_RTS_ON_SEND | SER_RS485_RX_DURING_TX;
+		SER_RS485_RTS_ON_SEND;
 	sport->port.flags = UPF_BOOT_AUTOCONF;
 	init_timer(&sport->timer);
 	sport->timer.function = imx_timeout;
-- 
2.12.2

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux