[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200516201456.pieoebueqkq7q7ov@wunner.de>
Date: Sat, 16 May 2020 22:14:56 +0200
From: Lukas Wunner <lukas@...ner.de>
To: Heiko Stuebner <heiko@...ech.de>
Cc: gregkh@...uxfoundation.org, jslaby@...e.com,
andriy.shevchenko@...ux.intel.com, matwey.kornilov@...il.com,
linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
christoph.muellner@...obroma-systems.com,
giulio.benetti@...ronovasrl.com,
Heiko Stuebner <heiko.stuebner@...obroma-systems.com>
Subject: Re: [PATCH v2 6/7] serial: 8250: Support separate rs485 rx-enable
GPIO
On Thu, Mar 26, 2020 at 12:14:21AM +0100, Heiko Stuebner wrote:
> --- a/drivers/tty/serial/serial_core.c
> +++ b/drivers/tty/serial/serial_core.c
> @@ -3356,6 +3356,18 @@ int uart_get_rs485_mode(struct uart_port *port)
> rs485conf->flags |= SER_RS485_TERMINATE_BUS;
> }
>
> + port->rs485_re_gpio = devm_gpiod_get(dev, "rs485-rx-enable",
> + GPIOD_FLAGS_BIT_DIR_OUT);
I think you want to use GPIOD_OUT_HIGH here so that rs485 reception
is enabled by default and only disabled at runtime when sending
(if half-duplex mode is used).
Thanks,
Lukas
Powered by blists - more mailing lists