Subversion Repositories shark

Rev

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

%----------------------------------------------------------------------------
\chapter{The CPU frequency scaling library}
%----------------------------------------------------------------------------

This driver allow the application to change the CPU speed in order to reduce
power consumption. After the driver initialization is possible to know the list
of supported frequencies, the minimin and maximun allowed frequncy. Is possible
to get and set the current frequecy and obtaind the deoretical value of the
transition duration.

%----------------------------------------------------------------------------
\section{CPU Information utility}
%----------------------------------------------------------------------------

These functions allow the application to know informations about the CPU like
manufacturer, model, capabilities, etc.

\vspace{7mm}

\begin{intest}
CPU26\_INIT\index{CPU26\_init()}
\end{intest}

\begin{description}
\item [\textbf{int CPU26\_init(void);}]
\item [\textbf{Description:}] Initialize the driver and all internal structures. The
function returns 0 if the procedure was succesfully, -1 otherwise.
\end{description}

\begin{intest}
CPU26\_CLOSE\index{CPU26\_close()}
\end{intest}

\begin{description}
\item [\textbf{int CPU26\_close(void);}]
\item [\textbf{Description:}] It close the CPU driver.
\item [\textbf{Return value:}] 0 if the operation is performed successfully; -1
if the keyboard in not installed.
\end{description}

\begin{intest}
CPU26\_INSTALLED\index{CPU26\_instaled()}
\end{intest}

\begin{description}
\item [\textbf{int CPU26\_installed(void);}]
\item [\textbf{Description:}] Return if the event debugger is actually installed.
\item [\textbf{Return value:}] 0 if the module is installed; 1 otherwise.
\end{description}

\begin{intest}
CPU26\_SHOWINFO\index{CPU26\_showinfo()}
\end{intest}

\begin{description}
\item [\textbf{void CPU26\_installed(void);}]
\item [\textbf{Description:}] Print the CPU informations retrived by the driver.
\end{description
}

%----------------------------------------------------------------------------
\section{CPU scaling functions}
%----------------------------------------------------------------------------

These functions allow to get/set parameter about the CPU frequency and its
behavior. The low level must be initialized with the \texttt{CPU26\_init()}
function before using scaling funtionalities.

\vspace{7mm}

\begin{intest}
CPU26\_DVS\_INIT\index{CPU26\_DVS\_init()}
\end{intest}

\begin{description}
\item [\textbf{int CPU26\_DVS\_init(void);}]
\item [\textbf{Description:}] Initialize the driver and all internal structures. The
function returns the CPU identifyer if that present DVS capabilities, -1
otherwise.
\end{description}

\begin{intest}
CPU26\_DVS\_CLOSE\index{CPU26\_DVS\_close()}
\end{intest}

\begin{description}
\item [\textbf{int CPU26\_DVS\_close(void);}]
\item [\textbf{Description:}] It close the CPU driver.
\item [\textbf{Return value:}] 0 if the operation is performed successfully; -1
if the driver in not installed.
\end{description}

\begin{intest}
CPU26\_DVS\_INSTALLED\index{CPU26\_DVS\_instaled()}
\end{intest}

\begin{description}
\item [\textbf{int CPU26\_DVS\_installed(void);}]
\item [\textbf{Description:}] Return if the DVS driver is actually installed.
\item [\textbf{Return value:}] The function returns the CPU identifyer if that
present DVS capabilities, -1 otherwise.
\end{description}

\begin{intest}
CPU26\_GET\_LATENCY\index{CPU26\_get\_latency()}
\end{intest}

\begin{description}
\item [\textbf{int CPU26\_get\textbackslash{}\_latency(void);}]
\item [\textbf{Description:}] Return the value of the latency time needed to change
between two frequencies.
\end{description}

\begin{intest}
CPU26\_GET\_MIN\_FREQUENCY,\index{CPU26\_get\_min\_frequency()}
CPU26\_GET\_MAX\_FREQUENCY\index{CPU26\_get\_max\_frequency()}
\end{intest}

\begin{description}
\item [\textbf{int CPU26\_get\_min\_frequency(void);}]
\item [\textbf{int CPU26\_get\_max\_frequency(void);}]
\item [\textbf{Description:}] Are used to obtain minumum and maximum allowed frequencies.
\end{description}

\begin{intest}
CPU26\_GET\_CUR\_FREQUENCY\index{CPU26\_get\_cur\_frequency()}
\end{intest}

\begin{description}
\item [\textbf{int CPU26\_get\_cur\_frequency(void);}]
\item [\textbf{Description:}] Return the value of the actual frequency of the processor.
\end{description}

\begin{intest}
CPU26\_SET\_FREQUENCY\index{CPU26\_set\_frequency()}
\end{intest}

\begin{description}
\item [\textbf{int CPU26\_set\_frequency(int target, unsigned int relation);}]
\item [\textbf{Description:}] Return
\end{description}

\begin{intest}
CPU26\_GET\_FREQUENCIES\index{CPU26\_get\_frequencies()}
\end{intest}

\begin{description}
\item [\textbf{int CPU26\_set\_frequency(int {*}freqs);}]
\item [\textbf{Description:}] Return
\end{description}

\begin{intest}
CPU26\_SHOW\_FREQUENCIES\index{CPU26\_show\_frequencies()}
\end{intest}

\begin{description}
\item [\textbf{int CPU26\_show\_frequency(char {*}buff);}]
\item [\textbf{Description:}] Return
\end{description
}