From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Ralph Siemsen <ralph.siemsen@linaro.org>
Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org,
Stephen Boyd <sboyd@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Geert Uytterhoeven <geert+renesas@glider.be>
Subject: Re: [PATCH 3/4] clk: renesas: r9a06g032: document structs
Date: Wed, 1 Mar 2023 12:24:30 +0100 [thread overview]
Message-ID: <20230301122430.4317530f@xps-13> (raw)
In-Reply-To: <20230227183937.377612-4-ralph.siemsen@linaro.org>
Hi Ralph,
ralph.siemsen@linaro.org wrote on Mon, 27 Feb 2023 13:39:35 -0500:
> Add some kerneldoc comments for the structures.
>
> Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org>
> ---
>
> drivers/clk/renesas/r9a06g032-clocks.c | 36 +++++++++++++++++++++++++-
> 1 file changed, 35 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/clk/renesas/r9a06g032-clocks.c b/drivers/clk/renesas/r9a06g032-clocks.c
> index 8a1ab9da19ae..1b7801f14c8c 100644
> --- a/drivers/clk/renesas/r9a06g032-clocks.c
> +++ b/drivers/clk/renesas/r9a06g032-clocks.c
> @@ -27,6 +27,26 @@
>
> #define R9A06G032_SYSCTRL_DMAMUX 0xA0
>
Thanks for the change, I think it's always interesting to document a
bit more the code and strucs, I would like to offer a few proposals,
feel free to ignore if you disagree.
> +/**
> + * struct r9a06g032_gate - clock gate control bits
> + * @gate: bit which enables/disables the clock
Is this really a bit? I see below you explain what each field means
in terms of offset/bitmask, so maybe we could be vague here,
something like:
"configuration to enable/disable the clock"
> + * @reset: bit which controls module reset (active low)
"clock module reset" ?
> + * @ready: bit which indicates device is ready for access
"the clock is stacle and the device fed should be ready for access"
(not sure about this one)
> + * @midle: bit which requests to idle the NoC interconnect
> + *
> + * Each of these fields describes a single bit in a register,
> + * which controls some aspect of clock gating. The @gate field
> + * is mandatory, this one enables/disables the clock. The
> + * other fields are optional, with zero indicating "not used".
> + *
> + * In most cases there is a @reset bit which needs to be
> + * de-asserted to bring the module out of reset.
> + *
> + * Modules may also need to signal when the are @ready to
> + * handle requests (read/writes) from the NoC interconnect.
> + *
> + * Similarly, the @midle bit is used to idle the master.
> + */
> struct r9a06g032_gate {
> u16 gate, reset, ready, midle;
> /* Unused fields omitted to save space */
> @@ -41,7 +61,21 @@ enum gate_type {
> K_DUALGATE /* special for UARTs */
> };
>
> -/* This is used to describe a clock for instantiation */
> +/**
> + * struct r9a06g032_clkdesc - describe a single clock
> + * @name: string describing this clock
> + * @managed: boolan indicating if this clock should be
typo: boolean
> + * start/stop as part of power management
started/stopped?
> + * @type: see enum gate_type
> + * @index: the ID of this clock element
> + * @source: the ID+1 of the parent clock element.
> + * Root clock uses ID of ~0 (PARENT_ID);
> + * @gate: describes the bits which control clock gate
I would just refer to the structure above (like @type).
No description of the following fields? :-) :-) It's okay, but while
you're at it...
> + *
> + * Describes a single element in the clock tree hierarchy.
> + * As there are quite a large number of clock elements, this
> + * structure is packed tightly to conserve space.
> + */
> struct r9a06g032_clkdesc {
> const char *name;
> uint32_t managed:1;
Thanks,
Miquèl
next prev parent reply other threads:[~2023-03-01 11:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-27 18:39 [PATCH 0/4] Renesas r9a06g032 clock table improvements Ralph Siemsen
2023-02-27 18:39 ` [PATCH 1/4] clk: renesas: r9a06g032: improve readability Ralph Siemsen
2023-02-27 18:39 ` [PATCH 2/4] clk: renesas: r9a06g032: drop unused fields Ralph Siemsen
2023-03-01 11:13 ` Miquel Raynal
2023-02-27 18:39 ` [PATCH 3/4] clk: renesas: r9a06g032: document structs Ralph Siemsen
2023-03-01 11:24 ` Miquel Raynal [this message]
2023-03-01 19:03 ` Ralph Siemsen
2023-02-27 18:39 ` [PATCH 4/4] clk: renesas: r9a06g032: improve clock tables Ralph Siemsen
2023-03-01 12:58 ` Miquel Raynal
2023-03-01 19:19 ` Ralph Siemsen
2023-03-01 21:26 ` Ralph Siemsen
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=20230301122430.4317530f@xps-13 \
--to=miquel.raynal@bootlin.com \
--cc=geert+renesas@glider.be \
--cc=linux-clk@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=ralph.siemsen@linaro.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