summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/sc16is7xx.c
diff options
context:
space:
mode:
authorHugo Villeneuve <hvilleneuve@dimonoff.com>2023-08-07 23:45:56 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-08-22 15:30:00 +0200
commitb4a778303ea0fcabcaff974721477a5743e1f8ec (patch)
tree16a1646643aa2043ef010d5e70bfa2559b29227d /drivers/tty/serial/sc16is7xx.c
parentserial: sc16is7xx: fix bug when first setting GPIO direction (diff)
downloadlinux-b4a778303ea0fcabcaff974721477a5743e1f8ec.tar.xz
linux-b4a778303ea0fcabcaff974721477a5743e1f8ec.zip
serial: sc16is7xx: add missing support for rs485 devicetree properties
Retrieve rs485 devicetree properties on registration of sc16is7xx ports in case they are attached to an rs485 transceiver. Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Lech Perczak <lech.perczak@camlingroup.com> Tested-by: Lech Perczak <lech.perczak@camlingroup.com> Link: https://lore.kernel.org/r/20230807214556.540627-7-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/sc16is7xx.c')
-rw-r--r--drivers/tty/serial/sc16is7xx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index cfc88959b2f7..f61d98e09dc3 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -1554,6 +1554,10 @@ static int sc16is7xx_probe(struct device *dev,
goto out_ports;
}
+ 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 */