From patchwork Thu Jun 23 11:33:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 12892125 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 44121CCA480 for ; Thu, 23 Jun 2022 11:33:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=U8QT7qef31eFUKTkZKzFMQOHH1g9n44/3U0Y1Aj7HOE=; b=TTVKSaPHyl4Mif xbagCrlX9fRCs5eqwY+tXmhuoEiyFRzCFWk6didLQCyZoFFILR/KXrGaTY+t9hAuxC8NtIzG1GlpT Sk3gfto+LmyCdv4OCwXr1Wd6l/UIHecCTrmms8+v3i7OXpx107hU/2qpmyOhVwzB7PT271dK5SqHZ q8GclhAKZ+yVK0b7BoRsv95smd0coyTVZAUd9Ew7ZXe4nXbVpiWdpJSTUzx8aKBdjree9L7QPGoDk 0T5oxZO+3Lg9E/4x2rViUMgY/aBGX+KGOWkWbbrf/xeo44kshdo/z60uOC+1k5k+209hh61CxsX7S YgYxBTafq118L+4IzRTw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o4L5p-00Ejko-MH; Thu, 23 Jun 2022 11:33:49 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o4L5j-00EjiP-KQ for linux-phy@lists.infradead.org; Thu, 23 Jun 2022 11:33:47 +0000 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 ams.source.kernel.org (Postfix) with ESMTPS id D316CB8224A; Thu, 23 Jun 2022 11:33:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 595B3C341C7; Thu, 23 Jun 2022 11:33:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655984019; bh=rF+KnkI8TrvuBOWUOKxZrJzbKbUt+JURZ8zGL45kkxs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f31BjyG3rUQD5UMRNzPEvh6jmBF8vkqf3MgFOKD1wvcbTfM0XrSwXr85kmFd6aMif sLG7i4v0Df/TpIGNn50+q4w9Y386n5yEcjP4PoTjsx/SWCDpmxC2yvbaneNdnt3aeP PcOqQMdDNW4SPC2wiE+8wXH+emXMJvzhVozCrjc8qu+DbzLdqu95Wm896fvCZEPvbm z6ezr2lYK/epWpI446emHB6gwJz+iDT65N78UmQcdptQ43ullzZzUYsm6b1jw9rlzk vGwXg8EYWINeprBEKy14Sc0EHOJDIPYUG6Du10lcvOniI+LD/nayokD6/e4tmiSqRB WRtX1CfVruapw== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1o4L5c-0007kL-Kr; Thu, 23 Jun 2022 13:33:36 +0200 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Kishon Vijay Abraham I , Dmitry Baryshkov , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 1/3] phy: qcom-qmp-pcie: drop obsolete pipe clock type check Date: Thu, 23 Jun 2022 13:33:12 +0200 Message-Id: <20220623113314.29761-2-johan+linaro@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220623113314.29761-1-johan+linaro@kernel.org> References: <20220623113314.29761-1-johan+linaro@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220623_043343_845366_F23D8A2B X-CRM114-Status: GOOD ( 11.59 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Drop the obsolete pipe clock handling which was used to treat the pipe clock as optional for types other than PCIe and USB and which is no longer needed since splitting the PHY driver. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c index b2cd0cf965d8..385ea3d8de08 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c @@ -2210,26 +2210,11 @@ int qcom_qmp_phy_pcie_create(struct device *dev, struct device_node *np, int id, if (!qphy->pcs_misc) dev_vdbg(dev, "PHY pcs_misc-reg not used\n"); - /* - * Get PHY's Pipe clock, if any. USB3 and PCIe are PIPE3 - * based phys, so they essentially have pipe clock. So, - * we return error in case phy is USB3 or PIPE type. - * Otherwise, we initialize pipe clock to NULL for - * all phys that don't need this. - */ snprintf(prop_name, sizeof(prop_name), "pipe%d", id); qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name); if (IS_ERR(qphy->pipe_clk)) { - if (cfg->type == PHY_TYPE_PCIE || - cfg->type == PHY_TYPE_USB3) { - ret = PTR_ERR(qphy->pipe_clk); - if (ret != -EPROBE_DEFER) - dev_err(dev, - "failed to get lane%d pipe_clk, %d\n", - id, ret); - return ret; - } - qphy->pipe_clk = NULL; + return dev_err_probe(dev, PTR_ERR(qphy->pipe_clk), + "failed to get lane%d pipe clock\n", id); } generic_phy = devm_phy_create(dev, np, &qcom_qmp_phy_pcie_ops); From patchwork Thu Jun 23 11:33:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 12892124 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2D7B0C433EF for ; Thu, 23 Jun 2022 11:33:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=X7Jc6M0LGs0eEEtUTyrHqfXlN/Fql5EbmhGXEn6hAqg=; b=twWNiPvDqB0CBI UQgZ3lCOorwQCFXenMZ0M8TFN+dCnvStouRqe8DSAeaj+bQpBvit23CEXdcvz6q7JQtzzPMI2c5p3 nfu+WhOXbNv1jw3YsD/zSSakfyAvU3+QJfAxXhLpzjPY7nRhvmQG1UIk4D3Iy6knt9xRZzmgnGqQy te1gZgkZo2BnwBij3IKBr9mF0l70syUvWRW7XFnMm1W6zuBzeY2P2jKVz6p78So1lon/ubv+3MCb0 xBXtPJFzUOU5Hd7gYTCRdytavgETriZNGfPFLsrmDNmShngO5Y97VM7ByL32sD1qGMTwJS9eaJDAz T2xlkbVY5wyl1EzMh1YA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o4L5o-00EjkZ-J1; Thu, 23 Jun 2022 11:33:48 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o4L5j-00EjiO-4Y for linux-phy@lists.infradead.org; Thu, 23 Jun 2022 11:33:47 +0000 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 ams.source.kernel.org (Postfix) with ESMTPS id 2166AB8224E; Thu, 23 Jun 2022 11:33:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49F71C341C6; Thu, 23 Jun 2022 11:33:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655984019; bh=xprJTN5w5gXBlNSXfX5SAAvt9W561yQWJjzVR1zxOVY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C6vhk84cdEDrKkEXXkhZsMXaP1x3L5Mstd9vY/jiTd4AzlqwpWR8h/HXBap3E9eff NSm3qkTADJNuXKzXBOM9hmr2FRCNnC1T0uTaAzP2l9LsLOHAxoF6NQSy9copZoAJ/s 4TNtG1pe4cZcMRY2e2A3HCBjq6aK/2iQIph42IvWukXaDdIzcnh86tPsYZx3dgElXF 3PrTjXqyIZXv1CgkUhbVjxMtW4YPkulVN3mAwfH8eCb3rccAVH7FYGJ//HLAWE4JJJ hXh4dna9xDJd6fNyC6kzlQFKgCHgiazuNEcNMfrW5uoz3ClF+fVbqvGmpnkastKxwX CnsN+JLCvtfeg== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1o4L5c-0007kN-NL; Thu, 23 Jun 2022 13:33:36 +0200 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Kishon Vijay Abraham I , Dmitry Baryshkov , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 2/3] phy: qcom-qmp-pcie-msm8996: drop obsolete pipe clock type check Date: Thu, 23 Jun 2022 13:33:13 +0200 Message-Id: <20220623113314.29761-3-johan+linaro@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220623113314.29761-1-johan+linaro@kernel.org> References: <20220623113314.29761-1-johan+linaro@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220623_043343_359390_336E8F5D X-CRM114-Status: GOOD ( 11.91 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Drop the obsolete pipe clock handling which was used to treat the pipe clock as optional for types other than PCIe and USB and which is no longer needed since splitting the PHY driver. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov --- .../phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c index 48ea1de81d7c..812d14afb5ec 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c @@ -904,26 +904,11 @@ int qcom_qmp_phy_pcie_msm8996_create(struct device *dev, struct device_node *np, if (!qphy->pcs_misc) dev_vdbg(dev, "PHY pcs_misc-reg not used\n"); - /* - * Get PHY's Pipe clock, if any. USB3 and PCIe are PIPE3 - * based phys, so they essentially have pipe clock. So, - * we return error in case phy is USB3 or PIPE type. - * Otherwise, we initialize pipe clock to NULL for - * all phys that don't need this. - */ snprintf(prop_name, sizeof(prop_name), "pipe%d", id); qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name); if (IS_ERR(qphy->pipe_clk)) { - if (cfg->type == PHY_TYPE_PCIE || - cfg->type == PHY_TYPE_USB3) { - ret = PTR_ERR(qphy->pipe_clk); - if (ret != -EPROBE_DEFER) - dev_err(dev, - "failed to get lane%d pipe_clk, %d\n", - id, ret); - return ret; - } - qphy->pipe_clk = NULL; + return dev_err_probe(dev, PTR_ERR(qphy->pipe_clk), + "failed to get lane%d pipe clock\n", id); } /* Get lane reset, if any */ From patchwork Thu Jun 23 11:33:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 12892123 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E1139C433EF for ; Thu, 23 Jun 2022 11:33:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=f0tA9f22+HktCiRk5T9/80EaftPJvsZmmaAb2I9hGxA=; b=WFN2jl1//LuTaF f3ZgEeoir7CDjiIA67BjlrA9HbmFTfY3k993U0eU11YSCwq131rgh60nxcrXvA9ecnkZo8liEGi7j CH9KVXCxK1QN0pYGqCCsoQUDshG5IroCe3BBEArXo96gZFgUyfh0V0Ggh7QKb3HZJoqt1qLRhV8Rt pIN9P8H395zVkuEzUr8grgI0CBtzHtzd0xaHFJAQ/7t6Sqp4hJGzupLSis6r+fyBRnkhENeZIAYS9 RePZC8D01GTDSQm+JhsBxN8uGXcJdEz8//6RLigwaNFMo/h7nszTXL+QuliXyXacoEwVh1CIWkq4n sBQ+NEEygZjIwGKKJzXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o4L5l-00EjjS-AI; Thu, 23 Jun 2022 11:33:45 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o4L5j-00EjiK-4W for linux-phy@lists.infradead.org; Thu, 23 Jun 2022 11:33:44 +0000 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 DBBB660FAD; Thu, 23 Jun 2022 11:33:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4518AC3411B; Thu, 23 Jun 2022 11:33:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655984019; bh=4OZWF88ZGl7gNa7eawf1xJ3ZOtfszFqU8X+FxZF/O3E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QRlTwtmP0+T7kG1SQrsC3QOFxOnes+2sZ3eGK0AEe8ZPloEP1/h5Rh7BB2TFocbCh YsjO7Sc8CQMLMPoGLDlDX3pqRisbJKXVkVppHY6m4/5jbb+K+e9v0ZP24DdGCa2P5G 1o6OfRmzTLgZrRmckzYZLEBQTjhbOncEhU9nya3Em1UNUCUiXU3D7EB+YiEW7pXeci FoSAn/Q3z/Qn75p+7kjOdbt4Ke0T5rdT17JhGakXeLtsrY4mMB9pRmsI6TF/6COZpq 668QaX3oIrYmlKg2m8kYQRLEMPW3SO+8Vh10jIgOmv5d1nR5U3XB72Zfac6RbpEKFl YuaQ+sxwtdBvw== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1o4L5c-0007kP-Q9; Thu, 23 Jun 2022 13:33:36 +0200 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Kishon Vijay Abraham I , Dmitry Baryshkov , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 3/3] phy: qcom-qmp-usb: clean up pipe clock handling Date: Thu, 23 Jun 2022 13:33:14 +0200 Message-Id: <20220623113314.29761-4-johan+linaro@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220623113314.29761-1-johan+linaro@kernel.org> References: <20220623113314.29761-1-johan+linaro@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220623_043343_252156_E15706EA X-CRM114-Status: GOOD ( 10.82 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Clean up the pipe clock handling by using dev_err_probe() to handle probe deferral and dropping the obsolete comment that claimed that the pipe clock was optional for some other PHY types. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c index aebe5ed4e4e3..40e87f75ec4a 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c @@ -2530,22 +2530,11 @@ int qcom_qmp_phy_usb_create(struct device *dev, struct device_node *np, int id, if (!qphy->pcs_misc) dev_vdbg(dev, "PHY pcs_misc-reg not used\n"); - /* - * Get PHY's Pipe clock, if any. USB3 and PCIe are PIPE3 - * based phys, so they essentially have pipe clock. So, - * we return error in case phy is USB3 or PIPE type. - * Otherwise, we initialize pipe clock to NULL for - * all phys that don't need this. - */ snprintf(prop_name, sizeof(prop_name), "pipe%d", id); qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name); if (IS_ERR(qphy->pipe_clk)) { - ret = PTR_ERR(qphy->pipe_clk); - if (ret != -EPROBE_DEFER) - dev_err(dev, - "failed to get lane%d pipe_clk, %d\n", - id, ret); - return ret; + return dev_err_probe(dev, PTR_ERR(qphy->pipe_clk), + "failed to get lane%d pipe clock\n", id); } generic_phy = devm_phy_create(dev, np, &qcom_qmp_phy_usb_ops);