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: 18608 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp637378wru; Fri, 11 Nov 2022 01:28:08 -0800 (PST) X-Google-Smtp-Source: AA0mqf5OsYxq4/DruYzSo3sVEwFxsQsIO5Ox+ABAS6V/yxyJikjiCzrwHT46473qXr99hah9UKcQ X-Received: by 2002:a05:6402:2931:b0:463:ce05:c00e with SMTP id ee49-20020a056402293100b00463ce05c00emr749281edb.46.1668158888284; Fri, 11 Nov 2022 01:28:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668158888; cv=none; d=google.com; s=arc-20160816; b=jtlQAMzx7pr1NebF+jjAv8ti7Hjpwg1Du2g7RvimLOdXwnpfBELy+DQb2w+J0c+vFm 7Hs+gh6EKu7x+etG66nfKHtd4RNSTmWvnIW45I/WpygWXZchqjKWVQSbWF1p6kFHAw+3 VrZLkkTtHBJFsLmlrp5q1R+wRG8LWZ8YbvO3/tdNGkciLoc+mY0emP7R8K0bHD4TiYkC +re8VpPiI71YjHlnFUV9xyN+zM4BzTv6+94d92EZBNxjUk3oiaN8yP5kBkI2qw0UoTv7 vnto+yqWxxLDMun/dqnc4+v7T7rJuB0QlW9dyT4n6oCyXd1p6IKzDY/2bKNWsGC+uixC 0bGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=xRVhHsGg50c8P53WEdSWK/8oLZsspmYBxHfcKp51Dtk=; b=DVB6lhb/MiH0h71Xmf9u7wNhByDYfVGgoyF6JYrPTrwMiPUduf2E90zzhowB75Uiu8 H4Cr3NZR1KX4wSDlGktXy/8OJVe99r4K4i8E2EeYDDVt7siZCuZVF7kw+QzYnZIOxgk3 S7T1+v0ju1bHxuZ1r7q2twIWvbay6dBs8LSrl/5uop0KDJo6fxipoWnPYciJfvctZYl3 IOb68YJYFIHRRtMFS/8IeRx6hzwTveLfVAff1+g+VIEKqCywg8A2HnTfAj4T61JeaGRz uc01FNFrjEPPqLUXG8LN23lccmVitnUKpGHuiF0z9erbX93qoomTyizDF3rl9QGUo8F2 re1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=USkfV5Ah; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l6-20020a170906794600b007269ef1872esi1474122ejo.897.2022.11.11.01.27.45; Fri, 11 Nov 2022 01:28:08 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=USkfV5Ah; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233852AbiKKJ07 (ORCPT + 99 others); Fri, 11 Nov 2022 04:26:59 -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 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749191374592443052?= X-GMAIL-MSGID: =?utf-8?q?1749191374592443052?= 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);