Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp187014lqz; Fri, 29 Mar 2024 12:52:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX9DCmyBZefXNzWG6teWX1znAx3xGPWBVG9SnoJDVkNZcvzKbVmdWxZu2tp3b7eIMcMOjTN7du09Xeng7/WezGkF/cTqMEDobztjANr0A== X-Google-Smtp-Source: AGHT+IFi2uUt0vNK4el9QdJNLjrVxLTRksngkds1lKEzQ1gSSHXqAqNGVHXTilKMBraXz/p21s6L X-Received: by 2002:a17:902:ecc2:b0:1e2:2139:5d61 with SMTP id a2-20020a170902ecc200b001e221395d61mr3446766plh.1.1711741951966; Fri, 29 Mar 2024 12:52:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711741951; cv=pass; d=google.com; s=arc-20160816; b=UzrrxaGAYP8s+TepP7E2YkTSo2lSJGNTU+ogRWHSakwPt5ISUHl3eGtGlDQWs0KqPs D1wesCkwM5fahMfFJNSg9mjrJ1s2n8uxOX6iiHZqu8DSzC2n8MlgyHbgfqnIe58d9BqI 8rxdCC5o8A56Ns3zoY5GVRlW0znh4kWg2IfapIx8zZdNMkf5KHGE8ANwKNNDPR2SEzzr shfmdtI5BDrL9HroW/8GVEqIjJfuh1mGMXIB1DhJ+FEJ9ZfnVlT5cAhNQsf2KcRznva+ e0ya2vZq7xa0qCaWL+BVOknAAXPQ62aO/WWGUJr/Hx0xZqibH8WOe9M/SmAGVh3CAR/C iQ2g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:subject:cc:to:from:dkim-signature; bh=7rock+tuzQRHkqfp1Y4Kn8OYDsz+pZ5CBU3sKrV+tGY=; fh=Cmk5VdyNK7ZP4dSldofJm5eE3IRyqWhCNaen4XhkrIo=; b=YgGj63mrO/NPgoOTcHQoasrkvnu1PYUvcrgTUBDmLV2PkcZhVvUqlnHyx0fp35/ZI0 OLVShpAFJe9MJdkjEsTurcHbIG10uw6OSSLsvEJqRhjsGFUPne18b17HxGOtbY8MuVrW O3tQJgiRxeK+eoY4edZ4Ovt1dG3oazSP4Xv5K2V4NsFXBa2EpN7/Tdy7Ryxwt2BNNx5k dDTxF3JY0TONLRaCPnU83zXEM9ievx8bgK/Q1RoIr6D7bKjY29KYSrjCfhFM+b/fww59 mrgc2RC/RwyVM8sdmgEPdXlWPS7jHiF04oXN9KaQ9zFPuXxnTTMhSX0fE3bqqVYV2zWA 2FWQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=XhZxwfMs; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-125366-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125366-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u2-20020a170902e80200b001ddb6bbc698si4310252plg.107.2024.03.29.12.52.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 12:52:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-125366-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=XhZxwfMs; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-125366-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125366-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7A74D285622 for ; Fri, 29 Mar 2024 19:52:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B252613C9D4; Fri, 29 Mar 2024 19:50:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="XhZxwfMs" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3A39D10942; Fri, 29 Mar 2024 19:50:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711741856; cv=none; b=r66PdmsVqQRcKKsuwiJEzLJyp96+TYNnMd+WDhwkO456SsKT99djVopeXreHvYv77qnjh5JLoJSFoEGso8txNpUdsyI+zv5+P7ACfKjTAP5OkXBzK09YNW6IA1kNkaKi9+1EKbk6m1M7SZbhU/FaP+sfA3VGcRPoD4AEVi6ptwo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711741856; c=relaxed/simple; bh=hy4KenGj6FJNKXWaQloIhutlC4pmT6yKuVEgMSdejsQ=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=f4SrvmgdTxv9qvqpHswxj/fcDze518f9xluZwySRrFMoA7vzypd6Qq8l6j5kNHKPlsUbLhIn8UNpWAGdIGOTQH24dHKYsCddMch9kmwLRN9hi/mFKDfU2J0tnQkwBsSqTbZrKRw0G0ThhLxo4RWgunXCsFybeR4Z0rlzysgcF7g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=XhZxwfMs; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 42TJeOW0000759; Fri, 29 Mar 2024 19:50:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:mime-version:content-type; s= qcppdkim1; bh=7rock+tuzQRHkqfp1Y4Kn8OYDsz+pZ5CBU3sKrV+tGY=; b=Xh ZxwfMs8QqAYUMJTt0PVclF0OA6lmtWlvL0fvd/65OkvkRNgURFP4+b5FhRZ7yTqU xt3rDG9BlstBviwg/6vMjo9KXlRdu3op3E0zT20w4vZAcugchV4Raoxk/oqeqsX0 2MPY20vEaQX86v+uSIrRJbt4r+bOTHLfMqDFY6HatcOr+HlHSYL4NQXFeP35Ac05 VQnp/sk88sLm17xFeRgrXCRZfZDacT52N0tJPIJrNxvj20weLYph1a9VQipUtPFq Dkp7LRVnie9AUYWJXHmDww6atpNtLLKWYIylwXceVdKLjPnFQTCQ3FepwuACy+lo iol8t6dARICIgH/A05ZA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3x5w6g0x66-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 29 Mar 2024 19:50:44 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 42TJohgu024049 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 29 Mar 2024 19:50:43 GMT Received: from khsieh-linux1.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 29 Mar 2024 12:50:43 -0700 From: Kuogee Hsieh To: , , , , , , , , , , , CC: Kuogee Hsieh , , , , , , , Subject: [PATCH v3] phy/qcom-qmp-combo: propagate correct return value at phy_power_on() Date: Fri, 29 Mar 2024 12:50:35 -0700 Message-ID: <1711741835-10044-1-git-send-email-quic_khsieh@quicinc.com> X-Mailer: git-send-email 2.7.4 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: cvI2yOkFUv_7WnJ4YM2eSZGnz7rLQjSe X-Proofpoint-ORIG-GUID: cvI2yOkFUv_7WnJ4YM2eSZGnz7rLQjSe X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-29_13,2024-03-28_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 suspectscore=0 malwarescore=0 adultscore=0 spamscore=0 lowpriorityscore=0 mlxlogscore=999 impostorscore=0 priorityscore=1501 bulkscore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2403210001 definitions=main-2403290178 Currently qmp_combo_dp_power_on() always return 0 in regardless of return value of cfg->configure_dp_phy(). This patch propagate return value of cfg->configure_dp_phy() all the way back to caller. Changes in V3: -- add v2 changes log Changes in V2: -- add Fixes tag -- add dev_err() to qmp_v3_configure_dp_phy() -- add dev_err() to qmp_v4_configure_dp_phy() Fixes: 52e013d0bffa ("phy: qcom-qmp: Add support for DP in USB3+DP combo phy") Signed-off-by: Kuogee Hsieh Reviewed-by: Abhinav Kumar --- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c index 36632fa..513d99d 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c @@ -2343,8 +2343,10 @@ static int qmp_v3_configure_dp_phy(struct qmp_combo *qmp) writel(0x05, qmp->dp_dp_phy + QSERDES_V3_DP_PHY_TX2_TX3_LANE_CTL); ret = qmp_combo_configure_dp_clocks(qmp); - if (ret) + if (ret) { + dev_err(qmp->dev, "dp phy configure failed, err=%d\n", ret); return ret; + } writel(0x04, qmp->dp_dp_phy + QSERDES_DP_PHY_AUX_CFG2); writel(0x01, qmp->dp_dp_phy + QSERDES_DP_PHY_CFG); @@ -2519,8 +2521,10 @@ static int qmp_v4_configure_dp_phy(struct qmp_combo *qmp) int ret; ret = qmp_v456_configure_dp_phy(qmp); - if (ret < 0) + if (ret < 0) { + dev_err(qmp->dev, "dp phy configure failed, err=%d\n", ret); return ret; + } /* * At least for 7nm DP PHY this has to be done after enabling link @@ -2754,6 +2758,7 @@ static int qmp_combo_dp_power_on(struct phy *phy) const struct qmp_phy_cfg *cfg = qmp->cfg; void __iomem *tx = qmp->dp_tx; void __iomem *tx2 = qmp->dp_tx2; + int ret; mutex_lock(&qmp->phy_mutex); @@ -2766,11 +2771,11 @@ static int qmp_combo_dp_power_on(struct phy *phy) cfg->configure_dp_tx(qmp); /* Configure link rate, swing, etc. */ - cfg->configure_dp_phy(qmp); + ret = cfg->configure_dp_phy(qmp); mutex_unlock(&qmp->phy_mutex); - return 0; + return ret; } static int qmp_combo_dp_power_off(struct phy *phy) -- 2.7.4