[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c76655ad-e1e4-46f1-aecd-e57716b80ee7@zohomail.com>
Date: Thu, 20 Feb 2025 23:18:11 +0800
From: Xukai Wang <kingxukai@...omail.com>
To: Stephen Boyd <sboyd@...nel.org>, Albert Ou <aou@...s.berkeley.edu>,
Conor Dooley <conor+dt@...nel.org>, Conor Dooley <conor@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Michael Turquette <mturquette@...libre.com>,
Palmer Dabbelt <palmer@...belt.com>, Paul Walmsley
<paul.walmsley@...ive.com>, Rob Herring <robh@...nel.org>
Cc: linux-clk@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-riscv@...ts.infradead.org,
Samuel Holland <samuel.holland@...ive.com>,
Troy Mitchell <TroyMitchell988@...il.com>
Subject: Re: [PATCH v4 2/3] clk: canaan: Add clock driver for Canaan K230
On 2025/2/20 23:07, Xukai Wang wrote:
> On 2025/2/19 05:48, Stephen Boyd wrote:
>>> +static void k230_clk_disable(struct clk_hw *hw)
>>> +{
>>> + struct k230_clk *clk = to_k230_clk(hw);
>>> + struct k230_sysclk *ksc = clk->ksc;
>>> + struct k230_clk_cfg *cfg = &k230_clk_cfgs[clk->id];
>>> + u32 reg;
>>> +
>>> + if (!cfg->have_gate) {
>>> + dev_err(&ksc->pdev->dev, "This clock doesn't have gate\n");
>> Why are the clk_ops assigned to this clk then?
> If this clock doesn't have a gate, then the clk_ops will not be assigned to it. In this case, I'm simply checking it again. You can verify this in the k230_register_clk function to ensure it's handled correctly.
Apologies for my script doesn't wrap this paragraph.
> If you think this check is redundant, I can drop it.
Powered by blists - more mailing lists