a heat sensor. Both the measured voltage of the input DC current and the measured
temperature of the power unit board are output via the USB cable. The USB human
interface device (HID) class driver of the RP-2 Linux obtains the voltage and tem-
perature data from the USB host device, and the power control manager daemon
requests and reads the data via the “/dev/hiddev0” driver interface.
The temperature control changes the power management policy to “powersave”
if the temperature goes above the user-specified upward threshold temperature.
Likewise, the temperature control changes the power management policy from
“powersave” to another mode if the temperature goes below the user-specified
downward threshold temperature. In the “powersave” policy, CPU#0 operates at
75 MHz, and the three other CPUs are turned off to reduce the amount of heat radi-
ating from the CPUs. Chattering, in which the power management policy frequently
goes into and comes out of the “powersave” mode, might occur if the temperature
fluctuates around a threshold. This is inefficient because turning a CPU off or on
takes much more time than changing a CPU's frequency. The temperature control
has two thresholds, upward and downward, as shown in Fig. 6.25 . If the downward
threshold is the same as the upward threshold, chattering might occur.
The battery life control changes the power management policy to “powersave” if
the battery life goes below the user-specified downward threshold. On the other
hand, the battery life control changes the policy from “powersave” to another mode
if the battery life goes above the user-specified upward threshold. In the “power-
save” policy, the power consumed by the CPUs is reduced in order to prolong the
battery life. The chattering may occur if the remaining battery life fluctuates around
the threshold. The battery life control has two thresholds, a downward one and an
upward one, as shown in Fig. 6.26 . If the upward and downward thresholds are the
same, chattering might occur.
Figure 6.27 shows a system diagram of the RP-2 application.
The application program uses the X-window system. To show the MPEG-2 image
on a window of the X-window system, the DU driver uses two planes of the XGA
size or 1,024 × 768. One plane is used to display the whole screen of the X-window
system. That plane is accessed via the “/dev/fb0” frame buffer device. The other
plane is used to display the MPEG-2 image on a window. That plane is accessed via
the “/dev/fb1” frame buffer device. The image on the screen is the graphical user