diff options
author | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2022-07-04 11:45:15 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-07-08 15:14:09 +0200 |
commit | 8bec874f84d826288a6cfa6acc683d15c218d78c (patch) | |
tree | 11f4a7cda7d55cf10a7ac0c81380fb82c7295bf3 /drivers/tty | |
parent | serial: Embed rs485_supported to uart_port (diff) | |
download | linux-8bec874f84d826288a6cfa6acc683d15c218d78c.tar.xz linux-8bec874f84d826288a6cfa6acc683d15c218d78c.zip |
serial: RS485 termination is supported if DT provides one
When DT provides rs485-term, set termination flag as supported.
Reviewed-by: Lino Sanfilippo <l.sanfilippo@kunbus.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220704094515.6831-3-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/serial_core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index a9cf1044a9fa..1db44cde76f6 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -3409,6 +3409,8 @@ int uart_get_rs485_mode(struct uart_port *port) port->rs485_term_gpio = NULL; return dev_err_probe(dev, ret, "Cannot get rs485-term-gpios\n"); } + if (port->rs485_term_gpio) + port->rs485_supported.flags |= SER_RS485_TERMINATE_BUS; return 0; } |