mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-04 17:44:14 +08:00
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>
This commit is contained in:
parent
0139da50dc
commit
8bec874f84
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user