Skip to content

Commit b4a7783

Browse files
hvilleneuvedoogregkh
authored andcommitted
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>
1 parent 9baeea7 commit b4a7783

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

drivers/tty/serial/sc16is7xx.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,6 +1554,10 @@ static int sc16is7xx_probe(struct device *dev,
15541554
goto out_ports;
15551555
}
15561556

1557+
ret = uart_get_rs485_mode(&s->p[i].port);
1558+
if (ret)
1559+
goto out_ports;
1560+
15571561
/* Disable all interrupts */
15581562
sc16is7xx_port_write(&s->p[i].port, SC16IS7XX_IER_REG, 0);
15591563
/* Disable TX/RX */

0 commit comments

Comments
 (0)