Subversion Repositories shark

Rev

Rev 1676 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1676 tullio 1
%----------------------------------------------------------------------------
2
\chapter{The CPU frequency scaling library}
3
%----------------------------------------------------------------------------
4
 
5
This driver allow the application to change the CPU speed in order to reduce
6
power consumption. After the driver initialization is possible to know the list
7
of supported frequencies, the minimin and maximun allowed frequncy. Is possible
8
to get and set the current frequecy and obtaind the deoretical value of the
9
transition duration.
10
 
11
%----------------------------------------------------------------------------
12
\section{CPU Information utility}
13
%----------------------------------------------------------------------------
14
 
15
These functions allow the application to know informations about the CPU like
16
manufacturer, model, capabilities, etc.
17
 
18
\vspace{7mm}
19
 
20
\begin{intest}
21
CPU26\_INIT\index{CPU26\_init()}
22
\end{intest}
23
 
24
\begin{description}
25
\item [\textbf{int CPU26\_init(void);}]
26
\item [\textbf{Description:}] Initialize the driver and all internal structures. The
27
function returns 0 if the procedure was succesfully, -1 otherwise.
28
\end{description}
29
 
30
\begin{intest}
31
CPU26\_CLOSE\index{CPU26\_close()}
32
\end{intest}
33
 
34
\begin{description}
35
\item [\textbf{int CPU26\_close(void);}]
36
\item [\textbf{Description:}] It close the CPU driver.
37
\item [\textbf{Return value:}] 0 if the operation is performed successfully; -1
38
if the keyboard in not installed.
39
\end{description}
40
 
41
\begin{intest}
42
CPU26\_INSTALLED\index{CPU26\_instaled()}
43
\end{intest}
44
 
45
\begin{description}
46
\item [\textbf{int CPU26\_installed(void);}]
47
\item [\textbf{Description:}] Return if the event debugger is actually installed.
48
\item [\textbf{Return value:}] 0 if the module is installed; 1 otherwise.
49
\end{description}
50
 
51
\begin{intest}
52
CPU26\_SHOWINFO\index{CPU26\_showinfo()}
53
\end{intest}
54
 
55
\begin{description}
56
\item [\textbf{void CPU26\_installed(void);}]
57
\item [\textbf{Description:}] Print the CPU informations retrived by the driver.
58
\end{description}
59
 
60
%----------------------------------------------------------------------------
61
\section{CPU scaling functions}
62
%----------------------------------------------------------------------------
63
 
64
These functions allow to get/set parameter about the CPU frequency and its
65
behavior. The low level must be initialized with the \texttt{CPU26\_init()}
66
function before using scaling funtionalities.
67
 
68
\vspace{7mm}
69
 
70
\begin{intest}
71
CPU26\_DVS\_INIT\index{CPU26\_DVS\_init()}
72
\end{intest}
73
 
74
\begin{description}
75
\item [\textbf{int CPU26\_DVS\_init(void);}]
76
\item [\textbf{Description:}] Initialize the driver and all internal structures. The
77
function returns the CPU identifyer if that present DVS capabilities, -1
78
otherwise.
79
\end{description}
80
 
81
\begin{intest}
82
CPU26\_DVS\_CLOSE\index{CPU26\_DVS\_close()}
83
\end{intest}
84
 
85
\begin{description}
86
\item [\textbf{int CPU26\_DVS\_close(void);}]
87
\item [\textbf{Description:}] It close the CPU driver.
88
\item [\textbf{Return value:}] 0 if the operation is performed successfully; -1
89
if the driver in not installed.
90
\end{description}
91
 
92
\begin{intest}
93
CPU26\_DVS\_INSTALLED\index{CPU26\_DVS\_instaled()}
94
\end{intest}
95
 
96
\begin{description}
97
\item [\textbf{int CPU26\_DVS\_installed(void);}]
98
\item [\textbf{Description:}] Return if the DVS driver is actually installed.
99
\item [\textbf{Return value:}] The function returns the CPU identifyer if that
100
present DVS capabilities, -1 otherwise.
101
\end{description}
102
 
103
\begin{intest}
104
CPU26\_GET\_LATENCY\index{CPU26\_get\_latency()}
105
\end{intest}
106
 
107
\begin{description}
108
\item [\textbf{int CPU26\_get\textbackslash{}\_latency(void);}]
109
\item [\textbf{Description:}] Return the value of the latency time needed to change
110
between two frequencies.
111
\end{description}
112
 
113
\begin{intest}
114
CPU26\_GET\_MIN\_FREQUENCY,\index{CPU26\_get\_min\_frequency()}
115
CPU26\_GET\_MAX\_FREQUENCY\index{CPU26\_get\_max\_frequency()}
116
\end{intest}
117
 
118
\begin{description}
119
\item [\textbf{int CPU26\_get\_min\_frequency(void);}]
120
\item [\textbf{int CPU26\_get\_max\_frequency(void);}]
121
\item [\textbf{Description:}] Are used to obtain minumum and maximum allowed frequencies.
122
\end{description}
123
 
124
\begin{intest}
125
CPU26\_GET\_CUR\_FREQUENCY\index{CPU26\_get\_cur\_frequency()}
126
\end{intest}
127
 
128
\begin{description}
129
\item [\textbf{int CPU26\_get\_cur\_frequency(void);}]
130
\item [\textbf{Description:}] Return the value of the actual frequency of the processor.
131
\end{description}
132
 
133
\begin{intest}
134
CPU26\_SET\_FREQUENCY\index{CPU26\_set\_frequency()}
135
\end{intest}
136
 
137
\begin{description}
138
\item [\textbf{int CPU26\_set\_frequency(int target, unsigned int relation);}]
139
\item [\textbf{Description:}] Return
140
\end{description}
141
 
142
\begin{intest}
143
CPU26\_GET\_FREQUENCIES\index{CPU26\_get\_frequencies()}
144
\end{intest}
145
 
146
\begin{description}
147
\item [\textbf{int CPU26\_set\_frequency(int {*}freqs);}]
148
\item [\textbf{Description:}] Return
149
\end{description}
150
 
151
\begin{intest}
152
CPU26\_SHOW\_FREQUENCIES\index{CPU26\_show\_frequencies()}
153
\end{intest}
154
 
155
\begin{description}
156
\item [\textbf{int CPU26\_show\_frequency(char {*}buff);}]
157
\item [\textbf{Description:}] Return
158
\end{description}