tty: max310x: Add rx-during-tx rs485 flag support
authorSerge Semin <fancer.lancer@gmail.com>
Tue, 14 May 2019 10:14:13 +0000 (13:14 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 May 2019 10:15:53 +0000 (12:15 +0200)
commit68f22c0c99d9c3534b88d1cd1215753a7a3655aa
tree2c7810f0896eee34a2fe31fa142db9ba07b593ff
parent35240ba26a932b279a513f66fa4cabfd7af55221
tty: max310x: Add rx-during-tx rs485 flag support

The driver currently sets the echo suppression bit by default when rs485
is enabled. Naturally it disables any data retrieval in rs485 mode while
RTSn is pushed up. The receiver gate (RX_) can be enabled just by clearing
(or not setting) the EchoSuprs bit of mode2 register. So by setting or
clearing the bit we implement the SER_RS485_RX_DURING_TX rs485 flag
support.

Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/max310x.c