Skip to contentSkip to conversation

clk: samsung: Fix kernel-doc comments

PATCH Applied Sam Protsenko 3 participants 6 messages Nov 9, 2023 – Nov 16, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 clk: samsung: Fix kernel-doc comments

Fix some issues found in kernel-doc comments in Samsung CCF framework. It makes scripts/kernel-doc happy, which can be checked with:

    $ find drivers/clk/samsung/ -name '*.[ch]' -exec \
      scripts/kernel-doc -v -none {} \;
Fixes ddeac8d968d4 ("clk: samsung: add infrastructure to register cpu clocks")
Fixes 721c42a351b1 ("clk: samsung: add common clock framework helper functions for Samsung platforms")
Fixes 3ff6e0d8d64d ("clk: samsung: Add support to register rate_table for samsung plls")
---
 drivers/clk/samsung/clk-cpu.h | 2 +-
 drivers/clk/samsung/clk.h     | 9 ++++++---
 2 files changed, 7 insertions(+), 4 deletions(-)
drivers/clk/samsung/clk-cpu.h +1 -1
index fc9f67a3b22e..103f64193e42 100644
@@ -11,7 +11,7 @@
 #include "clk.h"
 
 /**
- * struct exynos_cpuclk_data: config data to setup cpu clocks.
+ * struct exynos_cpuclk_cfg_data: config data to setup cpu clocks.
  * @prate: frequency of the primary parent clock (in KHz).
  * @div0: value to be programmed in the div_cpu0 register.
  * @div1: value to be programmed in the div_cpu1 register.
drivers/clk/samsung/clk.h +6 -3
index ab9c3d7a25b3..4f17d5890a81 100644
@@ -55,7 +55,7 @@ struct samsung_clock_alias {
  * @name: name of this fixed-rate clock.
  * @parent_name: optional parent clock name.
  * @flags: optional fixed-rate clock flags.
- * @fixed-rate: fixed clock rate of this clock.
+ * @fixed_rate: fixed clock rate of this clock.
  */
 struct samsung_fixed_rate_clock {
 	unsigned int		id;
@@ -74,7 +74,7 @@ struct samsung_fixed_rate_clock {
 		.fixed_rate	= frate,		\
 	}
 
-/*
+/**
  * struct samsung_fixed_factor_clock: information about fixed-factor clock
  * @id: platform specific id of the clock.
  * @name: name of this fixed-factor clock.
@@ -146,14 +146,16 @@ struct samsung_mux_clock {
 	__MUX(_id, cname, pnames, o, s, w, f, mf)
 
 /**
- * @id: platform specific id of the clock.
  * struct samsung_div_clock: information about div clock
+ * @id: platform specific id of the clock.
  * @name: name of this div clock.
  * @parent_name: name of the parent clock.
  * @flags: optional flags for basic clock.
  * @offset: offset of the register for configuring the div.
  * @shift: starting bit location of the div control bit-field in @reg.
+ * @width: width of the bitfield.
  * @div_flags: flags for div-type clock.
+ * @table: array of divider/value pairs ending with a div set to 0.
  */
 struct samsung_div_clock {
 	unsigned int		id;
@@ -244,6 +246,7 @@ struct samsung_clk_reg_dump {
  * @con_offset: offset of the register for configuring the PLL.
  * @lock_offset: offset of the register for locking the PLL.
  * @type: Type of PLL to be registered.
+ * @rate_table: array of PLL settings for possible PLL rates.
  */
 struct samsung_pll_clock {
 	unsigned int		id;
Signature · 1 line
2.39.2
#1 lore raw

PATCH 2/2 clk: samsung: Improve kernel-doc comments

Unify and improve the style of kernel-doc comments in Samsung CCF framework. Resemble more idiomatic style described in [1] and commonly used throughout most of the kernel code.

[1] Documentation/doc-guide/kernel-doc.rst

---
 drivers/clk/samsung/clk-cpu.h |  30 +++----
 drivers/clk/samsung/clk.h     | 158 ++++++++++++++++++----------------
 2 files changed, 100 insertions(+), 88 deletions(-)
drivers/clk/samsung/clk-cpu.h +15 -15
index 103f64193e42..0164bd9ad021 100644
@@ -11,10 +11,10 @@
 #include "clk.h"
 
 /**
- * struct exynos_cpuclk_cfg_data: config data to setup cpu clocks.
- * @prate: frequency of the primary parent clock (in KHz).
- * @div0: value to be programmed in the div_cpu0 register.
- * @div1: value to be programmed in the div_cpu1 register.
+ * struct exynos_cpuclk_cfg_data - config data to setup cpu clocks
+ * @prate: frequency of the primary parent clock (in KHz)
+ * @div0: value to be programmed in the div_cpu0 register
+ * @div1: value to be programmed in the div_cpu1 register
  *
  * This structure holds the divider configuration data for dividers in the CPU
  * clock domain. The parent frequency at which these divider values are valid is
@@ -29,17 +29,17 @@ struct exynos_cpuclk_cfg_data {
 };
 
 /**
- * struct exynos_cpuclk: information about clock supplied to a CPU core.
- * @hw:	handle between CCF and CPU clock.
- * @alt_parent: alternate parent clock to use when switching the speed
- *	of the primary parent clock.
- * @ctrl_base:	base address of the clock controller.
- * @lock: cpu clock domain register access lock.
- * @cfg: cpu clock rate configuration data.
- * @num_cfgs: number of array elements in @cfg array.
- * @clk_nb: clock notifier registered for changes in clock speed of the
- *	primary parent clock.
- * @flags: configuration flags for the CPU clock.
+ * struct exynos_cpuclk - information about clock supplied to a CPU core
+ * @hw:		handle between CCF and CPU clock
+ * @alt_parent:	alternate parent clock to use when switching the speed
+ *		of the primary parent clock
+ * @ctrl_base:	base address of the clock controller
+ * @lock:	cpu clock domain register access lock
+ * @cfg:	cpu clock rate configuration data
+ * @num_cfgs:	number of array elements in @cfg array
+ * @clk_nb:	clock notifier registered for changes in clock speed of the
+ *		primary parent clock
+ * @flags:	configuration flags for the CPU clock
  *
  * This structure holds information required for programming the CPU clock for
  * various clock speeds.
drivers/clk/samsung/clk.h +85 -73

240 lines not on this page · raw message

Signature · 1 line
2.39.2
Acked-by Tested-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] clk: samsung: Improve kernel-doc comments

Quoted 4 lines · Sam Protsenko

Unify and improve the style of kernel-doc comments in Samsung CCF framework. Resemble more idiomatic style described in [1] and commonly used throughout most of the kernel code.

Quoted 8 lines

[1] Documentation/doc-guide/kernel-doc.rst

---
 drivers/clk/samsung/clk-cpu.h |  30 +++----
 drivers/clk/samsung/clk.h     | 158 ++++++++++++++++++----------------
 2 files changed, 100 insertions(+), 88 deletions(-)

thanks.

Signature · 1 line
~Randy
Reviewed-by Tested-by on v1 1/2
#3 lore raw
In reply to Sam Protsenko
Quoted 20 lines · Sam Protsenko

Fix some issues found in kernel-doc comments in Samsung CCF framework. It makes scripts/kernel-doc happy, which can be checked with:

    $ find drivers/clk/samsung/ -name '*.[ch]' -exec \
      scripts/kernel-doc -v -none {} \;
Fixes ddeac8d968d4 ("clk: samsung: add infrastructure to register cpu clocks")
Fixes 721c42a351b1 ("clk: samsung: add common clock framework helper functions for Samsung platforms")
Fixes 3ff6e0d8d64d ("clk: samsung: Add support to register rate_table for samsung plls")
---
 drivers/clk/samsung/clk-cpu.h | 2 +-
 drivers/clk/samsung/clk.h     | 9 ++++++---
 2 files changed, 7 insertions(+), 4 deletions(-)
drivers/clk/samsung/clk-cpu.h +0 -0
index fc9f67a3b22e..103f64193e42 100644

drivers/clk/samsung/clk-cpu.h line 14

Quoted 5 lines
drivers/clk/samsung/clk-cpu.h +1 -1
@@ -11,7 +11,7 @@
 #include "clk.h"
 
 /**
- * struct exynos_cpuclk_data: config data to setup cpu clocks.
+ * struct exynos_cpuclk_cfg_data: config data to setup cpu clocks.

Hm, OK, the ':' separator works. '-' is the documented separator here, but it's not worth updating the patch for that.

drivers/clk/samsung/clk-cpu.h line 17

Quoted 3 lines
drivers/clk/samsung/clk-cpu.h +0 -0
  * @prate: frequency of the primary parent clock (in KHz).
  * @div0: value to be programmed in the div_cpu0 register.
  * @div1: value to be programmed in the div_cpu1 register.

thanks.

Signature · 1 line
~Randy
#4 lore raw
Quoted 26 lines · Randy Dunlap
Quoted 22 lines · Sam Protsenko

Fix some issues found in kernel-doc comments in Samsung CCF framework. It makes scripts/kernel-doc happy, which can be checked with:

    $ find drivers/clk/samsung/ -name '*.[ch]' -exec \
      scripts/kernel-doc -v -none {} \;
Fixes ddeac8d968d4 ("clk: samsung: add infrastructure to register cpu clocks")
Fixes 721c42a351b1 ("clk: samsung: add common clock framework helper functions for Samsung platforms")
Fixes 3ff6e0d8d64d ("clk: samsung: Add support to register rate_table for samsung plls")
---
 drivers/clk/samsung/clk-cpu.h | 2 +-
 drivers/clk/samsung/clk.h     | 9 ++++++---
 2 files changed, 7 insertions(+), 4 deletions(-)
drivers/clk/samsung/clk-cpu.h +0 -0
index fc9f67a3b22e..103f64193e42 100644
@@ -11,7 +11,7 @@
 #include "clk.h"
 
Quoted 7 lines

drivers/clk/samsung/clk-cpu.h line 14

Quoted 3 lines
drivers/clk/samsung/clk-cpu.h +1 -1
 /**
- * struct exynos_cpuclk_data: config data to setup cpu clocks.
+ * struct exynos_cpuclk_cfg_data: config data to setup cpu clocks.

Hm, OK, the ':' separator works. '-' is the documented separator here, but it's not worth updating the patch for that.

Thanks for reviewing, Randy! As you probably already noticed, I updated ':' bits in patch #2. Just wanted to keep this one as minimal as possible.

Quoted 11 lines

drivers/clk/samsung/clk-cpu.h line 17

Quoted 3 lines
drivers/clk/samsung/clk-cpu.h +0 -0
  * @prate: frequency of the primary parent clock (in KHz).
  * @div0: value to be programmed in the div_cpu0 register.
  * @div1: value to be programmed in the div_cpu1 register.

thanks.

--
~Randy

#5 lore raw
In reply to Sam Protsenko
Quoted 8 lines · Sam Protsenko

Fix some issues found in kernel-doc comments in Samsung CCF framework. It makes scripts/kernel-doc happy, which can be checked with:

    $ find drivers/clk/samsung/ -name '*.[ch]' -exec \
      scripts/kernel-doc -v -none {} \;

[...]

Applied, thanks!

[1/2] clk: samsung: Fix kernel-doc comments

      https://git.kernel.org/krzk/linux/c/d1d53909bb5fbc9bf618ab78515fdbd5d6b691c6
[2/2] clk: samsung: Improve kernel-doc comments
      https://git.kernel.org/krzk/linux/c/5583e92be5c45448e6ea461e1780d46c17d14963

Best regards,

Signature · 1 line
Krzysztof Kozlowski <[email protected]>