[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220605165703.1565234-3-michael@amarulasolutions.com>
Date: Sun, 5 Jun 2022 18:57:02 +0200
From: Michael Trimarchi <michael@...rulasolutions.com>
To: Matti Vaittinen <mazziesaccount@...il.com>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
linux-clk@...r.kernel.org (open list:COMMON CLK FRAMEWORK),
linux-kernel@...r.kernel.org (open list)
Cc: Dario Binacchi <dario.binacchi@...rulasolutions.com>,
linux-amarula@...rulasolutions.com,
linux-clk@...r.kernel.org (open list:COMMON CLK FRAMEWORK),
linux-kernel@...r.kernel.org (open list)
Subject: [RFC PATCH 2/3] clk: bd718x7: Enable the possibility to mark the clock as critical
If the clock is used to generate the osc_32k, we need to mark
as critical. clock-critical has no binding description at the moment
but it's defined in linux kernel
bd71847: pmic@4b {
...
rohm,reset-snvs-powered;
#clock-cells = <0>;
clock-critical = <1>;
clocks = <&osc_32k 0>;
clock-output-names = "clk-32k-out";
...
}
Signed-off-by: Michael Trimarchi <michael@...rulasolutions.com>
---
drivers/clk/clk-bd718x7.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/clk/clk-bd718x7.c b/drivers/clk/clk-bd718x7.c
index 04cc0beb67df..5088379ec2b7 100644
--- a/drivers/clk/clk-bd718x7.c
+++ b/drivers/clk/clk-bd718x7.c
@@ -83,6 +83,7 @@ static int bd71837_clk_probe(struct platform_device *pdev)
const char *parent_clk;
struct device *dev = &pdev->dev;
struct device *parent = pdev->dev.parent;
+ unsigned long flags;
struct clk_init_data init = {
.name = "bd718xx-32k-out",
.ops = &bd71837_clk_ops,
@@ -100,6 +101,9 @@ static int bd71837_clk_probe(struct platform_device *pdev)
parent_clk = of_clk_get_parent_name(parent->of_node, 0);
+ of_clk_detect_critical(dev->of_node, 0, &flags);
+ init.flags = flags;
+
init.parent_names = &parent_clk;
if (!parent_clk) {
dev_err(dev, "No parent clk found\n");
--
2.25.1
Powered by blists - more mailing lists