lkml.org 
[lkml]   [2022]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 2/3] clk: bd718x7: Enable the possibility to mark the clock as critical
Date
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@amarulasolutions.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
\
 
 \ /
  Last update: 2022-06-05 18:57    [W:0.051 / U:1.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site