Devicetree
 help / color / mirror / Atom feed
From: Jie Luo <jie.luo@oss.qualcomm.com>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Brian Masney <bmasney@redhat.com>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	quic_kkumarcs@quicinc.com, quic_linchen@quicinc.com,
	quic_leiwei@quicinc.com, quic_suruchia@quicinc.com
Subject: Re: [PATCH v3 05/12] clk: qcom: ipq-cmn-pll: Add NSS clock support
Date: Thu, 3 Sep 2026 23:14:24 +0800	[thread overview]
Message-ID: <7325c6a9-8e8d-48e0-b01a-68a287e7af5d@oss.qualcomm.com> (raw)
In-Reply-To: <9e6a0e54-d16c-4b8c-9034-1e682a420e7c@oss.qualcomm.com>



On 9/3/2026 7:56 PM, Konrad Dybcio wrote:
> On 8/14/26 2:48 PM, Luo Jie wrote:
>> The NSS (network subsystem) clock's parent is cmn_pll_div2 (CMN PLL
>> rate / 2); it is then further divided by a configurable 6-bit divider.
>>
>> Register the NSS clock through a new ipq_cmn_pll_regmap_div_register()
>> helper, built as a plain struct clk_regmap_div instance instead of
>> hand-rolling recalc_rate/set_rate. The helper takes the register field
>> mask and clock name as parameters so that the upcoming PPE clock, which
>> shares the same register with a different field, can reuse it.
>>
>> Signed-off-by: Luo Jie <jie.luo@oss.qualcomm.com>
>> ---
> 
> [...]
> 
>> +static struct clk_hw *ipq_cmn_pll_regmap_div_register(struct platform_device *pdev,
>> +						      struct regmap *regmap,
>> +						      struct clk_hw *parent_hw,
>> +						      const char *name,
>> +						      u32 field_mask)
> 
> Since we're doing clk_regmap now, you can just use the clk/qcom/common.c
> infrastructure instead of NIH-ing it..
> 
> Konrad

Thanks for taking a look. To clarify, this helper is already built on
struct clk_regmap_div from clk-regmap-divider.h, using .ops =
&clk_regmap_div_ops; it does not implement its own recalc_rate or
set_rate operations.

The wrapper only derives the shift and width from field_mask and calls
devm_clk_register_regmap(). Since the NSS and PPE clocks use different
fields within the same register, this avoids duplicating the
registration boilerplate.


  reply	other threads:[~2026-09-03 15:14 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-14 12:48 [PATCH v3 00/12] clk: qcom: ipq-cmn-pll: Add IPQ5210 CMN PLL support Luo Jie
2026-08-14 12:48 ` [PATCH v3 01/12] clk: qcom: ipq-cmn-pll: Use devm_clk_hw_register_fixed_rate_parent_data Luo Jie
2026-09-03 13:02   ` Abel Vesa
2026-08-14 12:48 ` [PATCH v3 02/12] dt-bindings: clock: qcom: Add CMN PLL support for IPQ5210 SoC Luo Jie
2026-08-14 12:48 ` [PATCH v3 03/12] clk: qcom: clk-regmap-divider: Support CLK_DIVIDER_* flags Luo Jie
2026-08-14 12:59   ` sashiko-bot
2026-09-03 13:10   ` Abel Vesa
2026-08-14 12:48 ` [PATCH v3 04/12] clk: qcom: ipq-cmn-pll: Register CMN PLL /2 clock Luo Jie
2026-09-03 11:55   ` Konrad Dybcio
2026-09-03 15:02     ` Jie Luo
2026-09-03 13:18   ` Abel Vesa
2026-09-03 15:06     ` Jie Luo
2026-08-14 12:48 ` [PATCH v3 05/12] clk: qcom: ipq-cmn-pll: Add NSS clock support Luo Jie
2026-09-03 11:56   ` Konrad Dybcio
2026-09-03 15:14     ` Jie Luo [this message]
2026-09-03 13:23   ` Abel Vesa
2026-08-14 12:48 ` [PATCH v3 06/12] clk: qcom: ipq-cmn-pll: Add PPE " Luo Jie
2026-09-03 13:03   ` Abel Vesa
2026-08-14 12:48 ` [PATCH v3 07/12] clk: qcom: ipq-cmn-pll: Add PON reference " Luo Jie
2026-09-03 11:57   ` Konrad Dybcio
2026-09-03 15:21     ` Jie Luo
2026-09-03 13:27   ` Abel Vesa
2026-08-14 12:48 ` [PATCH v3 08/12] clk: qcom: ipq-cmn-pll: Add EPHY-RAW " Luo Jie
2026-09-03 13:08   ` Abel Vesa
2026-09-03 15:31     ` Jie Luo
2026-08-14 12:48 ` [PATCH v3 09/12] clk: qcom: ipq-cmn-pll: Add clock gate support for fixed clocks Luo Jie
2026-09-03 11:59   ` Konrad Dybcio
2026-09-03 15:36     ` Jie Luo
2026-08-14 12:48 ` [PATCH v3 10/12] clk: qcom: ipq-cmn-pll: Add all output clocks for IPQ5210 Luo Jie
2026-08-14 12:48 ` [PATCH v3 11/12] arm64: dts: qcom: ipq5210: Add CMN PLL device node Luo Jie
2026-08-14 13:01   ` sashiko-bot
2026-08-14 12:48 ` [PATCH v3 12/12] arm64: dts: qcom: Update IPQ5210 xo_board to use fixed factor clock Luo Jie

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=7325c6a9-8e8d-48e0-b01a-68a287e7af5d@oss.qualcomm.com \
    --to=jie.luo@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=bmasney@redhat.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=konradybcio@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_kkumarcs@quicinc.com \
    --cc=quic_leiwei@quicinc.com \
    --cc=quic_linchen@quicinc.com \
    --cc=quic_suruchia@quicinc.com \
    --cc=robh@kernel.org \
    --cc=sboyd@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