linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yao Zi <me@ziyao.cc>
To: Alex Elder <elder@riscstar.com>, Yixun Lan <dlan@gentoo.org>,
	Stephen Boyd <sboyd@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Philipp Zabel <p.zabel@pengutronix.de>
Cc: Guodong Xu <guodong@riscstar.com>,
	Inochi Amaoto <inochiama@gmail.com>,
	linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-riscv@lists.infradead.org, spacemit@lists.linux.dev
Subject: Re: [PATCH v2 2/3] clk: spacemit: extract common ccu functions
Date: Tue, 30 Dec 2025 04:00:34 +0000	[thread overview]
Message-ID: <aVNOYuC0-lcymn-P@pie> (raw)
In-Reply-To: <3ea5b28b-a0ed-49fb-a8a8-6f575a24820d@riscstar.com>

On Mon, Dec 29, 2025 at 06:50:14PM -0600, Alex Elder wrote:
> On 12/26/25 12:55 AM, Yixun Lan wrote:
> > Refactor the probe function of SpacemiT's clock, and extract a common ccu
> > file, so new clock driver added in the future can share the same code,
> > which would lower the burden of maintenance. Since this commit changes the
> > module name where the auxiliary device registered, the auxiliary device id
> > need to be adjusted. Idea of the patch is come from review of K3 clock
> > driver, please refer this disucssion [1].
> 
> I understand the point here, and it's just like the first patch:
> you're extracting generic code out of the K1-specific file so a
> new K3-specific source file can use it too.  This is really good.
> 
> However the end result should incorporate *only* generic code
> in the generic file, and have the SoC-specific source files
> contain everything else.
> 
> But as you have it now, the (new) generic probe function
> contains special handling for "spacemit,k1-pll", and that's
> not generic.
> 
> So I suggest you still implement k1_ccu_probe() (and k3_ccu_probe())
> separately, allowing each of them to do platform-specific things
> before (and/or after) calling the generic probe function.

I've raised similar concerns in the series for K3 clock tree[1].

Regards,
Yao Zi

[1]: https://lore.kernel.org/all/aU50DIe9qMneb0GT@pie/

  reply	other threads:[~2025-12-30  4:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-26  6:55 [PATCH v2 0/3] clk: spacemit: refactor common ccu driver Yixun Lan
2025-12-26  6:55 ` [PATCH v2 1/3] clk: spacemit: prepare common ccu header Yixun Lan
2025-12-30  0:50   ` Alex Elder
2025-12-26  6:55 ` [PATCH v2 2/3] clk: spacemit: extract common ccu functions Yixun Lan
2025-12-30  0:50   ` Alex Elder
2025-12-30  4:00     ` Yao Zi [this message]
2025-12-26  6:55 ` [PATCH v2 3/3] reset: spacemit: fix auxiliary device id Yixun Lan
2025-12-30  0:50   ` Alex Elder

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=aVNOYuC0-lcymn-P@pie \
    --to=me@ziyao.cc \
    --cc=dlan@gentoo.org \
    --cc=elder@riscstar.com \
    --cc=guodong@riscstar.com \
    --cc=inochiama@gmail.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mturquette@baylibre.com \
    --cc=p.zabel@pengutronix.de \
    --cc=sboyd@kernel.org \
    --cc=spacemit@lists.linux.dev \
    /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;
as well as URLs for NNTP newsgroup(s).