mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-14 19:03:13 +00:00
Merge branch 'thomab/freq' of ~/gitea/data/gitea-repositories/hramrach/lm-sensors
This commit is contained in:
commit
c91425c121
3 files changed
+40
No files matched your search
@@ -150,6 +150,7 @@ typedef enum sensors_feature_type {
|
||||
SENSORS_FEATURE_INTRUSION = 0x11,
|
||||
SENSORS_FEATURE_MAX_OTHER,
|
||||
SENSORS_FEATURE_BEEP_ENABLE = 0x18,
|
||||
SENSORS_FEATURE_FREQ,
|
||||
SENSORS_FEATURE_MAX,
|
||||
SENSORS_FEATURE_UNKNOWN = INT_MAX,
|
||||
} sensors_feature_type;
|
||||
@@ -264,6 +265,7 @@ typedef enum sensors_subfeature_type {
|
||||
|
||||
SENSORS_SUBFEATURE_BEEP_ENABLE = SENSORS_FEATURE_BEEP_ENABLE << 8,
|
||||
|
||||
SENSORS_SUBFEATURE_FREQ_INPUT = SENSORS_FEATURE_FREQ << 8,
|
||||
SENSORS_SUBFEATURE_UNKNOWN = INT_MAX,
|
||||
} sensors_subfeature_type;
|
||||
|
||||
|
||||
@@ -153,6 +153,7 @@ int get_type_scaling(sensors_subfeature_type type)
|
||||
return 1;
|
||||
case SENSORS_SUBFEATURE_POWER_AVERAGE:
|
||||
case SENSORS_SUBFEATURE_ENERGY_INPUT:
|
||||
case SENSORS_SUBFEATURE_FREQ_INPUT:
|
||||
return 1000000;
|
||||
}
|
||||
|
||||
@@ -182,6 +183,7 @@ char *get_feature_name(sensors_feature_type ftype, char *sfname)
|
||||
case SENSORS_FEATURE_CURR:
|
||||
case SENSORS_FEATURE_HUMIDITY:
|
||||
case SENSORS_FEATURE_INTRUSION:
|
||||
case SENSORS_FEATURE_FREQ:
|
||||
underscore = strchr(sfname, '_');
|
||||
name = strndup(sfname, underscore - sfname);
|
||||
if (!name)
|
||||
@@ -350,6 +352,11 @@ static const struct subfeature_type_match intrusion_matches[] = {
|
||||
{ "beep", SENSORS_SUBFEATURE_INTRUSION_BEEP },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
static const struct subfeature_type_match freq_matches[] = {
|
||||
{ "input", SENSORS_SUBFEATURE_FREQ_INPUT },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
static struct feature_type_match matches[] = {
|
||||
{ "temp%d%c", temp_matches },
|
||||
{ "in%d%c", in_matches },
|
||||
@@ -360,6 +367,7 @@ static struct feature_type_match matches[] = {
|
||||
{ "energy%d%c", energy_matches },
|
||||
{ "intrusion%d%c", intrusion_matches },
|
||||
{ "humidity%d%c", humidity_matches },
|
||||
{ "freq%d%c", freq_matches },
|
||||
{ "pwm%d%c", pwm_matches },
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user