sc16is7xx: Set AUTOCTS and AUTORTS bits
authorTomasz Moń <tomasz.mon@camlingroup.com>
Tue, 1 Mar 2022 06:03:32 +0000 (07:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Mar 2022 21:16:59 +0000 (22:16 +0100)
commit6e124e58ae2e0e3f6400dce21e942a94a67a7949
tree3207415fc634388515ad1d48a9978010da303259
parent21144bab4f1191e01e1cf785720e6af99d86a347
sc16is7xx: Set AUTOCTS and AUTORTS bits

Let serial core know that the chip automatically handles RTS/CTS signal.
This elimines completely unnecessary I2C/SPI bus traffic.

Cease reading from RX FIFO (by disabling RDI interrupt) when throttled.
Eventually the FIFO will fill up and the device will drive RTS output
inactive. Unthrottle by enabling back RDI interrupt.

Indirectly controlling RTS via RX FIFO state seems to be the only option
because RTS bit is ignored when hardware flow control is enabled.

Signed-off-by: Tomasz Moń <tomasz.mon@camlingroup.com>
Link: https://lore.kernel.org/r/20220301060332.2561851-4-tomasz.mon@camlingroup.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sc16is7xx.c