From patchwork Fri Nov 11 09:24:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 623883 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 3734CC4332F for ; Fri, 11 Nov 2022 09:26:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233678AbiKKJ0g (ORCPT ); Fri, 11 Nov 2022 04:26:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233661AbiKKJ0T (ORCPT ); Fri, 11 Nov 2022 04:26:19 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C31378790; Fri, 11 Nov 2022 01:26:07 -0800 (PST) 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 39EC0B824A6; Fri, 11 Nov 2022 09:26:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5E76C433D7; Fri, 11 Nov 2022 09:26:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668158764; bh=M1C/r9yglwLdkTmMaGjhYhxCfVmL/pRP5tdyQ69Kpwc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=USkfV5Ahmt3Muz1pAPC0zMHzfE4DUEAcx91OWUmXkHrW5Sd5Ca937t8/jdl0pw+i6 57neOLxSkcaGc4AEyphnZVlvTfEVd4/fp6NncjOvXAvypGcllk1crM+T++yQ6751Pj LMv73ftLx/kNcnJgILJd68osGSh+42YOmafvwqEqwMfLe1h6MRyf3yhhvWcFxAlsS9 e85vjDc8ppYtX4IvPap3UAG8dtKzc5o5YWqytOHepX89A8jYdmpQbP8CPPuZF+NTu+ rKu7ShyxseGKhy1yKgoxi/r39UuGoHu6paFXmU4k91SY1m3cfebLM+ogEmoRE8CbtF AF/zQvfr4s/Zg== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1otQI4-0002kx-TT; Fri, 11 Nov 2022 10:25:36 +0100 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Dmitry Baryshkov , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 05/14] phy: qcom-qmp-combo: register clocks sooner Date: Fri, 11 Nov 2022 10:24:48 +0100 Message-Id: <20221111092457.10546-6-johan+linaro@kernel.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221111092457.10546-1-johan+linaro@kernel.org> References: <20221111092457.10546-1-johan+linaro@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Runtime PM should be enabled before registering the PHYs, but there is no reason that the clocks can not be registered before enabling runtime PM. Signed-off-by: Johan Hovold --- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c index 1bc8567a8605..1a6aa61a12c5 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c @@ -2642,6 +2642,14 @@ static int qmp_combo_probe(struct platform_device *pdev) if (ret) goto err_node_put; + ret = phy_pipe_clk_register(qmp, usb_np); + if (ret) + goto err_node_put; + + ret = phy_dp_clks_register(qmp, dp_np); + if (ret) + goto err_node_put; + pm_runtime_set_active(dev); ret = devm_pm_runtime_enable(dev); if (ret) @@ -2652,14 +2660,6 @@ static int qmp_combo_probe(struct platform_device *pdev) */ pm_runtime_forbid(dev); - ret = phy_pipe_clk_register(qmp, usb_np); - if (ret) - goto err_node_put; - - ret = phy_dp_clks_register(qmp, dp_np); - if (ret) - goto err_node_put; - qmp->usb_phy = devm_phy_create(dev, usb_np, &qmp_combo_usb_phy_ops); if (IS_ERR(qmp->usb_phy)) { ret = PTR_ERR(qmp->usb_phy);