[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241216191818.1553557-2-hugo@hugovil.com>
Date: Mon, 16 Dec 2024 14:18:15 -0500
From: Hugo Villeneuve <hugo@...ovil.com>
To: stable@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>
Cc: hugo@...ovil.com,
hui.wang@...onical.com,
Hugo Villeneuve <hvilleneuve@...onoff.com>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
Lech Perczak <lech.perczak@...lingroup.com>,
linux-serial@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 1/4] serial: sc16is7xx: add missing support for rs485 devicetree properties
From: Hugo Villeneuve <hvilleneuve@...onoff.com>
Retrieve rs485 devicetree properties on registration of sc16is7xx ports in
case they are attached to an rs485 transceiver.
Reworked to fix conflicts when backporting to linux-5.15.y.
Signed-off-by: Hugo Villeneuve <hvilleneuve@...onoff.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Reviewed-by: Lech Perczak <lech.perczak@...lingroup.com>
Tested-by: Lech Perczak <lech.perczak@...lingroup.com>
Link: https://lore.kernel.org/r/20230807214556.540627-7-hugo@hugovil.com
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/tty/serial/sc16is7xx.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index 692c14d7f7d1a..3d3f66563b73b 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -1307,6 +1307,10 @@ static int sc16is7xx_probe(struct device *dev,
mutex_init(&s->p[i].efr_lock);
+ ret = uart_get_rs485_mode(&s->p[i].port);
+ if (ret)
+ goto out_ports;
+
/* Disable all interrupts */
sc16is7xx_port_write(&s->p[i].port, SC16IS7XX_IER_REG, 0);
/* Disable TX/RX */
--
2.39.5
Powered by blists - more mailing lists