From: Randy Dunlap <rdunlap@infradead.org>
To: Brian Masney <bmasney@redhat.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Maxime Ripard <mripard@kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>
Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org
Subject: Re: [PATCH v3 2/4] clk: add kernel docs for struct clk_core
Date: Tue, 12 May 2026 14:22:07 -0700 [thread overview]
Message-ID: <1322f23c-239c-4b36-93cd-fd8fd142dd16@infradead.org> (raw)
In-Reply-To: <20260511-clk-docs-v3-2-ed67e1065809@redhat.com>
On 5/11/26 6:35 PM, Brian Masney wrote:
> Document all of the members of struct clk_core.
>
> Signed-off-by: Brian Masney <bmasney@redhat.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Thanks.
> ---
> drivers/clk/clk.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 51 insertions(+)
>
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index 048adfa86a5d..0b519d95bbcb 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -63,6 +63,57 @@ struct clk_parent_map {
> int index;
> };
>
> +/**
> + * struct clk_core - The internal state of a clk in the clk tree.
> + * @name: Unique name of the clk for identification.
> + * @ops: Pointer to hardware-specific operations for this clk.
> + * @hw: Pointer for traversing from a struct clk to its
> + * corresponding hardware-specific structure.
> + * @owner: Kernel module owning this clk (for reference counting).
> + * @dev: Device associated with this clk (optional)
> + * @rpm_node: Node for runtime power management list management.
> + * @of_node: Device tree node associated with this clk (if applicable)
> + * @parent: Pointer to the current parent in the clock tree.
> + * @parents: Array of possible parents (for muxes/selectable parents).
> + * @num_parents: Number of possible parents.
> + * @new_parent_index: Index of the new parent during parent change operations.
> + * @rate: Current cached clock rate (Hz).
> + * @req_rate: The last rate requested by a call to clk_set_rate(). It's
> + * initialized to clk_core->rate. It's also updated to
> + * clk_core->rate every time the clock is reparented, and
> + * when we're doing the orphan -> !orphan transition.
> + * @new_rate: New rate to be set during a rate change operation.
> + * @new_parent: Pointer to new parent during parent change. This is also
> + * used when a clk's rate is changed.
> + * @new_child: Pointer to new child during reparenting. This is also
> + * used when a clk's rate is changed.
> + * @flags: Clock property and capability flags. See
> + * `clk framework flags`.
> + * @orphan: True if this clk is currently orphaned.
> + * @rpm_enabled: True if runtime power management is enabled for this clk.
> + * @enable_count: Reference count of enables.
> + * @prepare_count: Reference count of prepares.
> + * @protect_count: Protection reference count against disable.
> + * @min_rate: Minimum supported clock rate (Hz).
> + * @max_rate: Maximum supported clock rate (Hz).
> + * @accuracy: Accuracy of the clock rate (parts per billion).
> + * @phase: Current phase (degrees).
> + * @duty: Current duty cycle configuration (as ratio: num/den).
> + * @children: All of the children of this clk.
> + * @child_node: Node for linking as a child in the parent's list.
> + * @hashtable_node: Node for hash table that allows fast clk lookup by name.
> + * @clks: All of the clk consumers registered.
> + * @notifier_count: Number of notifiers registered for this clk.
> + * @dentry: DebugFS entry for this clk.
> + * @debug_node: DebugFS node for this clk.
> + * @ref: Reference count for structure lifetime management.
> + *
> + * Managed by the clk framework. Clk providers and consumers do not interact
> + * with this structure directly. Instead, clk operations flow through the
> + * framework and the framework manipulates this structure to keep track of
> + * parent/child relationships, rate, enable state, etc.
> + *
> + */
> struct clk_core {
> const char *name;
> const struct clk_ops *ops;
>
--
~Randy
next prev parent reply other threads:[~2026-05-12 21:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 1:35 [PATCH v3 0/4] clk: update kernel docs Brian Masney
2026-05-12 1:35 ` [PATCH v3 1/4] clk: add kernel docs for the core flags Brian Masney
2026-05-13 5:48 ` Maxime Ripard
2026-05-12 1:35 ` [PATCH v3 2/4] clk: add kernel docs for struct clk_core Brian Masney
2026-05-12 21:22 ` Randy Dunlap [this message]
2026-05-13 5:48 ` Maxime Ripard
2026-05-12 1:35 ` [PATCH v3 3/4] docs: clk: include some identifiers to keep documentation up to date Brian Masney
2026-05-12 21:22 ` Randy Dunlap
2026-05-13 5:48 ` Maxime Ripard
2026-05-12 1:35 ` [PATCH v3 4/4] clk: test: convert constants to use HZ_PER_MHZ Brian Masney
2026-05-13 5:49 ` Maxime Ripard
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=1322f23c-239c-4b36-93cd-fd8fd142dd16@infradead.org \
--to=rdunlap@infradead.org \
--cc=bmasney@redhat.com \
--cc=corbet@lwn.net \
--cc=linux-clk@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@kernel.org \
--cc=skhan@linuxfoundation.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