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: 637479 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 357B2C4708D for ; Mon, 26 Dec 2022 03:11:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229804AbiLZDLJ (ORCPT ); Sun, 25 Dec 2022 22:11:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231490AbiLZDLH (ORCPT ); Sun, 25 Dec 2022 22:11:07 -0500 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 859DB388A for ; Sun, 25 Dec 2022 19:11:03 -0800 (PST) Received: by mail-lf1-x131.google.com with SMTP id j17so5049794lfr.3 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=0NLNyFPyJlNkm1mCB6JyFNTJ9X3RhPvp8Uan82IzQ/XqMGbNY+Ge/xCUMGD1NpKYDI z5OiSRxSsVyKdvV2rTN6ybkdZwk8lpHeqTqCGT9BMqHxKSa8Bs+HzMJc3o9e2HMj8ti7 r/BkyTV2SHy0+7132QFCwTTYUawS6Lni0iKefFT6qKnCVwVytMP8fv/UFKgTqy+tgcY4 T38B7PyMCnooKvaVNKtbzPS9VCpTZBt3WtpleoYqRpkWm2UmNXfxNyHVRwEurMQ17Box ifkLzMIpg1BAIzlGMHFKq66QS8yG6/JYBTbFkG4WwAW7IiTVjzt97rqWp9Cc4PgJJi1y d5tw== X-Gm-Message-State: AFqh2kqtSNq6HNcwL9FlruKcNCqFWXe7TrLwAYRWeN4KasfMXydwMNqX tXN+pL19pUYXJI5x2uGWzroKig== 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: devicetree@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)