Skip to content

Commit c460f97

Browse files
mchehabrafaeljw
authored andcommitted
docs: cpu-freq: convert core.txt to ReST
- Add a SPDX header; - Adjust the document title, based on the original contents of cpu-freq/index.txt; - Use lists where needed; - Comment out the existing text-only index; - use ``foo`` to mark a literal expression with asterisk; - Adjust some title marks; - Add table markups; - Add notes markups; - Some whitespace fixes and new line breaks; - Add it to cpu-freq/index.rst. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 12bd112 commit c460f97

File tree

2 files changed

+35
-32
lines changed

2 files changed

+35
-32
lines changed

Documentation/cpu-freq/core.txt renamed to Documentation/cpu-freq/core.rst

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,23 @@
1-
CPU frequency and voltage scaling code in the Linux(TM) kernel
1+
.. SPDX-License-Identifier: GPL-2.0
22
3+
=============================================================
4+
General description of the CPUFreq core and CPUFreq notifiers
5+
=============================================================
36

4-
L i n u x C P U F r e q
7+
Authors:
8+
- Dominik Brodowski <[email protected]>
9+
- David Kimdon <[email protected]>
10+
- Rafael J. Wysocki <[email protected]>
11+
- Viresh Kumar <[email protected]>
512

6-
C P U F r e q C o r e
13+
.. Contents:
714
8-
9-
Dominik Brodowski <[email protected]>
10-
David Kimdon <[email protected]>
11-
Rafael J. Wysocki <[email protected]>
12-
Viresh Kumar <[email protected]>
13-
14-
15-
16-
Clock scaling allows you to change the clock speed of the CPUs on the
17-
fly. This is a nice method to save battery power, because the lower
18-
the clock speed, the less power the CPU consumes.
19-
20-
21-
Contents:
22-
---------
23-
1. CPUFreq core and interfaces
24-
2. CPUFreq notifiers
25-
3. CPUFreq Table Generation with Operating Performance Point (OPP)
15+
1. CPUFreq core and interfaces
16+
2. CPUFreq notifiers
17+
3. CPUFreq Table Generation with Operating Performance Point (OPP)
2618
2719
1. General Information
28-
=======================
20+
======================
2921

3022
The CPUFreq core code is located in drivers/cpufreq/cpufreq.c. This
3123
cpufreq code offers a standardized interface for the CPUFreq
@@ -63,7 +55,7 @@ The phase is specified in the second argument to the notifier. The phase is
6355
CPUFREQ_CREATE_POLICY when the policy is first created and it is
6456
CPUFREQ_REMOVE_POLICY when the policy is removed.
6557

66-
The third argument, a void *pointer, points to a struct cpufreq_policy
58+
The third argument, a ``void *pointer``, points to a struct cpufreq_policy
6759
consisting of several values, including min, max (the lower and upper
6860
frequencies (in kHz) of the new policy).
6961

@@ -80,10 +72,13 @@ CPUFREQ_POSTCHANGE.
8072

8173
The third argument is a struct cpufreq_freqs with the following
8274
values:
83-
cpu - number of the affected CPU
84-
old - old frequency
85-
new - new frequency
86-
flags - flags of the cpufreq driver
75+
76+
===== ===========================
77+
cpu number of the affected CPU
78+
old old frequency
79+
new new frequency
80+
flags flags of the cpufreq driver
81+
===== ===========================
8782

8883
3. CPUFreq Table Generation with Operating Performance Point (OPP)
8984
==================================================================
@@ -94,9 +89,12 @@ dev_pm_opp_init_cpufreq_table -
9489
the OPP layer's internal information about the available frequencies
9590
into a format readily providable to cpufreq.
9691

97-
WARNING: Do not use this function in interrupt context.
92+
.. Warning::
93+
94+
Do not use this function in interrupt context.
95+
96+
Example::
9897

99-
Example:
10098
soc_pm_init()
10199
{
102100
/* Do things */
@@ -106,7 +104,10 @@ dev_pm_opp_init_cpufreq_table -
106104
/* Do other things */
107105
}
108106

109-
NOTE: This function is available only if CONFIG_CPU_FREQ is enabled in
110-
addition to CONFIG_PM_OPP.
107+
.. note::
108+
109+
This function is available only if CONFIG_CPU_FREQ is enabled in
110+
addition to CONFIG_PM_OPP.
111111

112-
dev_pm_opp_free_cpufreq_table - Free up the table allocated by dev_pm_opp_init_cpufreq_table
112+
dev_pm_opp_free_cpufreq_table
113+
Free up the table allocated by dev_pm_opp_init_cpufreq_table

Documentation/cpu-freq/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Author: Dominik Brodowski <[email protected]>
1414
.. toctree::
1515
:maxdepth: 1
1616

17+
core
18+
1719
Mailing List
1820
------------
1921
There is a CPU frequency changing CVS commit and general list where

0 commit comments

Comments
 (0)