Re: [PATCH V2 3/3] tty: serial: qcom_geni_serial: Fix the UART wakeup issue
On 2020-08-17 23:12, Matthias Kaehlcke wrote: On Fri, Jul 24, 2020 at 09:28:02AM +0530, satya priya wrote: As a part of system suspend we call uart_port_suspend from the Serial driver, which calls set_mctrl passing mctrl as NULL. This makes RFR high(NOT_READY) during suspend. Due to this BT SoC is not able to send wakeup bytes to UART during suspend. Included if check for non-suspend case to keep RFR low during suspend. Signed-off-by: satya priya --- Changes in V2: - This patch fixes the UART flow control issue during suspend. Newly added in V2. drivers/tty/serial/qcom_geni_serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c index 07b7b6b..7108dfc 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c @@ -242,7 +242,7 @@ static void qcom_geni_serial_set_mctrl(struct uart_port *uport, if (mctrl & TIOCM_LOOP) port->loopback = RX_TX_CTS_RTS_SORTED; - if (!(mctrl & TIOCM_RTS)) + if ((!(mctrl & TIOCM_RTS)) && (!(uport->suspended))) Why all these parentheses, instead of: if (!(mctrl & TIOCM_RTS) && !uport->suspended) ? ok. Will remove the extra parentheses.
Re: [PATCH V2 3/3] tty: serial: qcom_geni_serial: Fix the UART wakeup issue
On Fri, Jul 24, 2020 at 09:28:02AM +0530, satya priya wrote: > As a part of system suspend we call uart_port_suspend from the > Serial driver, which calls set_mctrl passing mctrl as NULL. This > makes RFR high(NOT_READY) during suspend. > > Due to this BT SoC is not able to send wakeup bytes to UART during > suspend. Included if check for non-suspend case to keep RFR low > during suspend. > > Signed-off-by: satya priya > --- > Changes in V2: > - This patch fixes the UART flow control issue during suspend. >Newly added in V2. > > drivers/tty/serial/qcom_geni_serial.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/tty/serial/qcom_geni_serial.c > b/drivers/tty/serial/qcom_geni_serial.c > index 07b7b6b..7108dfc 100644 > --- a/drivers/tty/serial/qcom_geni_serial.c > +++ b/drivers/tty/serial/qcom_geni_serial.c > @@ -242,7 +242,7 @@ static void qcom_geni_serial_set_mctrl(struct uart_port > *uport, > if (mctrl & TIOCM_LOOP) > port->loopback = RX_TX_CTS_RTS_SORTED; > > - if (!(mctrl & TIOCM_RTS)) > + if ((!(mctrl & TIOCM_RTS)) && (!(uport->suspended))) Why all these parentheses, instead of: if (!(mctrl & TIOCM_RTS) && !uport->suspended) ?
Re: [PATCH V2 3/3] tty: serial: qcom_geni_serial: Fix the UART wakeup issue
On 7/24/2020 9:28 AM, satya priya wrote: As a part of system suspend we call uart_port_suspend from the Serial driver, which calls set_mctrl passing mctrl as NULL. This makes RFR high(NOT_READY) during suspend. Due to this BT SoC is not able to send wakeup bytes to UART during suspend. Included if check for non-suspend case to keep RFR low during suspend. Reviewed-by: Akash Asthana Signed-off-by: satya priya --- Changes in V2: - This patch fixes the UART flow control issue during suspend. Newly added in V2. drivers/tty/serial/qcom_geni_serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c index 07b7b6b..7108dfc 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c @@ -242,7 +242,7 @@ static void qcom_geni_serial_set_mctrl(struct uart_port *uport, if (mctrl & TIOCM_LOOP) port->loopback = RX_TX_CTS_RTS_SORTED; - if (!(mctrl & TIOCM_RTS)) + if ((!(mctrl & TIOCM_RTS)) && (!(uport->suspended))) uart_manual_rfr = UART_MANUAL_RFR_EN | UART_RFR_NOT_READY; writel(uart_manual_rfr, uport->membase + SE_UART_MANUAL_RFR); } -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\na Linux Foundation Collaborative Project
Re: [PATCH V2 3/3] tty: serial: qcom_geni_serial: Fix the UART wakeup issue
On Fri, Jul 24, 2020 at 09:28:02AM +0530, satya priya wrote: > As a part of system suspend we call uart_port_suspend from the > Serial driver, which calls set_mctrl passing mctrl as NULL. This > makes RFR high(NOT_READY) during suspend. > > Due to this BT SoC is not able to send wakeup bytes to UART during > suspend. Included if check for non-suspend case to keep RFR low > during suspend. > > Signed-off-by: satya priya Acked-by: Greg Kroah-Hartman
[PATCH V2 3/3] tty: serial: qcom_geni_serial: Fix the UART wakeup issue
As a part of system suspend we call uart_port_suspend from the Serial driver, which calls set_mctrl passing mctrl as NULL. This makes RFR high(NOT_READY) during suspend. Due to this BT SoC is not able to send wakeup bytes to UART during suspend. Included if check for non-suspend case to keep RFR low during suspend. Signed-off-by: satya priya --- Changes in V2: - This patch fixes the UART flow control issue during suspend. Newly added in V2. drivers/tty/serial/qcom_geni_serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c index 07b7b6b..7108dfc 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c @@ -242,7 +242,7 @@ static void qcom_geni_serial_set_mctrl(struct uart_port *uport, if (mctrl & TIOCM_LOOP) port->loopback = RX_TX_CTS_RTS_SORTED; - if (!(mctrl & TIOCM_RTS)) + if ((!(mctrl & TIOCM_RTS)) && (!(uport->suspended))) uart_manual_rfr = UART_MANUAL_RFR_EN | UART_RFR_NOT_READY; writel(uart_manual_rfr, uport->membase + SE_UART_MANUAL_RFR); } -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation