devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: linux-clk@vger.kernel.org
Cc: Marek Vasut <marex@denx.de>,
	Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Rob Herring <robh+dt@kernel.org>, Stephen Boyd <sboyd@kernel.org>,
	devicetree@vger.kernel.org, linux-power@fi.rohmeurope.com
Subject: [PATCH 3/3] clk: bd718xx: Implement basic .match_clkspec
Date: Tue, 15 Feb 2022 09:44:12 +0100	[thread overview]
Message-ID: <20220215084412.8090-3-marex@denx.de> (raw)
In-Reply-To: <20220215084412.8090-1-marex@denx.de>

The new match_clkspec() callback is used to determine whether struct clk_hw
that is currently being registered matches the clock specifier currently in
DT "critical-clock" property, and if so, then the CLK_IS_CRITICAL is added
to these newly registered clock.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: devicetree@vger.kernel.org
Cc: linux-power@fi.rohmeurope.com
To: linux-clk@vger.kernel.org
---
 drivers/clk/clk-bd718x7.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/clk/clk-bd718x7.c b/drivers/clk/clk-bd718x7.c
index ac40b669d60b7..8b41f122bbb0d 100644
--- a/drivers/clk/clk-bd718x7.c
+++ b/drivers/clk/clk-bd718x7.c
@@ -70,10 +70,16 @@ static int bd71837_clk_is_enabled(struct clk_hw *hw)
 	return enabled & c->mask;
 }
 
+static int bd71837_match_clkspec(struct clk_hw *hw, struct of_phandle_args *clkspec)
+{
+	return 0;
+}
+
 static const struct clk_ops bd71837_clk_ops = {
 	.prepare = &bd71837_clk_enable,
 	.unprepare = &bd71837_clk_disable,
 	.is_prepared = &bd71837_clk_is_enabled,
+	.match_clkspec = &bd71837_match_clkspec,
 };
 
 static int bd71837_clk_probe(struct platform_device *pdev)
-- 
2.34.1


      parent reply	other threads:[~2022-02-15  8:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-15  8:44 [PATCH 1/3] dt-bindings: clk: Introduce 'critical-clocks' property Marek Vasut
2022-02-15  8:44 ` [PATCH 2/3] " Marek Vasut
2022-02-15 11:23   ` kernel test robot
2022-02-15 13:57   ` kernel test robot
2022-02-16 12:06   ` Vaittinen, Matti
2022-02-16 16:52     ` Marek Vasut
2022-02-17  5:01       ` Vaittinen, Matti
2022-02-17 13:43         ` Marek Vasut
2022-02-17 22:23   ` Stephen Boyd
2022-02-21  0:58     ` Marek Vasut
2022-03-09 20:54       ` Marek Vasut
2022-03-12  5:04         ` Stephen Boyd
2022-03-12 10:26           ` Marek Vasut
2022-03-15 23:52             ` Stephen Boyd
2022-03-16 11:30               ` Marek Vasut
2022-05-03 19:17                 ` Marek Vasut
2022-02-15  8:44 ` Marek Vasut [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220215084412.8090-3-marex@denx.de \
    --to=marex@denx.de \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-power@fi.rohmeurope.com \
    --cc=matti.vaittinen@fi.rohmeurope.com \
    --cc=mturquette@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).