From 1255f11b25c3d9074abae3bd938b4bca8d28dce9 Mon Sep 17 00:00:00 2001 From: Sugar Zhang Date: Thu, 1 Jun 2023 19:03:58 +0800 Subject: [PATCH] clk: rockchip: clk-out: Add CLK_IGNORE_UNUSED flag It's used for compatible for old style mclk reference which do not use the "mclkout_x". The clk framework will disable all unused clk after system boot done. in this situation, it is failed to output mclk with old style DT, because "mclkout_x" was disabled by framework. We add CLK_IGNORE_UNUSED flag to clk-out to allow old style usage still work well. Suggest to drop this flag for totally new SDK or SoCs in the future. at the moment, we still need this flag. Fixes: b3cfac5e37cd ("clk: rockchip: Add support for clk input / output switch") Signed-off-by: Sugar Zhang Change-Id: I9d0a6b04637d055bc8beb0a03a630804108d4b28 --- drivers/clk/rockchip/clk-out.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/rockchip/clk-out.c b/drivers/clk/rockchip/clk-out.c index 22dcd98fbbef..689832ed00d6 100644 --- a/drivers/clk/rockchip/clk-out.c +++ b/drivers/clk/rockchip/clk-out.c @@ -50,7 +50,7 @@ static int rockchip_clk_out_probe(struct platform_device *pdev) pm_runtime_enable(dev); - hw = clk_hw_register_gate(dev, clk_name, parent_name, CLK_SET_RATE_PARENT, + hw = clk_hw_register_gate(dev, clk_name, parent_name, CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, reg, shift, clk_gate_flags, &clk_out_lock); if (IS_ERR(hw)) { ret = -EINVAL;