blob: 39886fd2ca51edf5dc9d600415d52297b6cbce70 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#ifndef HAVE_CPUTEMP2MAXFREQ_H
#define HAVE_CPUTEMP2MAXFREQ_H
// Valid frequencies are between 100MHz and 10GHz
#define VALID_FREQ_MIN 100000
#define VALID_FREQ_MAX 10000000
// Valid frequency steps are between 1MHz and 1GHz
#define VALID_STEP_MIN 1000
#define VALID_STEP_MAX 1000000
// Valid temperatures are between 10 and 150 degrees
#define VALID_TEMP_MIN 10000
#define VALID_TEMP_MAX 150000
// Valid intervals are between 1 and 30
#define VALID_INTERVAL_MIN 1
#define VALID_INTERVAL_MAX 30
struct s_cpudata {
long int min_freq; // CPU's minimum frequency
long int max_freq; // CPU's maximum frequency
long int cur_freq; // CPU's current frequency
long int cur_temp; // CPU's current temperature
long int scale_max; // Governor's maximum scaling frequency
};
struct s_config {
char governor[255]; // The governor to use
long int max_temp; // The target temperature
char temp_input[255]; // Input file to read the temperature
long int freq_step; // Step size to increase/decrease CPU frequency
long int fallback_freq; // CPU frquency to set if we fail to protect hardware
unsigned int interval; // Time interval to check CPU temperature
};
#endif
|