public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Huacai Chen <chenhuacai@kernel.org>,
	Jianmin Lv <lvjianmin@loongson.cn>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Rob Herring <robh+dt@kernel.org>, WANG Xuerui <kernel@xen0n.name>,
	Yang Li <yang.lee@linux.alibaba.com>,
	devicetree@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-kernel@vger.kernel.org, liupeibao@loongson.cn,
	loongarch@lists.linux.dev, wanghongliang@loongson.cn,
	zhuyinbo <zhuyinbo@loongson.cn>
Subject: Re: [PATCH v10 2/4] clk: clk-loongson2: add clock controller driver support
Date: Tue, 21 Feb 2023 15:07:58 -0800	[thread overview]
Message-ID: <9e8952c9415973dc7276185e3cdf5ae7.sboyd@kernel.org> (raw)
In-Reply-To: <01ee3dc6-a868-fd2b-93aa-11e6bdfcc9df@loongson.cn>

Quoting zhuyinbo (2023-02-19 21:44:51)
> 
> 在 2023/2/18 上午6:15, Stephen Boyd 写道:
> > Quoting zhuyinbo (2023-02-14 23:35:22)
> >> 在 2023/2/11 上午7:42, Stephen Boyd 写道:
> >>>> +
> >>>> +err:
> >>>> +       iounmap(loongson2_pll_base);
> >>>> +}
> >>>> +
> >>>> +CLK_OF_DECLARE(loongson2_clk, "loongson,ls2k-clk", loongson2_clocks_init);
> >>> Any reason this can't be a platform driver?
> 
> Your question is that  why I don't use the platform_driver_register to 
> register  clk and use CLK_OF_DECLARE ?

Yes.

> 
> I was  consider other clock controllers of Loongson-2 series may be 
> different with 2k1000 and I can add a line
> 
> CLK_OF_DECLARE() for compatible other platform in the future. eg.
> 
> CLK_OF_DECLARE(loongson2_clk, "loongson,ls2k-clk", loongson2_clocks_init);
> 
> +  CLK_OF_DECLARE(xxx1, xxx2,  xxx3);  // for other clock controllers of 
> Loongson-2 series
> 
> >> For the compatible consideration of other clock controllers of
> >> Loongson-2 series in the future, the way of using dts can be
> >>
> >> better compatible.
> >>
> > Sorry that sentence doesn't make sense to me. The use of dts doesn't
> > require the use of CLK_OF_DECLARE.
> 
> yes, the use of dts doesn't require the use of CLK_OF_DECLARE and can 
> use platform_driver_register
> 
> but my drvier not use platform_driver_register to register  clk and use 
> CLK_OF_DECLARE to match of_clk_init.

of_clk_init() is there to register clks that are needed for early init,
i.e. the clockevent/clocksource or the root interrupt controller
(irqchip). Otherwise, it isn't necessary to register clks via
of_clk_init().

  reply	other threads:[~2023-02-21 23:08 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29  3:41 [PATCH v10 1/4] dt-bindings: clock: add loongson-2 clock include file Yinbo Zhu
2022-11-29  3:41 ` [PATCH v10 2/4] clk: clk-loongson2: add clock controller driver support Yinbo Zhu
2022-11-30  3:32   ` XiaochuanMao
     [not found]   ` <dfc61f0b-0051-4146-f534-6436e3076b65@loongson.cn>
2022-11-30 10:16     ` Yinbo Zhu
2022-11-30 13:14   ` XiaochuanMao
2022-11-30 22:49     ` Yinbo Zhu
2022-12-07  2:15   ` Yinbo Zhu
2023-02-01  4:37   ` zhuyinbo
2023-02-10 23:42   ` Stephen Boyd
2023-02-15  7:35     ` zhuyinbo
2023-02-17 22:15       ` Stephen Boyd
2023-02-20  5:44         ` zhuyinbo
2023-02-21 23:07           ` Stephen Boyd [this message]
2023-02-22  2:02             ` zhuyinbo
2023-02-22  5:10               ` zhuyinbo
2023-02-22 21:00                 ` Stephen Boyd
2023-02-23  2:16                   ` zhuyinbo
2023-02-24 19:10                     ` Stephen Boyd
2023-02-27  1:54                       ` zhuyinbo
2022-11-29  3:41 ` [PATCH v10 3/4] LoongArch: time: add of_clk_init in time_init Yinbo Zhu
2023-02-10 23:33   ` Stephen Boyd
2022-11-29  3:41 ` [PATCH v10 4/4] dt-bindings: clock: add loongson-2 clock Yinbo Zhu
2023-02-10 23:43   ` Stephen Boyd
2023-02-10 23:42 ` [PATCH v10 1/4] dt-bindings: clock: add loongson-2 clock include file Stephen Boyd

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=9e8952c9415973dc7276185e3cdf5ae7.sboyd@kernel.org \
    --to=sboyd@kernel.org \
    --cc=chenhuacai@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jiaxun.yang@flygoat.com \
    --cc=kernel@xen0n.name \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liupeibao@loongson.cn \
    --cc=loongarch@lists.linux.dev \
    --cc=lvjianmin@loongson.cn \
    --cc=mturquette@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=wanghongliang@loongson.cn \
    --cc=yang.lee@linux.alibaba.com \
    --cc=zhuyinbo@loongson.cn \
    /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