public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: spacemit: ccu_mix: fix inverted condition in ccu_mix_trigger_fc()
@ 2026-03-05 12:46 Shuwei Wu
  2026-03-05 13:19 ` Yixun Lan
  2026-03-24  6:45 ` Yixun Lan
  0 siblings, 2 replies; 3+ messages in thread
From: Shuwei Wu @ 2026-03-05 12:46 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Yixun Lan, Alex Elder,
	Inochi Amaoto, Haylen Chu
  Cc: linux-clk, linux-riscv, spacemit, linux-kernel, Shuwei Wu

Fix inverted condition that skips frequency change trigger,
causing kernel panics during cpufreq scaling.

Fixes: 1b72c59db0ad ("clk: spacemit: Add clock support for SpacemiT K1 SoC")
Signed-off-by: Shuwei Wu <shuwei.wu@mailbox.org>
---
 drivers/clk/spacemit/ccu_mix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/spacemit/ccu_mix.c b/drivers/clk/spacemit/ccu_mix.c
index 9578366e9746..a8b407049bf4 100644
--- a/drivers/clk/spacemit/ccu_mix.c
+++ b/drivers/clk/spacemit/ccu_mix.c
@@ -73,7 +73,7 @@ static int ccu_mix_trigger_fc(struct clk_hw *hw)
 	struct ccu_common *common = hw_to_ccu_common(hw);
 	unsigned int val;
 
-	if (common->reg_fc)
+	if (!common->reg_fc)
 		return 0;
 
 	ccu_update(common, fc, common->mask_fc, common->mask_fc);

---
base-commit: c107785c7e8dbabd1c18301a1c362544b5786282
change-id: 20260305-k1-clk-fix-25b101c88459

Best regards,
-- 
Shuwei Wu <shuwei.wu@mailbox.org>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-24  6:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-05 12:46 [PATCH] clk: spacemit: ccu_mix: fix inverted condition in ccu_mix_trigger_fc() Shuwei Wu
2026-03-05 13:19 ` Yixun Lan
2026-03-24  6:45 ` Yixun Lan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox