Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4372457rwd; Tue, 30 May 2023 04:41:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4+UhiwjA3rA0pyDeIMWAJszzokFVHfXBMpf29keZ7Aq6QEp78kCJCUHQzeMA0RTeYg5uVT X-Received: by 2002:a17:903:1205:b0:1ac:921c:87fc with SMTP id l5-20020a170903120500b001ac921c87fcmr2369401plh.32.1685446912406; Tue, 30 May 2023 04:41:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685446912; cv=none; d=google.com; s=arc-20160816; b=N9QpUjwggxitkB5kgO8VrGYBT+xUkCjQ5bCMB7TXqoA5z66nuLa+ioGy9HpDEt9YUK TyKAH/yLwIwVGgX70CJrq1Vd1UvVpqr6CeauHv4E/R2rk0vLKMsB3d0MMlwt8P423xns d0KhslNvmrztYllobWI0GEwwbpvpamhr6rXfAqCu7IaAItKvmiax1cMrcO/s9BYnNCEp r17o+EnVHC2Kobnp+fVOuXF6j7xH2hMnrjMJAlB8MVDVq3j+2+l0uTH3u3Vwf/bXMGUJ P6WgjMlPgyAwjWCXZnNvRzR7O6CcvONqS1Tf9DGYN9wFDSJaN9rIniF8dNqpSwWjZzzy G9wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=itfenvgDHTyxp1L5qxO18pecrhAyNG1011llMvDnQMU=; b=tdsY+FCCRIFwrZ7AtSOZJFd3WuJWrjqZVRsna1WkAeqNNfJfTR1zdoyxXuitc4c1PC d91Zi+rFCbIlXWR6LPy+kcNC1rIbjAk21VwH5WgibcN0BXa0Myul91pv+G33oo4srRWH hOQwaz4s3Tigi8ceFeGGtx9RqxAkkVxqQocGfE4Dehi9+sAbmuVrZruXOnzIrhPXVm+B v6WfGtCH3CsmImD919B/8lGQPLJc16Ur0HsNWo25AhLXBNypeYRA80eBlfvJ3E09BzH+ Ns6nllvxn2e8LFUobul5jknUmTkQQE6c0X7QZCRnQqsBYTIK/Ad1BJCwWBSu8AKslBo+ Rj+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=YhqObDpA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z10-20020a170903018a00b001ac59bc1c20si141984plg.47.2023.05.30.04.41.40; Tue, 30 May 2023 04:41:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=YhqObDpA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231347AbjE3LQY (ORCPT + 99 others); Tue, 30 May 2023 07:16:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231298AbjE3LQT (ORCPT ); Tue, 30 May 2023 07:16:19 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0281E5; Tue, 30 May 2023 04:16:18 -0700 (PDT) Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34UAxIDq006267; Tue, 30 May 2023 11:16:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id; s=qcppdkim1; bh=itfenvgDHTyxp1L5qxO18pecrhAyNG1011llMvDnQMU=; b=YhqObDpAwMPRrc76syfjTfcX/goGEoo00rty5aUl6IiaYQCy/AZ58KF7kRHgXuD+4BWs KD6BGE2uXv8C4uKYbKGDSI+jvmgvjvZ2t5XgHm+OwtPlV1bJSmj2yvzsCNqHzUSkeAog Plqs9Q7+jb7fFVLE6jsBvDZ3PrIoqC7+npYAhCQap1aGt6O0/s1E4JijddYacgVy3OQn 1uYu0HOsW5REg3iJNcBMP02Tgf7cKoAm7ZQG28ZI/xwUbZKUOxYIOslulGVIJMmZ9XVq XtB1rpqu16MhuQZmpv4BqrPzE2pMf5IhSZdHLArF9tr7ObfOadrLx1y812VKBGZGYqKt mw== Received: from apblrppmta02.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qwa34grdy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 30 May 2023 11:16:14 +0000 Received: from pps.filterd (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 34UBG9BG007539; Tue, 30 May 2023 11:16:09 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTP id 3quaxka9pc-1; Tue, 30 May 2023 11:16:09 +0000 Received: from APBLRPPMTA02.qualcomm.com (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 34UBG93m007534; Tue, 30 May 2023 11:16:09 GMT Received: from hu-maiyas-hyd.qualcomm.com (hu-mraninga-hyd.qualcomm.com [10.213.107.117]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTP id 34UBG9bC007533; Tue, 30 May 2023 11:16:09 +0000 Received: by hu-maiyas-hyd.qualcomm.com (Postfix, from userid 4325269) id 690C65000AF; Tue, 30 May 2023 16:46:08 +0530 (+0530) From: Mehul Raninga To: agross@kernel.org, andersson@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 Cc: quic_vdadhani@quicinc.com, quic_vtanuku@quicinc.com, quic_vnivarth@quicinc.com, Mehul Raninga Subject: [PATCH] serial: qcom_geni_serial: Setup serial port after Deep sleep Date: Tue, 30 May 2023 16:45:57 +0530 Message-Id: <20230530111557.10944-1-quic_mraninga@quicinc.com> X-Mailer: git-send-email 2.17.1 X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 5LvPNkpv05sofZel4uMjGzIOq26WjmVY X-Proofpoint-GUID: 5LvPNkpv05sofZel4uMjGzIOq26WjmVY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-05-30_08,2023-05-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 lowpriorityscore=0 phishscore=0 adultscore=0 bulkscore=0 spamscore=0 suspectscore=0 impostorscore=0 malwarescore=0 priorityscore=1501 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305300093 X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While exiting deep sleep, serial port loses its configuration hence it prints garbage characters on console. Set serial port configuration while resume from deep sleep. 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()) + qcom_geni_serial_port_setup(uport); } return ret; } -- 2.17.1