From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Taniya Das <taniya.das@oss.qualcomm.com>,
Bjorn Andersson <andersson@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: Ajit Pandey <quic_ajipan@quicinc.com>,
Imran Shaik <quic_imrashai@quicinc.com>,
Jagadeesh Kona <quic_jkona@quicinc.com>,
linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 1/3] clk: qcom: branch: Extend invert logic for branch2 mem clocks
Date: Tue, 2 Sep 2025 13:57:52 +0200 [thread overview]
Message-ID: <484eccde-bcab-42f8-bf6f-b370fc777626@oss.qualcomm.com> (raw)
In-Reply-To: <20250829-sm8750-videocc-v2-v2-1-4517a5300e41@oss.qualcomm.com>
On 8/29/25 12:15 PM, Taniya Das wrote:
> Some clock branches require inverted logic for memory gating, where
> disabling the memory involves setting a bit and enabling it involves
> clearing the same bit. This behavior differs from the standard approach
> memory branch clocks ops where enabling typically sets the bit.
>
> Introducing the mem_enable_invert to allow conditional handling of
> these sequences of the inverted control logic for memory operations
> required on those memory clock branches.
>
> Signed-off-by: Taniya Das <taniya.das@oss.qualcomm.com>
> ---
> drivers/clk/qcom/clk-branch.c | 14 +++++++++++---
> drivers/clk/qcom/clk-branch.h | 4 ++++
> 2 files changed, 15 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/clk/qcom/clk-branch.c b/drivers/clk/qcom/clk-branch.c
> index 0f10090d4ae681babbdbbb1b6c68ffe77af7a784..90da1c94b4736f65c87aec92303d511c4aa9a173 100644
> --- a/drivers/clk/qcom/clk-branch.c
> +++ b/drivers/clk/qcom/clk-branch.c
> @@ -142,8 +142,12 @@ static int clk_branch2_mem_enable(struct clk_hw *hw)
> u32 val;
> int ret;
>
> - regmap_update_bits(branch.clkr.regmap, mem_br->mem_enable_reg,
> - mem_br->mem_enable_ack_mask, mem_br->mem_enable_ack_mask);
> + if (mem_br->mem_enable_invert)
> + regmap_update_bits(branch.clkr.regmap, mem_br->mem_enable_reg,
> + mem_br->mem_enable_mask, 0);
> + else
> + regmap_update_bits(branch.clkr.regmap, mem_br->mem_enable_reg,
> + mem_br->mem_enable_ack_mask, mem_br->mem_enable_ack_mask);
regmap_assign_bits() is your friend
Konrad
next prev parent reply other threads:[~2025-09-02 11:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-29 10:15 [PATCH v2 0/3] Add the support for SM8750 Video clock controller Taniya Das
2025-08-29 10:15 ` [PATCH v2 1/3] clk: qcom: branch: Extend invert logic for branch2 mem clocks Taniya Das
2025-08-30 0:17 ` Dmitry Baryshkov
2025-09-03 6:48 ` Taniya Das
2025-09-02 11:57 ` Konrad Dybcio [this message]
2025-09-03 6:50 ` Taniya Das
2025-08-29 10:15 ` [PATCH v2 2/3] dt-bindings: clock: qcom: Add SM8750 video clock controller Taniya Das
2025-09-15 10:58 ` Bryan O'Donoghue
2025-09-26 9:18 ` Taniya Das
2025-09-26 11:14 ` Konrad Dybcio
2025-10-09 10:36 ` Taniya Das
2025-10-09 10:46 ` Krzysztof Kozlowski
2025-08-29 10:15 ` [PATCH v2 3/3] clk: qcom: videocc-sm8750: Add video clock controller driver for SM8750 Taniya Das
2025-09-12 11:08 ` Konrad Dybcio
2025-09-26 9:20 ` Taniya Das
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=484eccde-bcab-42f8-bf6f-b370fc777626@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.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=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=taniya.das@oss.qualcomm.com \
/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
all inboxes | Powered by JetHome®