From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F169C77B7A for ; Thu, 1 Jun 2023 04:04:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229598AbjFAED5 (ORCPT ); Thu, 1 Jun 2023 00:03:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbjFAED4 (ORCPT ); Thu, 1 Jun 2023 00:03:56 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEC7DB2; Wed, 31 May 2023 21:03:54 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 82F2E61646; Thu, 1 Jun 2023 04:03:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 069F9C433D2; Thu, 1 Jun 2023 04:03:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685592233; bh=FpUMA+UmpnfCAjI0s1Cjb5HWSEuHsI8wU/Ubh3Bc0Rk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FxKoEm2DV+jtUJJSL8K6aCnFQSKSls4+YREVf9zr9+TC+8tkxYBY5p4jaafJtotuf jWei1nLx3iPbN0UwZMp8seD365yMPBvHmm9t9afAv+HgFcGSNLWStCO+vpisfzLWRg 3fE8QvHpkKmHNRh65u0rR7xlupD/7aK76DsS17U1o8xjYCUKKofDr21SOnXg8CHijC xq6AwOXsqyiqVGr7z1qWhDv7LeHezxWnD0QcqmE88FVR4y2AyVxRvHCe3eeNWVnUa9 8RXE+Qc+2W5TpQjo+A1yn50EnCmb4dLkFJs10btgRGjF93rUmtdwtorI8Y45a1dkNX cQ8nvI0v/1r/w== Date: Wed, 31 May 2023 21:07:34 -0700 From: Bjorn Andersson To: "Mehul Raninga (Temp) (QUIC)" 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" , "Viken Dadhaniya (QUIC)" , "Visweswara Tanuku (QUIC)" , "Vijaya Krishna Nivarthi (Temp) (QUIC)" Subject: Re: [PATCH] serial: qcom_geni_serial: Setup serial port after Deep sleep Message-ID: <20230601040734.qiy3ibrpznrqptui@ripper> References: <20230530111557.10944-1-quic_mraninga@quicinc.com> <20230530150631.7eg6nkre6sva5dcz@ripper> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Wed, May 31, 2023 at 01:06:22PM +0000, Mehul Raninga (Temp) (QUIC) wrote: > Hello Andersson, > Thanks for the review. Kindly find my reply inline below > > > -----Original Message----- > > From: Bjorn Andersson > > Sent: Tuesday, May 30, 2023 8:37 PM > > To: Mehul Raninga (Temp) (QUIC) > > 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; Viken Dadhaniya (QUIC) > > ; Visweswara Tanuku (QUIC) > > ; Vijaya Krishna Nivarthi (Temp) (QUIC) > > > > Subject: Re: [PATCH] serial: qcom_geni_serial: Setup serial port after Deep sleep > > > > WARNING: This email originated from outside of Qualcomm. Please be wary of > > any links or attachments, and do not enable macros. > > > > 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? > > I will reword commit message in V2 as below: > Serial port lost its configuration sometime after suspend hence it > prints garbage characters on console after resuming. Please wrap your replies to 72 chars wide You can probably be more specific than "sometime after suspend" :) > > > > > > > > Set serial port configuration while resume from deep sleep. > > > > > > > What happens if you do this unconditionally? > > pm_suspend_via_firmware returns true indicating system is resuming > from deepsleep. In case we are not resuming from deepsleep, this > serial port setup is not required. > > > > > Signed-off-by: Mehul Raninga > > > --- > > > 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 > > > #include > > > #include > > > +#include > > > #include > > > #include > > > #include > > > @@ -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? > > Not all the platform supports deep sleep hence to differentiate if > resume is from deep sleep suspend or normal suspend, this api is > required. Can you point me to where this difference in flags is coming from in the upstream kernel? Thanks, Bjorn > > > > Regards, > > Bjorn > > > > > + qcom_geni_serial_port_setup(uport); > > > } > > > return ret; > > > } > > > -- > > > 2.17.1 > > >