[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4aba7e8e-f130-dc03-b64d-126b8b87dc27@quicinc.com>
Date: Wed, 18 Oct 2023 16:27:14 +0530
From: Imran Shaik <quic_imrashai@...cinc.com>
To: Stephen Boyd <sboyd@...nel.org>, Andy Gross <agross@...nel.org>,
"Bjorn Andersson" <andersson@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
"Konrad Dybcio" <konrad.dybcio@...aro.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Michael Turquette <mturquette@...libre.com>,
Rob Herring <robh+dt@...nel.org>
CC: Taniya Das <quic_tdas@...cinc.com>,
<linux-arm-msm@...r.kernel.org>, <linux-clk@...r.kernel.org>,
<devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Ajit Pandey <quic_ajipan@...cinc.com>,
Jagadeesh Kona <quic_jkona@...cinc.com>
Subject: Re: [PATCH V2 2/4] clk: qcom: branch: Add mem ops support for branch2
clocks
On 10/13/2023 1:54 AM, Stephen Boyd wrote:
> Quoting Imran Shaik (2023-10-11 02:00:26)
>> diff --git a/drivers/clk/qcom/clk-branch.c b/drivers/clk/qcom/clk-branch.c
>> index fc4735f74f0f..9ac8d04b425a 100644
>> --- a/drivers/clk/qcom/clk-branch.c
>> +++ b/drivers/clk/qcom/clk-branch.c
>> @@ -134,6 +135,42 @@ static void clk_branch2_disable(struct clk_hw *hw)
>> clk_branch_toggle(hw, false, clk_branch2_check_halt);
>> }
>>
>> +static int clk_branch2_mem_enable(struct clk_hw *hw)
>> +{
>> + struct clk_mem_branch *mem_br = to_clk_mem_branch(hw);
>> + const char *name = clk_hw_get_name(&mem_br->branch.clkr.hw);
>> + u32 val;
>> + int timeout = 200, ret;
>
> const int timeout?
>
Will drop the timeout as per Konrad's review comment and pass the int
literal.
>> +
>> + regmap_update_bits(mem_br->branch.clkr.regmap, mem_br->mem_enable_reg,
>> + mem_br->mem_enable_ack_bit, mem_br->mem_enable_ack_bit);
>> +
>> + ret = regmap_read_poll_timeout(mem_br->branch.clkr.regmap, mem_br->mem_ack_reg,
>> + val, val & mem_br->mem_enable_ack_bit, 0, timeout);
>
> The 'mem_br->branch' is used a few times so please make another local
> variable for that called 'branch'.
>
>> + if (ret) {
>> + WARN(1, "%s mem enable failed", name);
>
> Needs a newline on the message string.
>
Sure, will update this in the next series.
>> + return ret;
>> + }
>> +
>> + return clk_branch2_enable(hw);
>> +}
>> +
>> +static void clk_branch2_mem_disable(struct clk_hw *hw)
>> +{
>> + struct clk_mem_branch *mem_br = to_clk_mem_branch(hw);
>> +
>> + regmap_update_bits(mem_br->branch.clkr.regmap, mem_br->mem_enable_reg,
>> + mem_br->mem_enable_ack_bit, 0);
>
> Please add a newline here.
>
Sure.
Thanks,
Imran
>> + return clk_branch2_disable(hw);
>> +}
>> +
Powered by blists - more mailing lists