[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200318142640.982763-8-heiko@sntech.de>
Date: Wed, 18 Mar 2020 15:26:40 +0100
From: Heiko Stuebner <heiko@...ech.de>
To: gregkh@...uxfoundation.org
Cc: jslaby@...e.com, andriy.shevchenko@...ux.intel.com,
matwey.kornilov@...il.com, linux-serial@...r.kernel.org,
linux-kernel@...r.kernel.org, heiko@...ech.de,
Giulio Benetti <giulio.benetti@...ronovasrl.com>,
Heiko Stuebner <heiko.stuebner@...obroma-systems.com>
Subject: [PATCH 7/7] serial: 8250_dw: allow enable rs485 at boot time
From: Giulio Benetti <giulio.benetti@...ronovasrl.com>
If "linux,rs485-enabled-at-boot-time" is specified need to setup 485
in probe function.
Call uart_get_rs485_mode() to get rs485 configuration, then call
rs485_config() callback directly to setup port as rs485.
Signed-off-by: Giulio Benetti <giulio.benetti@...ronovasrl.com>
Signed-off-by: Heiko Stuebner <heiko.stuebner@...obroma-systems.com>
---
drivers/tty/serial/8250/8250_dw.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index 7023b656658d..c771faeaa260 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -550,8 +550,10 @@ static int dw8250_probe(struct platform_device *pdev)
if (data->uart_16550_compatible)
p->handle_irq = NULL;
- if (!data->skip_autocfg)
+ if (!data->skip_autocfg) {
dw8250_setup_port(p);
+ uart_get_rs485_mode(dev, &p->rs485);
+ }
/* If we have a valid fifosize, try hooking up DMA */
if (p->fifosize) {
--
2.24.1
Powered by blists - more mailing lists