Skip to content

Commit 5a5ca2c

Browse files
rfs613geertu
authored andcommitted
clk: renesas: r9a06g032: Document structs
Add some kerneldoc comments for the structures. Signed-off-by: Ralph Siemsen <[email protected]> Reviewed-by: Miquel Raynal <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent 2689c12 commit 5a5ca2c

File tree

1 file changed

+49
-1
lines changed

1 file changed

+49
-1
lines changed

drivers/clk/renesas/r9a06g032-clocks.c

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,27 @@
2929
#define R9A06G032_SYSCTRL_USB_H2MODE (1<<1)
3030
#define R9A06G032_SYSCTRL_DMAMUX 0xA0
3131

32+
/**
33+
* struct r9a06g032_gate - clock-related control bits
34+
* @gate: clock enable/disable
35+
* @reset: clock module reset (active low)
36+
* @ready: enables NoC forwarding of read/write requests to device,
37+
* (eg. device is ready to handle read/write requests)
38+
* @midle: request to idle the NoC interconnect
39+
*
40+
* Each of these fields describes a single bit in a register,
41+
* which controls some aspect of clock gating. The @gate field
42+
* is mandatory, this one enables/disables the clock. The
43+
* other fields are optional, with zero indicating "not used".
44+
*
45+
* In most cases there is a @reset bit which needs to be
46+
* de-asserted to bring the module out of reset.
47+
*
48+
* Modules may also need to signal when they are @ready to
49+
* handle requests (read/writes) from the NoC interconnect.
50+
*
51+
* Similarly, the @midle bit is used to idle the master.
52+
*/
3253
struct r9a06g032_gate {
3354
u16 gate, reset, ready, midle;
3455
/* Unused fields omitted to save space */
@@ -43,7 +64,34 @@ enum gate_type {
4364
K_DUALGATE /* special for UARTs */
4465
};
4566

46-
/* This is used to describe a clock for instantiation */
67+
/**
68+
* struct r9a06g032_clkdesc - describe a single clock
69+
* @name: string describing this clock
70+
* @managed: boolean indicating if this clock should be
71+
* started/stopped as part of power management
72+
* @type: see enum @gate_type
73+
* @index: the ID of this clock element
74+
* @source: the ID+1 of the parent clock element.
75+
* Root clock uses ID of ~0 (PARENT_ID);
76+
* @gate: clock enable/disable
77+
* @div_min: smallest permitted clock divider
78+
* @div_max: largest permitted clock divider
79+
* @reg: clock divider register offset, in 32-bit words
80+
* @div_table: optional list of fixed clock divider values;
81+
* must be in ascending order, zero for unused
82+
* @div: divisor for fixed-factor clock
83+
* @mul: multiplier for fixed-factor clock
84+
* @group: UART group, 0=UART0/1/2, 1=UART3/4/5/6/7
85+
* @sel: select either g1/r1 or g2/r2 as clock source
86+
* @g1: 1st source gate (clock enable/disable)
87+
* @r1: 1st source reset (module reset)
88+
* @g2: 2nd source gate (clock enable/disable)
89+
* @r2: 2nd source reset (module reset)
90+
*
91+
* Describes a single element in the clock tree hierarchy.
92+
* As there are quite a large number of clock elements, this
93+
* structure is packed tightly to conserve space.
94+
*/
4795
struct r9a06g032_clkdesc {
4896
const char *name;
4997
uint32_t managed:1;

0 commit comments

Comments
 (0)