lkml.org 
[lkml]   [2022]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/2] serial: RS485 termination is supported if DT provides one
From

On 04.07.22 11:45, Ilpo Järvinen wrote:
> When DT provides rs485-term, set termination flag as supported.
>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> ---
> drivers/tty/serial/serial_core.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> 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;
> }


FWIW:
Reviewed-by: Lino Sanfilippo <l.sanfilippo@kunbus.com>


Regards,
Lino

\
 
 \ /
  Last update: 2022-07-05 12:29    [W:0.061 / U:1.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site