Linux Serial subsystem development
 help / color / mirror / Atom feed
From: Bjorn Andersson <andersson@kernel.org>
To: Mehul Raninga <quic_mraninga@quicinc.com>
Cc: agross@kernel.org, konrad.dybcio@linaro.org,
	gregkh@linuxfoundation.org, jirislaby@kernel.org,
	linux-arm-msm@vger.kernel.org, linux-serial@vger.kernel.org,
	linux-kernel@vger.kernel.org, quic_vdadhani@quicinc.com,
	quic_vtanuku@quicinc.com, quic_vnivarth@quicinc.com
Subject: Re: [PATCH] serial: qcom_geni_serial: Setup serial port after Deep sleep
Date: Tue, 30 May 2023 08:06:31 -0700	[thread overview]
Message-ID: <20230530150631.7eg6nkre6sva5dcz@ripper> (raw)
In-Reply-To: <20230530111557.10944-1-quic_mraninga@quicinc.com>

On Tue, May 30, 2023 at 04:45:57PM +0530, Mehul Raninga wrote:
> While exiting deep sleep, serial port loses its configuration
> hence it prints garbage characters on console.

Presumably it lost its configuration sometime after suspend, rather than
while resuming the system?

> 
> Set serial port configuration while resume from deep sleep.
> 

What happens if you do this unconditionally?

> Signed-off-by: Mehul Raninga <quic_mraninga@quicinc.com>
> ---
>  drivers/tty/serial/qcom_geni_serial.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
> index 8582479f0211..c04b8fec30ba 100644
> --- a/drivers/tty/serial/qcom_geni_serial.c
> +++ b/drivers/tty/serial/qcom_geni_serial.c
> @@ -20,6 +20,7 @@
>  #include <linux/serial.h>
>  #include <linux/serial_core.h>
>  #include <linux/slab.h>
> +#include <linux/suspend.h>
>  #include <linux/tty.h>
>  #include <linux/tty_flip.h>
>  #include <dt-bindings/interconnect/qcom,icc.h>
> @@ -1737,6 +1738,8 @@ static int qcom_geni_serial_sys_resume(struct device *dev)
>  	if (uart_console(uport)) {
>  		geni_icc_set_tag(&port->se, QCOM_ICC_TAG_ALWAYS);
>  		geni_icc_set_bw(&port->se);
> +		if (pm_suspend_via_firmware())

I'm not familiar with this api, but aren't all our systems implementing
firmware-assisted suspend?

Regards,
Bjorn

> +			qcom_geni_serial_port_setup(uport);
>  	}
>  	return ret;
>  }
> -- 
> 2.17.1
> 

  reply	other threads:[~2023-05-30 15:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-30 11:15 [PATCH] serial: qcom_geni_serial: Setup serial port after Deep sleep Mehul Raninga
2023-05-30 15:06 ` Bjorn Andersson [this message]
2023-05-31 13:06   ` Mehul Raninga (Temp) (QUIC)
2023-06-01  4:07     ` Bjorn Andersson
2023-06-02  6:39       ` Mehul Raninga (Temp) (QUIC)
2023-06-10 16:48         ` Bjorn Andersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230530150631.7eg6nkre6sva5dcz@ripper \
    --to=andersson@kernel.org \
    --cc=agross@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=quic_mraninga@quicinc.com \
    --cc=quic_vdadhani@quicinc.com \
    --cc=quic_vnivarth@quicinc.com \
    --cc=quic_vtanuku@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox