diff --git a/etc/sensors.conf.eg b/etc/sensors.conf.eg index ff5246eb..352317c4 100644 --- a/etc/sensors.conf.eg +++ b/etc/sensors.conf.eg @@ -2753,3 +2753,10 @@ chip "abituguru-*" label fan4 "AUX1 FAN Speed" label fan5 "AUX2 FAN Speed" ignore fan6 + +chip "k8temp-*" + + label temp1 "Core0 Temp" + label temp2 "Core0 Temp" + label temp3 "Core1 Temp" + label temp4 "Core1 Temp" diff --git a/lib/chips.c b/lib/chips.c index b40f03d3..4d5bd83e 100644 --- a/lib/chips.c +++ b/lib/chips.c @@ -5841,6 +5841,20 @@ static sensors_chip_feature abituguru_features[] = }; +static sensors_chip_feature k8temp_features[] = + { + { SENSORS_K8TEMP_TEMP1, "temp1", NOMAP, NOMAP, + R, NOSYSCTL, VALUE(1), 0 }, + { SENSORS_K8TEMP_TEMP2, "temp2", NOMAP, NOMAP, + R, NOSYSCTL, VALUE(1), 0 }, + { SENSORS_K8TEMP_TEMP3, "temp3", NOMAP, NOMAP, + R, NOSYSCTL, VALUE(1), 0 }, + { SENSORS_K8TEMP_TEMP4, "temp4", NOMAP, NOMAP, + R, NOSYSCTL, VALUE(1), 0 }, + { 0 } + }; + + sensors_chip_features sensors_chip_features_list[] = { { SENSORS_LM78_PREFIX, lm78_features }, @@ -5945,5 +5959,6 @@ sensors_chip_features sensors_chip_features_list[] = { SENSORS_SMSC47B397_PREFIX, smsc47b397_features }, { SENSORS_F71805F_PREFIX, f71805f_features }, { SENSORS_ABITUGURU_PREFIX, abituguru_features }, + { SENSORS_K8TEMP_PREFIX, k8temp_features }, { 0 } }; diff --git a/lib/chips.h b/lib/chips.h index ab33d3b5..5b3dd4de 100644 --- a/lib/chips.h +++ b/lib/chips.h @@ -2189,4 +2189,11 @@ #define SENSORS_ABITUGURU_FAN_ALARM(n) (0xA0 + (n)) /* R */ #define SENSORS_ABITUGURU_FAN_MIN(n) (0xB0 + (n)) /* RW */ +/* K8TEMP */ +#define SENSORS_K8TEMP_PREFIX "k8temp" +#define SENSORS_K8TEMP_TEMP1 0x01 /* R */ +#define SENSORS_K8TEMP_TEMP2 0x02 /* R */ +#define SENSORS_K8TEMP_TEMP3 0x03 /* R */ +#define SENSORS_K8TEMP_TEMP4 0x04 /* R */ + #endif /* def LIB_SENSORS_CHIPS_H */ diff --git a/prog/sensors/chips.c b/prog/sensors/chips.c index 5060f54a..7d01aeac 100644 --- a/prog/sensors/chips.c +++ b/prog/sensors/chips.c @@ -6132,6 +6132,26 @@ void print_abituguru(const sensors_chip_name *name) SENSORS_ABITUGURU_FAN_ALARM(i), SENSORS_ABITUGURU_FAN_MIN(i)); } +void print_k8temp(const sensors_chip_name *name) +{ + char *label; + double cur; + int valid, i; + + for (i = 0; i < 4; i++) { + if (!sensors_get_label_and_valid(*name, SENSORS_K8TEMP_TEMP1+i, &label, &valid) + && !sensors_get_feature(*name, SENSORS_K8TEMP_TEMP1+i, &cur)) { + if (valid) { + print_label(label, 10); + print_temp_info(cur, 0, 0, SINGLE, 0, 0); + printf("\n"); + } + } + free(label); + } +} + + void print_unknown_chip(const sensors_chip_name *name) { int a,b,valid; diff --git a/prog/sensors/chips.h b/prog/sensors/chips.h index 5aa7f0e6..6f915651 100644 --- a/prog/sensors/chips.h +++ b/prog/sensors/chips.h @@ -73,5 +73,6 @@ extern void print_adm1031(const sensors_chip_name *name); extern void print_smsc47b397(const sensors_chip_name *name); extern void print_f71805f(const sensors_chip_name *name); extern void print_abituguru(const sensors_chip_name *name); +extern void print_k8temp(const sensors_chip_name *name); #endif /* def PROG_SENSORS_CHIPS_H */ diff --git a/prog/sensors/main.c b/prog/sensors/main.c index d1e58aee..b5abf57e 100644 --- a/prog/sensors/main.c +++ b/prog/sensors/main.c @@ -420,6 +420,7 @@ struct match matches[] = { { "smsc47b397", print_smsc47b397 }, { "f71805f", print_f71805f }, { "abituguru", print_abituguru }, + { "k8temp", print_k8temp }, { NULL, NULL } };