From: "Stefan Dösinger" <stefandoesinger@gmail.com>
To: Brian Masney <bmasney@redhat.com>
Cc: 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>,
Philipp Zabel <p.zabel@pengutronix.de>,
Vinod Koul <vkoul@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Russell King <linux@armlinux.org.uk>, Lee Jones <lee@kernel.org>,
linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-phy@lists.infradead.org, mfd@lists.linux.dev
Subject: Re: [PATCH v9 05/12] clk: zte: Add Clock registration infrastructure
Date: Mon, 03 Aug 2026 20:48:18 +0300 [thread overview]
Message-ID: <ky2t5IqOTfWMdfZsXE91Gg@gmail.com> (raw)
In-Reply-To: <anC72Cf1zKcLYWlC@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2290 bytes --]
Hi Brian,
Thanks again for the review!
Am Montag, 3. August 2026, 19:03:36 Ostafrikanische Zeit schrieb Brian Masney:
> > + /*
> > + * Sanity check: Make sure all parents are there and write a clear
> > message rather than + * leave potential orphans.
> > + */
>
> It's not common for clk drivers to have a validate function like this.
> That said, I know you are reverse engineering what's in the downstream
> BSP without documentation, and there is value in having this. I think
> it'd be useful to clarify that in the comments because code usually gets
> copied and pasted between drivers over time.
>
> That said, once it's verified that the clock tree is correct, can these
> checks be eventually dropped so that this validation logic isn't ran on
> every boot?
Yes, I plan to remove it eventually when support for the SoC is more mature.
It has saved me some head-scratching as I have been working and re-working the
clock tree. I'll clarify its driver specific role in the next submission.
Another option I contemplated is wrapping it in #ifdef DEBUG. What do you
think about that?
> > +struct zx_clk_export {
> > + unsigned int priv;
> > + unsigned int binding;
> > +};
>
> Sashiko flagged this as unused.
Indeed, that is a leftover from earlier - before I realized a simple unsigned
int[] does the job fine.
---
I have a long-standing question about tristate/module support for drivers like
this: I don't think the driver can realistically be unloaded. I have been
testing driver unloading by removing the UART clocks from the DT (otherwise
the clock driver is busy) and marking all clocks critical (otherwise
unloading/unbinding will shut down the UART (and more) and lock me out of the
system).
I have made it tristate because from early research into clock driver state of
the art I gathered it was desired, even for drivers necessary for fundamental
operation [0]. Did I understand this correctly? It also uncovered some linking
errors that weren't obvious when compiling the driver into the kernel.
That said, I'd prefer to mark my init tables discardable with __initdata and
think the module load support is going to go untested and bitrot over time.
Cheers,
Stefan
0: Chen-Yu Tsai's tak here mostly: https://www.youtube.com/watch?v=d1VIAnVb3hI
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 870 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: "Stefan Dösinger" <stefandoesinger@gmail.com>
To: Brian Masney <bmasney@redhat.com>
Cc: 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>,
Philipp Zabel <p.zabel@pengutronix.de>,
Vinod Koul <vkoul@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Russell King <linux@armlinux.org.uk>, Lee Jones <lee@kernel.org>,
linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-phy@lists.infradead.org, mfd@lists.linux.dev
Subject: Re: [PATCH v9 05/12] clk: zte: Add Clock registration infrastructure
Date: Mon, 03 Aug 2026 20:48:18 +0300 [thread overview]
Message-ID: <ky2t5IqOTfWMdfZsXE91Gg@gmail.com> (raw)
In-Reply-To: <anC72Cf1zKcLYWlC@redhat.com>
[-- Attachment #1.1: Type: text/plain, Size: 2290 bytes --]
Hi Brian,
Thanks again for the review!
Am Montag, 3. August 2026, 19:03:36 Ostafrikanische Zeit schrieb Brian Masney:
> > + /*
> > + * Sanity check: Make sure all parents are there and write a clear
> > message rather than + * leave potential orphans.
> > + */
>
> It's not common for clk drivers to have a validate function like this.
> That said, I know you are reverse engineering what's in the downstream
> BSP without documentation, and there is value in having this. I think
> it'd be useful to clarify that in the comments because code usually gets
> copied and pasted between drivers over time.
>
> That said, once it's verified that the clock tree is correct, can these
> checks be eventually dropped so that this validation logic isn't ran on
> every boot?
Yes, I plan to remove it eventually when support for the SoC is more mature.
It has saved me some head-scratching as I have been working and re-working the
clock tree. I'll clarify its driver specific role in the next submission.
Another option I contemplated is wrapping it in #ifdef DEBUG. What do you
think about that?
> > +struct zx_clk_export {
> > + unsigned int priv;
> > + unsigned int binding;
> > +};
>
> Sashiko flagged this as unused.
Indeed, that is a leftover from earlier - before I realized a simple unsigned
int[] does the job fine.
---
I have a long-standing question about tristate/module support for drivers like
this: I don't think the driver can realistically be unloaded. I have been
testing driver unloading by removing the UART clocks from the DT (otherwise
the clock driver is busy) and marking all clocks critical (otherwise
unloading/unbinding will shut down the UART (and more) and lock me out of the
system).
I have made it tristate because from early research into clock driver state of
the art I gathered it was desired, even for drivers necessary for fundamental
operation [0]. Did I understand this correctly? It also uncovered some linking
errors that weren't obvious when compiling the driver into the kernel.
That said, I'd prefer to mark my init tables discardable with __initdata and
think the module load support is going to go untested and bitrot over time.
Cheers,
Stefan
0: Chen-Yu Tsai's tak here mostly: https://www.youtube.com/watch?v=d1VIAnVb3hI
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 870 bytes --]
[-- Attachment #2: Type: text/plain, Size: 112 bytes --]
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2026-08-03 17:48 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-02 20:33 [PATCH v9 00/12] ZTE zx297520v3 clock bindings and driver Stefan Dösinger
2026-08-02 20:33 ` Stefan Dösinger
2026-08-02 20:33 ` [PATCH v9 01/12] dt-bindings: clk: zte: Add zx297520v3 top clock and reset controller Stefan Dösinger
2026-08-02 20:33 ` Stefan Dösinger
2026-08-02 20:42 ` sashiko-bot
2026-08-02 20:42 ` sashiko-bot
2026-08-04 6:37 ` Krzysztof Kozlowski
2026-08-04 6:37 ` Krzysztof Kozlowski
2026-08-02 20:33 ` [PATCH v9 02/12] dt-bindings: clk: zte: Add zx297520v3 matrix " Stefan Dösinger
2026-08-02 20:33 ` Stefan Dösinger
2026-08-02 20:42 ` sashiko-bot
2026-08-02 20:42 ` sashiko-bot
2026-08-02 20:33 ` [PATCH v9 03/12] dt-bindings: clk: zte: Add zx297520v3 LSP " Stefan Dösinger
2026-08-02 20:33 ` Stefan Dösinger
2026-08-02 20:40 ` sashiko-bot
2026-08-02 20:40 ` sashiko-bot
2026-08-02 20:33 ` [PATCH v9 04/12] mfd: zx297520v3: Add a clock and reset MFD driver Stefan Dösinger
2026-08-02 20:33 ` Stefan Dösinger
2026-08-02 20:45 ` sashiko-bot
2026-08-02 20:45 ` sashiko-bot
2026-08-02 20:33 ` [PATCH v9 05/12] clk: zte: Add Clock registration infrastructure Stefan Dösinger
2026-08-02 20:33 ` Stefan Dösinger
2026-08-02 20:49 ` sashiko-bot
2026-08-02 20:49 ` sashiko-bot
2026-08-03 16:03 ` Brian Masney
2026-08-03 16:03 ` Brian Masney
2026-08-03 17:48 ` Stefan Dösinger [this message]
2026-08-03 17:48 ` Stefan Dösinger
2026-08-05 23:15 ` Brian Masney
2026-08-05 23:15 ` Brian Masney
2026-08-03 16:05 ` Brian Masney
2026-08-03 16:05 ` Brian Masney
2026-08-02 20:33 ` [PATCH v9 06/12] clk: zte: Add regmap-based clocks Stefan Dösinger
2026-08-02 20:33 ` Stefan Dösinger
2026-08-02 20:55 ` sashiko-bot
2026-08-02 20:55 ` sashiko-bot
2026-08-03 16:08 ` Brian Masney
2026-08-03 16:08 ` Brian Masney
2026-08-02 20:33 ` [PATCH v9 07/12] clk: zte: Add zx PLL support infrastructure Stefan Dösinger
2026-08-02 20:33 ` Stefan Dösinger
2026-08-02 20:52 ` sashiko-bot
2026-08-02 20:52 ` sashiko-bot
2026-08-03 16:14 ` Brian Masney
2026-08-03 16:14 ` Brian Masney
2026-08-02 20:33 ` [PATCH v9 08/12] clk: zte: Introduce a driver for zx297520v3 top clocks Stefan Dösinger
2026-08-02 20:33 ` Stefan Dösinger
2026-08-02 20:59 ` sashiko-bot
2026-08-02 20:59 ` sashiko-bot
2026-08-02 20:33 ` [PATCH v9 09/12] clk: zte: Introduce a driver for zx297520v3 matrix clocks Stefan Dösinger
2026-08-02 20:33 ` Stefan Dösinger
2026-08-02 21:26 ` sashiko-bot
2026-08-02 21:26 ` sashiko-bot
2026-08-02 20:33 ` [PATCH v9 10/12] clk: zte: Introduce a driver for zx297520v3 LSP clocks Stefan Dösinger
2026-08-02 20:33 ` Stefan Dösinger
2026-08-02 20:59 ` sashiko-bot
2026-08-02 20:59 ` sashiko-bot
2026-08-02 20:33 ` [PATCH v9 11/12] reset: zte: Add a zx297520v3 reset driver Stefan Dösinger
2026-08-02 20:33 ` Stefan Dösinger
2026-08-02 21:04 ` sashiko-bot
2026-08-02 21:04 ` sashiko-bot
2026-08-02 20:33 ` [PATCH v9 12/12] ARM: dts: zte: Declare zx297520v3 CRM device nodes Stefan Dösinger
2026-08-02 20:33 ` Stefan Dösinger
2026-08-02 21:03 ` sashiko-bot
2026-08-02 21:03 ` sashiko-bot
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=ky2t5IqOTfWMdfZsXE91Gg@gmail.com \
--to=stefandoesinger@gmail.com \
--cc=bmasney@redhat.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=mfd@lists.linux.dev \
--cc=mturquette@baylibre.com \
--cc=neil.armstrong@linaro.org \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=vkoul@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.