Commit b4a77830 authored by Hugo Villeneuve's avatar Hugo Villeneuve Committed by Greg Kroah-Hartman
Browse files

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: default avatarHugo Villeneuve <hvilleneuve@dimonoff.com>
Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: default avatarLech Perczak <lech.perczak@camlingroup.com>
Tested-by: default avatarLech Perczak <lech.perczak@camlingroup.com>
Link: https://lore.kernel.org/r/20230807214556.540627-7-hugo@hugovil.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9baeea72
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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 */