[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220703170039.2058202-5-LinoSanfilippo@gmx.de>
Date: Sun, 3 Jul 2022 19:00:34 +0200
From: Lino Sanfilippo <LinoSanfilippo@....de>
To: gregkh@...uxfoundation.org, jirislaby@...nel.org
Cc: ilpo.jarvinen@...ux.intel.com, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org,
andriy.shevchenko@...ux.intel.com, vz@...ia.com,
linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org,
linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
lukas@...ner.de, p.rosenberger@...bus.com,
Lino Sanfilippo <l.sanfilippo@...bus.com>
Subject: [PATCH v2 4/9] serial: core: sanitize RS485 delays read from device tree
From: Lino Sanfilippo <l.sanfilippo@...bus.com>
When setting the RS485 configuration from userspace via TIOCSRS485 the
delays are clamped to 100ms. Make this consistent with the values passed
in by means of device tree parameters.
Signed-off-by: Lino Sanfilippo <l.sanfilippo@...bus.com>
---
drivers/tty/serial/serial_core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 05ed3acad09a..58cdad5f45dd 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -3395,6 +3395,8 @@ int uart_get_rs485_mode(struct uart_port *port)
rs485conf->delay_rts_after_send = 0;
}
+ uart_sanitize_serial_rs485_delays(port, rs485conf);
+
/*
* Clear full-duplex and enabled flags, set RTS polarity to active high
* to get to a defined state with the following properties:
--
2.25.1
Powered by blists - more mailing lists