diff options
author | Jarkko Sonninen <kasper@iki.fi> | 2023-07-08 17:56:50 +0300 |
---|---|---|
committer | Johan Hovold <johan@kernel.org> | 2023-07-20 15:37:03 +0200 |
commit | 974e2f6a0554685493cc44406bc7d8ba0a3b0e33 (patch) | |
tree | 5469a08f8733bafb2127d9e94a534df1fab82922 /drivers/fpga/tests/fpga-bridge-test.c | |
parent | fdf0eaf11452d72945af31804e2a1048ee1b574c (diff) |
USB: serial: xr: add TIOCGRS485 and TIOCSRS485 ioctls
Exar devices like XR21B1411 can control an RS485 transceiver by
automatically asserting the RTS#/RS485 pin before sending data
and deasserting it when the last stop bit has been transmitted.
The polarity of the RST#/RS485 signal is configurable and the
hardware also supports half-duplex turn-around delay and
address matching mode.
Add support for enabling and disabling RS-485 mode and
configuring the RST#/RS485 signal polarity using the TIOCGRS485
and TIOCSRS485 ioctls. Support for half-duplex turn-around delay
and address matching mode are left unimplemented for now.
User enables RS-485 mode by setting SER_RS485_ENABLED flag in
struct serial_rs485 flags. User should also set either
SER_RS485_RTS_ON_SEND or SER_RS485_RTS_AFTER_SEND to select the
behaviour of the RTS#/RS485 pin. Setting SER_RS485_RTS_ON_SEND
will drive RTS#/RS485 low during transmission.
Signed-off-by: Jarkko Sonninen <kasper@iki.fi>
[ johan: let SER_RS485_RTS_ON_SEND determine SER_RS485_RTS_AFTER_SEND ]
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/fpga/tests/fpga-bridge-test.c')
0 files changed, 0 insertions, 0 deletions