All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralph Siemsen <ralph.siemsen@linaro.org>
To: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org
Cc: "Stephen Boyd" <sboyd@kernel.org>,
	"Miquèl Raynal" <miquel.raynal@bootlin.com>,
	"Michael Turquette" <mturquette@baylibre.com>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Ralph Siemsen" <ralph.siemsen@linaro.org>
Subject: [PATCH 3/4] clk: renesas: r9a06g032: document structs
Date: Mon, 27 Feb 2023 13:39:35 -0500	[thread overview]
Message-ID: <20230227183937.377612-4-ralph.siemsen@linaro.org> (raw)
In-Reply-To: <20230227183937.377612-1-ralph.siemsen@linaro.org>

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
 
+/**
+ * struct r9a06g032_gate - clock gate control bits
+ * @gate:   bit which enables/disables the clock
+ * @reset:  bit which controls module reset (active low)
+ * @ready:  bit which indicates device is ready for access
+ * @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
+ *           start/stop as part of power management
+ * @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
+ *
+ * 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;
-- 
2.25.1


  parent reply	other threads:[~2023-02-27 18:40 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 ` Ralph Siemsen [this message]
2023-03-01 11:24   ` [PATCH 3/4] clk: renesas: r9a06g032: document structs Miquel Raynal
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=20230227183937.377612-4-ralph.siemsen@linaro.org \
    --to=ralph.siemsen@linaro.org \
    --cc=geert+renesas@glider.be \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=mturquette@baylibre.com \
    --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 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.