public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Imran Shaik <quic_imrashai@quicinc.com>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Rob Herring <robh+dt@kernel.org>
Cc: Taniya Das <quic_tdas@quicinc.com>,
	Imran Shaik <quic_imrashai@quicinc.com>,
	linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ajit Pandey <quic_ajipan@quicinc.com>,
	Jagadeesh Kona <quic_jkona@quicinc.com>
Subject: Re: [PATCH V2 2/4] clk: qcom: branch: Add mem ops support for branch2 clocks
Date: Thu, 12 Oct 2023 13:24:42 -0700	[thread overview]
Message-ID: <9888cc31bca1e1e148e3a0e4be4a0b5d.sboyd@kernel.org> (raw)
In-Reply-To: <20231011090028.1706653-3-quic_imrashai@quicinc.com>

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?

> +
> +       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.

> +               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.

> +       return clk_branch2_disable(hw);
> +}
> +

  parent reply	other threads:[~2023-10-12 20:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-11  9:00 [PATCH V2 0/4] Add support for Qualcomm ECPRI clock controller Imran Shaik
2023-10-11  9:00 ` [PATCH V2 1/4] dt-bindings: clock: qcom: Add ECPRICC clocks for QDU1000 and QRU1000 Imran Shaik
2023-10-11  9:00 ` [PATCH V2 2/4] clk: qcom: branch: Add mem ops support for branch2 clocks Imran Shaik
2023-10-11  9:51   ` Konrad Dybcio
2023-10-18 10:56     ` Imran Shaik
2023-10-12 20:24   ` Stephen Boyd [this message]
2023-10-18 10:57     ` Imran Shaik
2023-10-11  9:00 ` [PATCH V2 3/4] clk: qcom: Add ECPRICC driver support for QDU1000 and QRU1000 Imran Shaik
2023-10-11 10:30   ` Konrad Dybcio
2023-10-18 10:57     ` Imran Shaik
2023-10-12 20:19   ` Stephen Boyd
2023-10-18 10:57     ` Imran Shaik
2023-10-11  9:00 ` [PATCH V2 4/4] arm64: dts: qcom: qdu1000: Add ECPRI clock controller Imran Shaik
2023-10-11 10:28 ` [PATCH V2 0/4] Add support for Qualcomm " Konrad Dybcio
2023-10-18 10:58   ` Imran Shaik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9888cc31bca1e1e148e3a0e4be4a0b5d.sboyd@kernel.org \
    --to=sboyd@kernel.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=quic_ajipan@quicinc.com \
    --cc=quic_imrashai@quicinc.com \
    --cc=quic_jkona@quicinc.com \
    --cc=quic_tdas@quicinc.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox