Re: [PATCH 0/7] serial: 8250: Add rs485 emulation to 8250_dw

From: Lukas Wunner
Date: Mon Mar 23 2020 - 09:17:19 EST


On Mon, Mar 23, 2020 at 09:25:57AM +0100, Heiko Stübner wrote:
> Am Donnerstag, 19. März 2020, 06:40:34 CET schrieb Lukas Wunner:
> > There are some more patches in the pipeline for the next cycle
> > to add support for an rs485 bus termination GPIO. They're on
> > the tip of this branch:
> >
> > https://github.com/RevolutionPi/linux/commits/revpi-4.19
> >
> > Just so you know in advance and duplicate work is avoided.
>
> do you plan on submitting these soonish? Because looking at your
> termination-gpio change makes me want to do something similar for
> my RE-gpio ... instead of trying to mangle this into the DTR thingy.
[...]
> So I guess having that as rs485-re-gpios property might be the best way.

I plan to submit them once the 5.7 merge window closes, I'll probably
have to go over them at least one more time to apply some polish.

On UARTs capable of disabling and enabling the receiver in software,
it's best to leverage that to enable full-duplex or half-duplex mode.
However after having a brief look at the DW UART databook, it seems
it's not capable of doing that. For such UARTs, a separate GPIO indeed
seems like a legitimate approach to allow switching between full-duplex
and half-duplex.

"rs485-re-gpios" seems a bit cryptic, how about "rs485-rx-enable-gpios"
or "rs485-full-duplex-gpios"?

Thanks,

Lukas