Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f16c6827 authored by Akash Asthana's avatar Akash Asthana Committed by Gerrit - the friendly Code Review server
Browse files

serial: msm_geni_serial: Align to HW assisted flow control support



If client enables HW AUTOCTS mode then set UPSTAT_AUTOCTS,otherwise
serial core disables TX fully at the framework layer and
no communication happens.

Change-Id: Ied2bec705991aad16638f767c09f33ae4dbfafdf
Signed-off-by: default avatarAkash Asthana <akashast@codeaurora.org>
parent 3610811d
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1908,7 +1908,7 @@ static void msm_geni_serial_set_termios(struct uart_port *uport,
		break;
	}


	uport->status  &= ~(UPSTAT_AUTOCTS);
	/* stop bits */
	if (termios->c_cflag & CSTOPB)
		stop_bit_len = TX_STOP_BIT_LEN_2;
@@ -1916,8 +1916,10 @@ static void msm_geni_serial_set_termios(struct uart_port *uport,
		stop_bit_len = TX_STOP_BIT_LEN_1;

	/* flow control, clear the CTS_MASK bit if using flow control. */
	if (termios->c_cflag & CRTSCTS)
	if (termios->c_cflag & CRTSCTS) {
		tx_trans_cfg &= ~UART_CTS_MASK;
		uport->status |= UPSTAT_AUTOCTS;
	}
	else
		tx_trans_cfg |= UART_CTS_MASK;
	/* status bits to ignore */