Skip to content

Commit 5e3b5f3

Browse files
committed
Merge tag 'samsung-clk-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into clk-samsung
Pull Samsung SoC clk driver changes from Krzysztof Kozlowski: Few kernel-doc fixes for Samsung SoC clock controllers. * tag 'samsung-clk-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: clk: samsung: Improve kernel-doc comments clk: samsung: Fix kernel-doc comments
2 parents b85ea95 + 5583e92 commit 5e3b5f3

File tree

2 files changed

+101
-86
lines changed

2 files changed

+101
-86
lines changed

drivers/clk/samsung/clk-cpu.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
#include "clk.h"
1212

1313
/**
14-
* struct exynos_cpuclk_data: config data to setup cpu clocks.
15-
* @prate: frequency of the primary parent clock (in KHz).
16-
* @div0: value to be programmed in the div_cpu0 register.
17-
* @div1: value to be programmed in the div_cpu1 register.
14+
* struct exynos_cpuclk_cfg_data - config data to setup cpu clocks
15+
* @prate: frequency of the primary parent clock (in KHz)
16+
* @div0: value to be programmed in the div_cpu0 register
17+
* @div1: value to be programmed in the div_cpu1 register
1818
*
1919
* This structure holds the divider configuration data for dividers in the CPU
2020
* clock domain. The parent frequency at which these divider values are valid is
@@ -29,17 +29,17 @@ struct exynos_cpuclk_cfg_data {
2929
};
3030

3131
/**
32-
* struct exynos_cpuclk: information about clock supplied to a CPU core.
33-
* @hw: handle between CCF and CPU clock.
34-
* @alt_parent: alternate parent clock to use when switching the speed
35-
* of the primary parent clock.
36-
* @ctrl_base: base address of the clock controller.
37-
* @lock: cpu clock domain register access lock.
38-
* @cfg: cpu clock rate configuration data.
39-
* @num_cfgs: number of array elements in @cfg array.
40-
* @clk_nb: clock notifier registered for changes in clock speed of the
41-
* primary parent clock.
42-
* @flags: configuration flags for the CPU clock.
32+
* struct exynos_cpuclk - information about clock supplied to a CPU core
33+
* @hw: handle between CCF and CPU clock
34+
* @alt_parent: alternate parent clock to use when switching the speed
35+
* of the primary parent clock
36+
* @ctrl_base: base address of the clock controller
37+
* @lock: cpu clock domain register access lock
38+
* @cfg: cpu clock rate configuration data
39+
* @num_cfgs: number of array elements in @cfg array
40+
* @clk_nb: clock notifier registered for changes in clock speed of the
41+
* primary parent clock
42+
* @flags: configuration flags for the CPU clock
4343
*
4444
* This structure holds information required for programming the CPU clock for
4545
* various clock speeds.

drivers/clk/samsung/clk.h

Lines changed: 86 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
#include "clk-pll.h"
1515

1616
/**
17-
* struct samsung_clk_provider: information about clock provider
18-
* @reg_base: virtual address for the register base.
19-
* @dev: clock provider device needed for runtime PM.
20-
* @lock: maintains exclusion between callbacks for a given clock-provider.
21-
* @clk_data: holds clock related data like clk_hw* and number of clocks.
17+
* struct samsung_clk_provider - information about clock provider
18+
* @reg_base: virtual address for the register base
19+
* @dev: clock provider device needed for runtime PM
20+
* @lock: maintains exclusion between callbacks for a given clock-provider
21+
* @clk_data: holds clock related data like clk_hw* and number of clocks
2222
*/
2323
struct samsung_clk_provider {
2424
void __iomem *reg_base;
@@ -29,10 +29,10 @@ struct samsung_clk_provider {
2929
};
3030

3131
/**
32-
* struct samsung_clock_alias: information about mux clock
33-
* @id: platform specific id of the clock.
34-
* @dev_name: name of the device to which this clock belongs.
35-
* @alias: optional clock alias name to be assigned to this clock.
32+
* struct samsung_clock_alias - information about mux clock
33+
* @id: platform specific id of the clock
34+
* @dev_name: name of the device to which this clock belongs
35+
* @alias: optional clock alias name to be assigned to this clock
3636
*/
3737
struct samsung_clock_alias {
3838
unsigned int id;
@@ -50,12 +50,12 @@ struct samsung_clock_alias {
5050
#define MHZ (1000 * 1000)
5151

5252
/**
53-
* struct samsung_fixed_rate_clock: information about fixed-rate clock
54-
* @id: platform specific id of the clock.
55-
* @name: name of this fixed-rate clock.
56-
* @parent_name: optional parent clock name.
57-
* @flags: optional fixed-rate clock flags.
58-
* @fixed-rate: fixed clock rate of this clock.
53+
* struct samsung_fixed_rate_clock - information about fixed-rate clock
54+
* @id: platform specific id of the clock
55+
* @name: name of this fixed-rate clock
56+
* @parent_name: optional parent clock name
57+
* @flags: optional fixed-rate clock flags
58+
* @fixed_rate: fixed clock rate of this clock
5959
*/
6060
struct samsung_fixed_rate_clock {
6161
unsigned int id;
@@ -74,14 +74,14 @@ struct samsung_fixed_rate_clock {
7474
.fixed_rate = frate, \
7575
}
7676

77-
/*
78-
* struct samsung_fixed_factor_clock: information about fixed-factor clock
79-
* @id: platform specific id of the clock.
80-
* @name: name of this fixed-factor clock.
81-
* @parent_name: parent clock name.
82-
* @mult: fixed multiplication factor.
83-
* @div: fixed division factor.
84-
* @flags: optional fixed-factor clock flags.
77+
/**
78+
* struct samsung_fixed_factor_clock - information about fixed-factor clock
79+
* @id: platform specific id of the clock
80+
* @name: name of this fixed-factor clock
81+
* @parent_name: parent clock name
82+
* @mult: fixed multiplication factor
83+
* @div: fixed division factor
84+
* @flags: optional fixed-factor clock flags
8585
*/
8686
struct samsung_fixed_factor_clock {
8787
unsigned int id;
@@ -103,16 +103,16 @@ struct samsung_fixed_factor_clock {
103103
}
104104

105105
/**
106-
* struct samsung_mux_clock: information about mux clock
107-
* @id: platform specific id of the clock.
108-
* @name: name of this mux clock.
109-
* @parent_names: array of pointer to parent clock names.
110-
* @num_parents: number of parents listed in @parent_names.
111-
* @flags: optional flags for basic clock.
112-
* @offset: offset of the register for configuring the mux.
113-
* @shift: starting bit location of the mux control bit-field in @reg.
114-
* @width: width of the mux control bit-field in @reg.
115-
* @mux_flags: flags for mux-type clock.
106+
* struct samsung_mux_clock - information about mux clock
107+
* @id: platform specific id of the clock
108+
* @name: name of this mux clock
109+
* @parent_names: array of pointer to parent clock names
110+
* @num_parents: number of parents listed in @parent_names
111+
* @flags: optional flags for basic clock
112+
* @offset: offset of the register for configuring the mux
113+
* @shift: starting bit location of the mux control bit-field in @reg
114+
* @width: width of the mux control bit-field in @reg
115+
* @mux_flags: flags for mux-type clock
116116
*/
117117
struct samsung_mux_clock {
118118
unsigned int id;
@@ -146,14 +146,16 @@ struct samsung_mux_clock {
146146
__MUX(_id, cname, pnames, o, s, w, f, mf)
147147

148148
/**
149-
* @id: platform specific id of the clock.
150-
* struct samsung_div_clock: information about div clock
151-
* @name: name of this div clock.
152-
* @parent_name: name of the parent clock.
153-
* @flags: optional flags for basic clock.
154-
* @offset: offset of the register for configuring the div.
155-
* @shift: starting bit location of the div control bit-field in @reg.
156-
* @div_flags: flags for div-type clock.
149+
* struct samsung_div_clock - information about div clock
150+
* @id: platform specific id of the clock
151+
* @name: name of this div clock
152+
* @parent_name: name of the parent clock
153+
* @flags: optional flags for basic clock
154+
* @offset: offset of the register for configuring the div
155+
* @shift: starting bit location of the div control bit-field in @reg
156+
* @width: width of the bitfield
157+
* @div_flags: flags for div-type clock
158+
* @table: array of divider/value pairs ending with a div set to 0
157159
*/
158160
struct samsung_div_clock {
159161
unsigned int id;
@@ -190,14 +192,14 @@ struct samsung_div_clock {
190192
__DIV(_id, cname, pname, o, s, w, 0, 0, t)
191193

192194
/**
193-
* struct samsung_gate_clock: information about gate clock
194-
* @id: platform specific id of the clock.
195-
* @name: name of this gate clock.
196-
* @parent_name: name of the parent clock.
197-
* @flags: optional flags for basic clock.
198-
* @offset: offset of the register for configuring the gate.
199-
* @bit_idx: bit index of the gate control bit-field in @reg.
200-
* @gate_flags: flags for gate-type clock.
195+
* struct samsung_gate_clock - information about gate clock
196+
* @id: platform specific id of the clock
197+
* @name: name of this gate clock
198+
* @parent_name: name of the parent clock
199+
* @flags: optional flags for basic clock
200+
* @offset: offset of the register for configuring the gate
201+
* @bit_idx: bit index of the gate control bit-field in @reg
202+
* @gate_flags: flags for gate-type clock
201203
*/
202204
struct samsung_gate_clock {
203205
unsigned int id;
@@ -226,24 +228,25 @@ struct samsung_gate_clock {
226228
#define PNAME(x) static const char * const x[] __initconst
227229

228230
/**
229-
* struct samsung_clk_reg_dump: register dump of clock controller registers.
230-
* @offset: clock register offset from the controller base address.
231-
* @value: the value to be register at offset.
231+
* struct samsung_clk_reg_dump - register dump of clock controller registers
232+
* @offset: clock register offset from the controller base address
233+
* @value: the value to be register at offset
232234
*/
233235
struct samsung_clk_reg_dump {
234236
u32 offset;
235237
u32 value;
236238
};
237239

238240
/**
239-
* struct samsung_pll_clock: information about pll clock
240-
* @id: platform specific id of the clock.
241-
* @name: name of this pll clock.
242-
* @parent_name: name of the parent clock.
243-
* @flags: optional flags for basic clock.
244-
* @con_offset: offset of the register for configuring the PLL.
245-
* @lock_offset: offset of the register for locking the PLL.
246-
* @type: Type of PLL to be registered.
241+
* struct samsung_pll_clock - information about pll clock
242+
* @id: platform specific id of the clock
243+
* @name: name of this pll clock
244+
* @parent_name: name of the parent clock
245+
* @flags: optional flags for basic clock
246+
* @con_offset: offset of the register for configuring the PLL
247+
* @lock_offset: offset of the register for locking the PLL
248+
* @type: type of PLL to be registered
249+
* @rate_table: array of PLL settings for possible PLL rates
247250
*/
248251
struct samsung_pll_clock {
249252
unsigned int id;
@@ -302,39 +305,51 @@ struct samsung_clock_reg_cache {
302305
unsigned int rsuspend_num;
303306
};
304307

308+
/**
309+
* struct samsung_cmu_info - all clocks information needed for CMU registration
310+
* @pll_clks: list of PLL clocks
311+
* @nr_pll_clks: count of clocks in @pll_clks
312+
* @mux_clks: list of mux clocks
313+
* @nr_mux_clks: count of clocks in @mux_clks
314+
* @div_clks: list of div clocks
315+
* @nr_div_clks: count of clocks in @div_clks
316+
* @gate_clks: list of gate clocks
317+
* @nr_gate_clks: count of clocks in @gate_clks
318+
* @fixed_clks: list of fixed clocks
319+
* @nr_fixed_clks: count clocks in @fixed_clks
320+
* @fixed_factor_clks: list of fixed factor clocks
321+
* @nr_fixed_factor_clks: count of clocks in @fixed_factor_clks
322+
* @nr_clk_ids: total number of clocks with IDs assigned
323+
* @cpu_clks: list of CPU clocks
324+
* @nr_cpu_clks: count of clocks in @cpu_clks
325+
* @clk_regs: list of clock registers
326+
* @nr_clk_regs: count of clock registers in @clk_regs
327+
* @suspend_regs: list of clock registers to set before suspend
328+
* @nr_suspend_regs: count of clock registers in @suspend_regs
329+
* @clk_name: name of the parent clock needed for CMU register access
330+
*/
305331
struct samsung_cmu_info {
306-
/* list of pll clocks and respective count */
307332
const struct samsung_pll_clock *pll_clks;
308333
unsigned int nr_pll_clks;
309-
/* list of mux clocks and respective count */
310334
const struct samsung_mux_clock *mux_clks;
311335
unsigned int nr_mux_clks;
312-
/* list of div clocks and respective count */
313336
const struct samsung_div_clock *div_clks;
314337
unsigned int nr_div_clks;
315-
/* list of gate clocks and respective count */
316338
const struct samsung_gate_clock *gate_clks;
317339
unsigned int nr_gate_clks;
318-
/* list of fixed clocks and respective count */
319340
const struct samsung_fixed_rate_clock *fixed_clks;
320341
unsigned int nr_fixed_clks;
321-
/* list of fixed factor clocks and respective count */
322342
const struct samsung_fixed_factor_clock *fixed_factor_clks;
323343
unsigned int nr_fixed_factor_clks;
324-
/* total number of clocks with IDs assigned*/
325344
unsigned int nr_clk_ids;
326-
/* list of cpu clocks and respective count */
327345
const struct samsung_cpu_clock *cpu_clks;
328346
unsigned int nr_cpu_clks;
329347

330-
/* list and number of clocks registers */
331348
const unsigned long *clk_regs;
332349
unsigned int nr_clk_regs;
333350

334-
/* list and number of clocks registers to set before suspend */
335351
const struct samsung_clk_reg_dump *suspend_regs;
336352
unsigned int nr_suspend_regs;
337-
/* name of the parent clock needed for CMU register access */
338353
const char *clk_name;
339354
};
340355

0 commit comments

Comments
 (0)