From patchwork Mon Dec 26 03:10:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 636857 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 8737EC53210 for ; Mon, 26 Dec 2022 03:11:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231491AbiLZDLL (ORCPT ); Sun, 25 Dec 2022 22:11:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231504AbiLZDLH (ORCPT ); Sun, 25 Dec 2022 22:11:07 -0500 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87459388F for ; Sun, 25 Dec 2022 19:11:03 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id o6so14581847lfi.5 for ; Sun, 25 Dec 2022 19:11:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7cZwQ38RrZGBM4qHYSFGd7K3TwyC7n/w0FHJkPUy2UM=; b=d/Yki0h9RLUN0YgcObkHaRmLIYER3QWByufpawk5BJQx/MdCP0EZsQItpFKimAp2GS 39tpkX+yOkUy8MYz76J53ZctqZSgdzW9Zpr3c39Ew/3cJthhMP05xmGDJH5F0NxSaFwO PT+uY82RsUoC7Ld/KxCdcFw4Vp1+d0yGn8wLHcbGwGEp6CF9vK5bKayAeGivi8NDjWsV twKQcZh4CVSG8sViR+ijpSBjE3UqlUIJwNkXoz9ZXAAXMNQnA5Y2u8tuYUB9FZzD1ncx yYJNCbkGUBMMQpvu6H6a/6Gzo2iVviYn2x4KOIMaZCmJ+DftLF/UQNgmsHfQddky02zQ INdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7cZwQ38RrZGBM4qHYSFGd7K3TwyC7n/w0FHJkPUy2UM=; b=o76AQ7gXTr7b9se3g87chb3kZi6GBU9z70/qpJ5n63jAOXUpKx/NyHQ/G0lM4KS9XQ W4FuCSwJPRWz5lqDgkMIz79mkkVtFSa+BsmtRiNyP8iEZKKPKNj30oAYbhoSg1huVDvU AlXbGTLZMfn0LC2FtEYI67LanBi/mTRS6pHNK5G5U3BRBTSq3CwHG+mpN1szuJUb9h1p Zt9uKhVkxu/U9A+6qbtmhuojsc376T4Wp/denAHqxf5f74btfR+3pkJ9xp20Ycw3/KwR x1P3cfhHQwNlnLqPDkoa2k5r1Gnu+Vp1KlcFqxSTr7RibecMmSBwO/EkVP3/+jDbx7Wq CTYw== X-Gm-Message-State: AFqh2kqzqc3ETAXswDpZclDhMXzlCdOq3WR98P4+8/Rry2o9Q0jvF5tk k2JDiAWtOopDIhpOqFe02kE+RA== X-Google-Smtp-Source: AMrXdXtUJXYjP2vE9/p73yxJ8VQ86vsLLtQtSPCQEbyULCnvNly/4uYW2VX78eJciCYFcv8qUUL/+w== X-Received: by 2002:a05:6512:2004:b0:4b5:64b7:24f0 with SMTP id a4-20020a056512200400b004b564b724f0mr5539082lfb.29.1672024261872; Sun, 25 Dec 2022 19:11:01 -0800 (PST) Received: from eriador.lan (dzccz6yyyyyyyyyyybcwt-3.rev.dnainternet.fi. [2001:14ba:a085:4d00::8a5]) by smtp.gmail.com with ESMTPSA id a12-20020a2e860c000000b0027f770526ebsm1165388lji.75.2022.12.25.19.11.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Dec 2022 19:11:01 -0800 (PST) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski Cc: Philipp Zabel , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH v2 2/3] phy: qualcomm: pcie2: register as clock provider Date: Mon, 26 Dec 2022 05:10:58 +0200 Message-Id: <20221226031059.2563165-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221226031059.2563165-1-dmitry.baryshkov@linaro.org> References: <20221226031059.2563165-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Register pcie2 PHY as a clock provider to enable using it in the DT-based clock lookup. Signed-off-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-pcie2.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/phy/qualcomm/phy-qcom-pcie2.c b/drivers/phy/qualcomm/phy-qcom-pcie2.c index 5407e59bb185..11a2bb958681 100644 --- a/drivers/phy/qualcomm/phy-qcom-pcie2.c +++ b/drivers/phy/qualcomm/phy-qcom-pcie2.c @@ -243,7 +243,11 @@ static int phy_pipe_clksrc_register(struct qcom_phy *qphy) fixed->fixed_rate = 250000000; fixed->hw.init = &init; - return devm_clk_hw_register(qphy->dev, &fixed->hw); + ret = devm_clk_hw_register(qphy->dev, &fixed->hw); + if (ret < 0) + return ret; + + return devm_of_clk_add_hw_provider(qphy->dev, of_clk_hw_simple_get, &fixed->hw); } static int qcom_pcie2_phy_probe(struct platform_device *pdev)