提交 8bec874f 编写于 作者: I Ilpo Järvinen 提交者: Greg Kroah-Hartman

serial: RS485 termination is supported if DT provides one

When DT provides rs485-term, set termination flag as supported.
Reviewed-by: NLino Sanfilippo <l.sanfilippo@kunbus.com>
Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220704094515.6831-3-ilpo.jarvinen@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 0139da50
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册