serial:msm_geni_serial: Handling the cts counter in uart driver

Handle the CTS counter whenever the change in CTS interrupt occur.
Using the M_IO_DATA_ASSERT bit in interrupt register, this will get
set when CTS is high.

Change-Id: I43c629f4d026af4a7e82d0d6d01b826259b0b1b5
Signed-off-by: Venkata Manasa Kakarla <venkka@codeaurora.org>
This commit is contained in:
Venkata Manasa Kakarla 2020-10-05 15:40:36 +05:30 • committed by Gerrit - the friendly Code Review server
commit ebb465e63e

View file

@ -122,7 +122,9 @@
#define DATA_BYTES_PER_LINE (32)
#define M_IRQ_BITS (M_RX_FIFO_WATERMARK_EN | M_RX_FIFO_LAST_EN |\
M_CMD_CANCEL_EN | M_CMD_ABORT_EN)
M_CMD_CANCEL_EN | M_CMD_ABORT_EN |\
M_IO_DATA_ASSERT_EN | M_IO_DATA_DEASSERT_EN)
#define S_IRQ_BITS (S_RX_FIFO_WATERMARK_EN | S_RX_FIFO_LAST_EN |\
S_CMD_CANCEL_EN | S_CMD_ABORT_EN)
#define DMA_TX_IRQ_BITS (TX_RESET_DONE | TX_DMA_DONE |\
@ -2035,6 +2037,13 @@ static void msm_geni_serial_handle_isr(struct uart_port *uport,
goto exit_geni_serial_isr;
}
if (m_irq_status & (M_IO_DATA_ASSERT_EN | M_IO_DATA_DEASSERT_EN)) {
uport->icount.cts++;
IPC_LOG_MSG(msm_port->ipc_log_misc,
"%s. cts counter:%d\n", __func__,
uport->icount.cts);
}
if (s_irq_status & S_RX_FIFO_WR_ERR_EN) {
uport->icount.overrun++;
tty_insert_flip_char(tport, 0, TTY_OVERRUN);