From patchwork Thu Jul 14 12:43:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 590416 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 B61DBCCA48A for ; Thu, 14 Jul 2022 12:44:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238094AbiGNMof (ORCPT ); Thu, 14 Jul 2022 08:44:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239492AbiGNMoL (ORCPT ); Thu, 14 Jul 2022 08:44:11 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 878A012629; Thu, 14 Jul 2022 05:44:10 -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 sin.source.kernel.org (Postfix) with ESMTPS id BB6D1CE26A7; Thu, 14 Jul 2022 12:44:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9BC53C341DE; Thu, 14 Jul 2022 12:44:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657802645; bh=/vdrzpj1m7eqBV6SFnyhWrugY9ghVbbon0lym+Lzgkg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EOmneFR1RJp2AUoMuvbpP7N51zc9ML7/iYWlWV0HwelsXLRZzKbbOr+t7E0iJMpT3 Qs4II4C3fmolb43ZukjEsB7fCA8e4wSaNC4vXkv5+cuKq7ED1MUJHZwD26RtfIKUBW /jwvMcQ6S82pRkbKTxbFfb6j252dV7Bvofy91jCGusZo45+1hdvW8wByJWe+tsWHVV Rea7HflVsdA6vApNmkmlftDejzvPe7YzA4Qp9AnewgW8Jvh7Ie0qiZyVxUjlTX8U+Z 3SbCTR7xv8uKK16SXG+5FIZkc77HO7mkxRf3i03OO1cjsCSJc7wHkM53OeGkn3s0II g2QVfuIHR/U7Q== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1oByCR-0007EF-0B; Thu, 14 Jul 2022 14:44:11 +0200 From: Johan Hovold To: Vinod Koul , Rob Herring , Krzysztof Kozlowski Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Kishon Vijay Abraham I , Dmitry Baryshkov , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , Krzysztof Kozlowski Subject: [PATCH v3 25/30] phy: qcom-qmp-pcie: drop pipe clock lane suffix Date: Thu, 14 Jul 2022 14:43:28 +0200 Message-Id: <20220714124333.27643-26-johan+linaro@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220714124333.27643-1-johan+linaro@kernel.org> References: <20220714124333.27643-1-johan+linaro@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The pipe clock is defined in the "lane" node so there's no need to keep adding a redundant lane-number suffix to the clock name. Update driver to support the new binding where the pipe clock name has been deprecated by instead requesting the clock by index. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c index 2d65e1f56bfc..3ddbb8e89f04 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c @@ -2314,7 +2314,6 @@ int qcom_qmp_phy_pcie_create(struct device *dev, struct device_node *np, int id, struct qcom_qmp *qmp = dev_get_drvdata(dev); struct phy *generic_phy; struct qmp_phy *qphy; - char prop_name[MAX_PROP_NAME]; int ret; qphy = devm_kzalloc(dev, sizeof(*qphy), GFP_KERNEL); @@ -2374,8 +2373,7 @@ 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"); - snprintf(prop_name, sizeof(prop_name), "pipe%d", id); - qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name); + qphy->pipe_clk = devm_get_clk_from_child(dev, np, NULL); if (IS_ERR(qphy->pipe_clk)) { return dev_err_probe(dev, PTR_ERR(qphy->pipe_clk), "failed to get lane%d pipe clock\n", id);