diff --git a/etc/sensors.conf.eg b/etc/sensors.conf.eg index 6d839960..369a7d7d 100644 --- a/etc/sensors.conf.eg +++ b/etc/sensors.conf.eg @@ -252,7 +252,7 @@ chip "w83782d-*" "w83783s-*" # set sensor3 3435 -chip "gl518sm-r00-*" "gl518sm-r80-*" +chip "gl518sm-*" # Factors and labels taken from GL518SM datasheet, they seem to give # reasonable values with EISCA connected Fan78 diff --git a/kernel/chips/gl518sm.c b/kernel/chips/gl518sm.c index 55d698d0..15f3d3c5 100644 --- a/kernel/chips/gl518sm.c +++ b/kernel/chips/gl518sm.c @@ -329,10 +329,10 @@ static int gl518_detect(struct i2c_adapter *adapter, int address, int kind) } if (kind == gl518sm_r00) { - type_name = "gl518sm-r00"; + type_name = "gl518sm"; client_name = "GL518SM Revision 0x00 chip"; } else if (kind == gl518sm_r80) { - type_name = "gl518sm-r80"; + type_name = "gl518sm"; client_name = "GL518SM Revision 0x80 chip"; } else { #ifdef DEBUG diff --git a/lib/chips.c b/lib/chips.c index 2f13f9f9..57a45b00 100644 --- a/lib/chips.c +++ b/lib/chips.c @@ -384,143 +384,72 @@ static sensors_chip_feature max1617a_features[] = static sensors_chip_feature gl518r00_features[] = { - { SENSORS_GL518R00_VDD, "vdd", SENSORS_NO_MAPPING,SENSORS_NO_MAPPING, + { SENSORS_GL518_VDD, "vdd", SENSORS_NO_MAPPING,SENSORS_NO_MAPPING, SENSORS_MODE_R, GL518_SYSCTL_VDD, VALUE(3), 2 }, - { SENSORS_GL518R00_VIN1, "vin1", SENSORS_NO_MAPPING,SENSORS_NO_MAPPING, + { SENSORS_GL518_VIN1, "vin1", SENSORS_NO_MAPPING,SENSORS_NO_MAPPING, SENSORS_MODE_R, GL518_SYSCTL_VIN1, VALUE(3), 2 }, - { SENSORS_GL518R00_VIN2, "vin2", SENSORS_NO_MAPPING,SENSORS_NO_MAPPING, + { SENSORS_GL518_VIN2, "vin2", SENSORS_NO_MAPPING,SENSORS_NO_MAPPING, SENSORS_MODE_R, GL518_SYSCTL_VIN2, VALUE(3), 2 }, - { SENSORS_GL518R00_VIN3, "vin3", SENSORS_NO_MAPPING,SENSORS_NO_MAPPING, + { SENSORS_GL518_VIN3, "vin3", SENSORS_NO_MAPPING,SENSORS_NO_MAPPING, SENSORS_MODE_R, GL518_SYSCTL_VIN3, VALUE(3), 2 }, - { SENSORS_GL518R00_VDD_MIN, "vdd_min", SENSORS_GL518R00_VDD, - SENSORS_GL518R00_VDD, SENSORS_MODE_RW, + { SENSORS_GL518_VDD_MIN, "vdd_min", SENSORS_GL518_VDD, + SENSORS_GL518_VDD, SENSORS_MODE_RW, GL518_SYSCTL_VDD, VALUE(1), 2 }, - { SENSORS_GL518R00_VIN1_MIN, "vin1_min", SENSORS_GL518R00_VIN1, - SENSORS_GL518R00_VIN1, SENSORS_MODE_RW, + { SENSORS_GL518_VIN1_MIN, "vin1_min", SENSORS_GL518_VIN1, + SENSORS_GL518_VIN1, SENSORS_MODE_RW, GL518_SYSCTL_VIN1, VALUE(1), 2 }, - { SENSORS_GL518R00_VIN2_MIN, "vin2_min", SENSORS_GL518R00_VIN2, - SENSORS_GL518R00_VIN2, SENSORS_MODE_RW, + { SENSORS_GL518_VIN2_MIN, "vin2_min", SENSORS_GL518_VIN2, + SENSORS_GL518_VIN2, SENSORS_MODE_RW, GL518_SYSCTL_VIN2, VALUE(1), 2 }, - { SENSORS_GL518R00_VIN3_MIN, "vin3_min", SENSORS_GL518R00_VIN3, - SENSORS_GL518R00_VIN3, SENSORS_MODE_RW, + { SENSORS_GL518_VIN3_MIN, "vin3_min", SENSORS_GL518_VIN3, + SENSORS_GL518_VIN3, SENSORS_MODE_RW, GL518_SYSCTL_VIN3, VALUE(1), 2 }, - { SENSORS_GL518R00_VDD_MAX, "vdd_max", SENSORS_GL518R00_VDD, - SENSORS_GL518R00_VDD, SENSORS_MODE_RW, + { SENSORS_GL518_VDD_MAX, "vdd_max", SENSORS_GL518_VDD, + SENSORS_GL518_VDD, SENSORS_MODE_RW, GL518_SYSCTL_VDD, VALUE(2), 2 }, - { SENSORS_GL518R00_VIN1_MAX, "vin1_max", SENSORS_GL518R00_VIN1, - SENSORS_GL518R00_VIN1, SENSORS_MODE_RW, + { SENSORS_GL518_VIN1_MAX, "vin1_max", SENSORS_GL518_VIN1, + SENSORS_GL518_VIN1, SENSORS_MODE_RW, GL518_SYSCTL_VIN1, VALUE(2), 2 }, - { SENSORS_GL518R00_VIN2_MAX, "vin2_max", SENSORS_GL518R00_VIN2, - SENSORS_GL518R00_VIN2, SENSORS_MODE_RW, + { SENSORS_GL518_VIN2_MAX, "vin2_max", SENSORS_GL518_VIN2, + SENSORS_GL518_VIN2, SENSORS_MODE_RW, GL518_SYSCTL_VIN2, VALUE(2), 2 }, - { SENSORS_GL518R00_VIN3_MAX, "vin3_max", SENSORS_GL518R00_VIN3, - SENSORS_GL518R00_VIN3, SENSORS_MODE_RW, + { SENSORS_GL518_VIN3_MAX, "vin3_max", SENSORS_GL518_VIN3, + SENSORS_GL518_VIN3, SENSORS_MODE_RW, GL518_SYSCTL_VIN3, VALUE(2), 2 }, - { SENSORS_GL518R00_FAN1, "fan1", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, + { SENSORS_GL518_FAN1, "fan1", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, SENSORS_MODE_R, GL518_SYSCTL_FAN1, VALUE(2), 0 }, - { SENSORS_GL518R00_FAN2, "fan2", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, + { SENSORS_GL518_FAN2, "fan2", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, SENSORS_MODE_R, GL518_SYSCTL_FAN2, VALUE(2), 0 }, - { SENSORS_GL518R00_FAN1_MIN, "fan1_min", SENSORS_GL518R00_FAN1, - SENSORS_GL518R00_FAN1, SENSORS_MODE_RW, + { SENSORS_GL518_FAN1_MIN, "fan1_min", SENSORS_GL518_FAN1, + SENSORS_GL518_FAN1, SENSORS_MODE_RW, GL518_SYSCTL_FAN1, VALUE(1), 0 }, - { SENSORS_GL518R00_FAN2_MIN, "fan2_min", SENSORS_GL518R00_FAN2, - SENSORS_GL518R00_FAN2, SENSORS_MODE_RW, + { SENSORS_GL518_FAN2_MIN, "fan2_min", SENSORS_GL518_FAN2, + SENSORS_GL518_FAN2, SENSORS_MODE_RW, GL518_SYSCTL_FAN2, VALUE(1), 0 }, - { SENSORS_GL518R00_TEMP, "temp", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, + { SENSORS_GL518_TEMP, "temp", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, SENSORS_MODE_R, GL518_SYSCTL_TEMP, VALUE(3), 1 }, - { SENSORS_GL518R00_TEMP_HYST, "temp_hyst", SENSORS_GL518R00_TEMP, - SENSORS_GL518R00_TEMP, SENSORS_MODE_RW, + { SENSORS_GL518_TEMP_HYST, "temp_hyst", SENSORS_GL518_TEMP, + SENSORS_GL518_TEMP, SENSORS_MODE_RW, GL518_SYSCTL_TEMP, VALUE(2), 1 }, - { SENSORS_GL518R00_TEMP_OVER, "temp_over", SENSORS_GL518R00_TEMP, - SENSORS_GL518R00_TEMP, SENSORS_MODE_RW, + { SENSORS_GL518_TEMP_OVER, "temp_over", SENSORS_GL518_TEMP, + SENSORS_GL518_TEMP, SENSORS_MODE_RW, GL518_SYSCTL_TEMP, VALUE(1), 1 }, - { SENSORS_GL518R00_FAN1_DIV, "fan1_div", SENSORS_GL518R00_FAN1, + { SENSORS_GL518_FAN1_DIV, "fan1_div", SENSORS_GL518_FAN1, SENSORS_NO_MAPPING, SENSORS_MODE_RW, GL518_SYSCTL_FAN_DIV, VALUE(1), 0 }, - { SENSORS_GL518R00_FAN2_DIV, "fan2_div", SENSORS_GL518R00_FAN2, + { SENSORS_GL518_FAN2_DIV, "fan2_div", SENSORS_GL518_FAN2, SENSORS_NO_MAPPING, SENSORS_MODE_RW, GL518_SYSCTL_FAN_DIV, VALUE(2), 0 }, - { SENSORS_GL518R00_ALARMS, "alarms", SENSORS_NO_MAPPING, + { SENSORS_GL518_ALARMS, "alarms", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, SENSORS_MODE_R, GL518_SYSCTL_ALARMS, VALUE(1), 0 }, - { SENSORS_GL518R00_BEEP_ENABLE, "beep_enable", SENSORS_GL518R00_ALARMS, + { SENSORS_GL518_BEEP_ENABLE, "beep_enable", SENSORS_GL518_ALARMS, SENSORS_NO_MAPPING, SENSORS_MODE_RW, GL518_SYSCTL_BEEP, VALUE(1), 0 }, - { SENSORS_GL518R00_BEEPS, "beeps", SENSORS_GL518R00_ALARMS, - SENSORS_GL518R00_ALARMS, SENSORS_MODE_RW, - GL518_SYSCTL_BEEP, VALUE(2), 0 }, - { 0 } - }; - - -static sensors_chip_feature gl518r80_features[] = - { - { SENSORS_GL518R80_VDD, "vdd", SENSORS_NO_MAPPING,SENSORS_NO_MAPPING, - SENSORS_MODE_R, GL518_SYSCTL_VDD, VALUE(3), 2 }, - { SENSORS_GL518R80_VIN1, "vin1", SENSORS_NO_MAPPING,SENSORS_NO_MAPPING, - SENSORS_MODE_R, GL518_SYSCTL_VIN1, VALUE(3), 2 }, - { SENSORS_GL518R80_VIN2, "vin2", SENSORS_NO_MAPPING,SENSORS_NO_MAPPING, - SENSORS_MODE_R, GL518_SYSCTL_VIN2, VALUE(3), 2 }, - { SENSORS_GL518R80_VIN3, "vin3", SENSORS_NO_MAPPING,SENSORS_NO_MAPPING, - SENSORS_MODE_R, GL518_SYSCTL_VIN3, VALUE(3), 2 }, - { SENSORS_GL518R80_VDD_MIN, "vdd_min", SENSORS_GL518R80_VDD, - SENSORS_GL518R80_VDD, SENSORS_MODE_RW, - GL518_SYSCTL_VDD, VALUE(1), 2 }, - { SENSORS_GL518R80_VIN1_MIN, "vin1_min", SENSORS_GL518R80_VIN1, - SENSORS_GL518R80_VIN1, SENSORS_MODE_RW, - GL518_SYSCTL_VIN1, VALUE(1), 2 }, - { SENSORS_GL518R80_VIN2_MIN, "vin2_min", SENSORS_GL518R80_VIN2, - SENSORS_GL518R80_VIN2, SENSORS_MODE_RW, - GL518_SYSCTL_VIN2, VALUE(1), 2 }, - { SENSORS_GL518R80_VIN3_MIN, "vin3_min", SENSORS_GL518R80_VIN3, - SENSORS_GL518R80_VIN3, SENSORS_MODE_RW, - GL518_SYSCTL_VIN3, VALUE(1), 2 }, - { SENSORS_GL518R80_VDD_MAX, "vdd_max", SENSORS_GL518R80_VDD, - SENSORS_GL518R80_VDD, SENSORS_MODE_RW, - GL518_SYSCTL_VDD, VALUE(2), 2 }, - { SENSORS_GL518R80_VIN1_MAX, "vin1_max", SENSORS_GL518R80_VIN1, - SENSORS_GL518R80_VIN1, SENSORS_MODE_RW, - GL518_SYSCTL_VIN1, VALUE(2), 2 }, - { SENSORS_GL518R80_VIN2_MAX, "vin2_max", SENSORS_GL518R80_VIN2, - SENSORS_GL518R80_VIN2, SENSORS_MODE_RW, - GL518_SYSCTL_VIN2, VALUE(2), 2 }, - { SENSORS_GL518R80_VIN3_MAX, "vin3_max", SENSORS_GL518R80_VIN3, - SENSORS_GL518R80_VIN3, SENSORS_MODE_RW, - GL518_SYSCTL_VIN3, VALUE(2), 2 }, - { SENSORS_GL518R80_FAN1, "fan1", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, - SENSORS_MODE_R, GL518_SYSCTL_FAN1, VALUE(2), 0 }, - { SENSORS_GL518R80_FAN2, "fan2", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, - SENSORS_MODE_R, GL518_SYSCTL_FAN2, VALUE(2), 0 }, - { SENSORS_GL518R80_FAN1_MIN, "fan1_min", SENSORS_GL518R80_FAN1, - SENSORS_GL518R80_FAN1, SENSORS_MODE_RW, - GL518_SYSCTL_FAN1, VALUE(1), 0 }, - { SENSORS_GL518R80_FAN2_MIN, "fan2_min", SENSORS_GL518R80_FAN2, - SENSORS_GL518R80_FAN2, SENSORS_MODE_RW, - GL518_SYSCTL_FAN2, VALUE(1), 0 }, - { SENSORS_GL518R80_TEMP, "temp", SENSORS_NO_MAPPING, SENSORS_NO_MAPPING, - SENSORS_MODE_R, GL518_SYSCTL_TEMP, VALUE(3), 1 }, - { SENSORS_GL518R80_TEMP_HYST, "temp_hyst", SENSORS_GL518R80_TEMP, - SENSORS_GL518R80_TEMP, SENSORS_MODE_RW, - GL518_SYSCTL_TEMP, VALUE(2), 1 }, - { SENSORS_GL518R80_TEMP_OVER, "temp_over", SENSORS_GL518R80_TEMP, - SENSORS_GL518R80_TEMP, SENSORS_MODE_RW, - GL518_SYSCTL_TEMP, VALUE(1), 1 }, - { SENSORS_GL518R80_FAN1_DIV, "fan1_div", SENSORS_GL518R80_FAN1, - SENSORS_NO_MAPPING, SENSORS_MODE_RW, - GL518_SYSCTL_FAN_DIV, VALUE(1), 0 }, - { SENSORS_GL518R80_FAN2_DIV, "fan2_div", SENSORS_GL518R80_FAN2, - SENSORS_NO_MAPPING, SENSORS_MODE_RW, - GL518_SYSCTL_FAN_DIV, VALUE(2), 0 }, - { SENSORS_GL518R80_ALARMS, "alarms", SENSORS_NO_MAPPING, - SENSORS_NO_MAPPING, SENSORS_MODE_R, - GL518_SYSCTL_ALARMS, VALUE(1), 0 }, - { SENSORS_GL518R80_BEEP_ENABLE, "beep_enable", SENSORS_GL518R80_ALARMS, - SENSORS_NO_MAPPING, SENSORS_MODE_RW, - GL518_SYSCTL_BEEP, VALUE(1), 0 }, - { SENSORS_GL518R80_BEEPS, "beeps", SENSORS_GL518R80_ALARMS, - SENSORS_GL518R80_ALARMS, SENSORS_MODE_RW, + { SENSORS_GL518_BEEPS, "beeps", SENSORS_GL518_ALARMS, + SENSORS_GL518_ALARMS, SENSORS_MODE_RW, GL518_SYSCTL_BEEP, VALUE(2), 0 }, { 0 } }; @@ -1494,8 +1423,7 @@ sensors_chip_features sensors_chip_features_list[] = { SENSORS_LM78J_PREFIX, lm78j_features }, { SENSORS_LM79_PREFIX, lm79_features }, { SENSORS_LM75_PREFIX, lm75_features }, - { SENSORS_GL518R00_PREFIX, gl518r00_features }, - { SENSORS_GL518R80_PREFIX, gl518r80_features }, + { SENSORS_GL518_PREFIX, gl518r00_features }, { SENSORS_LM80_PREFIX, lm80_features }, { SENSORS_W83781D_PREFIX, w83781d_features }, { SENSORS_W83782D_PREFIX, w83782d_features }, diff --git a/lib/chips.h b/lib/chips.h index 5bc0241e..0e02b639 100644 --- a/lib/chips.h +++ b/lib/chips.h @@ -203,67 +203,34 @@ #define SENSORS_MAX1617A_REMOTE_TEMP_OVER 56 /* RW */ #define SENSORS_MAX1617A_ALARMS 81 /* R */ -/* GL518SM revision 0x00 chips. You may also use the revision 0x80 defines, - but note that some features are unaccessible in revision 0x00. */ +/* GL518SM chips */ -#define SENSORS_GL518R00_PREFIX "gl518sm-r00" - -/* Note that other voltages can not be read! */ -#define SENSORS_GL518R00_VDD 1 /* No access! */ -#define SENSORS_GL518R00_VIN1 2 /* No access! */ -#define SENSORS_GL518R00_VIN2 3 /* No access! */ -#define SENSORS_GL518R00_VIN3 4 /* R */ -#define SENSORS_GL518R00_VDD_MIN 11 /* RW */ -#define SENSORS_GL518R00_VIN1_MIN 12 /* RW */ -#define SENSORS_GL518R00_VIN2_MIN 13 /* RW */ -#define SENSORS_GL518R00_VIN3_MIN 14 /* RW */ -#define SENSORS_GL518R00_VDD_MAX 21 /* RW */ -#define SENSORS_GL518R00_VIN1_MAX 22 /* RW */ -#define SENSORS_GL518R00_VIN2_MAX 23 /* RW */ -#define SENSORS_GL518R00_VIN3_MAX 24 /* RW */ -#define SENSORS_GL518R00_FAN1 31 /* R */ -#define SENSORS_GL518R00_FAN2 32 /* R */ -#define SENSORS_GL518R00_FAN1_MIN 41 /* RW */ -#define SENSORS_GL518R00_FAN2_MIN 42 /* RW */ -#define SENSORS_GL518R00_TEMP 51 /* R */ -#define SENSORS_GL518R00_TEMP_HYST 52 /* RW */ -#define SENSORS_GL518R00_TEMP_OVER 53 /* RW */ -#define SENSORS_GL518R00_FAN1_DIV 71 /* RW */ -#define SENSORS_GL518R00_FAN2_DIV 72 /* RW */ -#define SENSORS_GL518R00_ALARMS 81 /* R */ -#define SENSORS_GL518R00_BEEP_ENABLE 82 /* RW */ -#define SENSORS_GL518R00_BEEPS 83 /* RW */ - - -/* GL518SM revision 0x80 chips. */ - -#define SENSORS_GL518R80_PREFIX "gl518sm-r80" - -#define SENSORS_GL518R80_VDD 1 /* R */ -#define SENSORS_GL518R80_VIN1 2 /* R */ -#define SENSORS_GL518R80_VIN2 3 /* R */ -#define SENSORS_GL518R80_VIN3 4 /* R */ -#define SENSORS_GL518R80_VDD_MIN 11 /* RW */ -#define SENSORS_GL518R80_VIN1_MIN 12 /* RW */ -#define SENSORS_GL518R80_VIN2_MIN 13 /* RW */ -#define SENSORS_GL518R80_VIN3_MIN 14 /* RW */ -#define SENSORS_GL518R80_VDD_MAX 21 /* RW */ -#define SENSORS_GL518R80_VIN1_MAX 22 /* RW */ -#define SENSORS_GL518R80_VIN2_MAX 23 /* RW */ -#define SENSORS_GL518R80_VIN3_MAX 24 /* RW */ -#define SENSORS_GL518R80_FAN1 31 /* R */ -#define SENSORS_GL518R80_FAN2 32 /* R */ -#define SENSORS_GL518R80_FAN1_MIN 41 /* RW */ -#define SENSORS_GL518R80_FAN2_MIN 42 /* RW */ -#define SENSORS_GL518R80_TEMP 51 /* R */ -#define SENSORS_GL518R80_TEMP_HYST 52 /* RW */ -#define SENSORS_GL518R80_TEMP_OVER 53 /* RW */ -#define SENSORS_GL518R80_FAN1_DIV 71 /* RW */ -#define SENSORS_GL518R80_FAN2_DIV 72 /* RW */ -#define SENSORS_GL518R80_ALARMS 81 /* R */ -#define SENSORS_GL518R80_BEEP_ENABLE 82 /* RW */ -#define SENSORS_GL518R80_BEEPS 83 /* RW */ +#define SENSORS_GL518_PREFIX "gl518sm" +#define SENSORS_GL518_VDD 1 /* R */ +#define SENSORS_GL518_VIN1 2 /* R */ +#define SENSORS_GL518_VIN2 3 /* R */ +#define SENSORS_GL518_VIN3 4 /* R */ +#define SENSORS_GL518_VDD_MIN 11 /* RW */ +#define SENSORS_GL518_VIN1_MIN 12 /* RW */ +#define SENSORS_GL518_VIN2_MIN 13 /* RW */ +#define SENSORS_GL518_VIN3_MIN 14 /* RW */ +#define SENSORS_GL518_VDD_MAX 21 /* RW */ +#define SENSORS_GL518_VIN1_MAX 22 /* RW */ +#define SENSORS_GL518_VIN2_MAX 23 /* RW */ +#define SENSORS_GL518_VIN3_MAX 24 /* RW */ +#define SENSORS_GL518_FAN1 31 /* R */ +#define SENSORS_GL518_FAN2 32 /* R */ +#define SENSORS_GL518_FAN1_MIN 41 /* RW */ +#define SENSORS_GL518_FAN2_MIN 42 /* RW */ +#define SENSORS_GL518_TEMP 51 /* R */ +#define SENSORS_GL518_TEMP_HYST 52 /* RW */ +#define SENSORS_GL518_TEMP_OVER 53 /* RW */ +#define SENSORS_GL518_FAN1_DIV 71 /* RW */ +#define SENSORS_GL518_FAN2_DIV 72 /* RW */ +#define SENSORS_GL518_ALARMS 81 /* R */ +#define SENSORS_GL518_BEEP_ENABLE 82 /* RW */ +#define SENSORS_GL518_BEEPS 83 /* RW */ /* LM80 chips */ diff --git a/prog/sensors/chips.c b/prog/sensors/chips.c index d424f7ea..79708a1f 100644 --- a/prog/sensors/chips.c +++ b/prog/sensors/chips.c @@ -512,13 +512,13 @@ void print_gl518(const sensors_chip_name *name) int is_r00; is_r00 = !strcmp(name->prefix,"gl518sm-r00"); - if (!sensors_get_feature(*name,SENSORS_GL518R00_ALARMS,&cur)) + if (!sensors_get_feature(*name,SENSORS_GL518_ALARMS,&cur)) alarms = cur + 0.5; else { printf("ERROR: Can't get alarm data!\n"); alarms = 0; } - if (!sensors_get_feature(*name,SENSORS_GL518R00_BEEPS,&cur)) + if (!sensors_get_feature(*name,SENSORS_GL518_BEEPS,&cur)) beeps = cur + 0.5; else { printf("ERROR: Can't get beep data!\n"); @@ -528,10 +528,10 @@ void print_gl518(const sensors_chip_name *name) /* We need special treatment for the R00 chips, because they can't display actual readings! We hardcode this, as this is the easiest way. */ if (is_r00) { - if (!sensors_get_label(*name,SENSORS_GL518R00_VDD,&label) && - !sensors_get_feature(*name,SENSORS_GL518R00_VDD,&cur) && - !sensors_get_feature(*name,SENSORS_GL518R00_VDD_MIN,&min) && - !sensors_get_feature(*name,SENSORS_GL518R00_VDD_MAX,&max)) { + if (!sensors_get_label(*name,SENSORS_GL518_VDD,&label) && + !sensors_get_feature(*name,SENSORS_GL518_VDD,&cur) && + !sensors_get_feature(*name,SENSORS_GL518_VDD_MIN,&min) && + !sensors_get_feature(*name,SENSORS_GL518_VDD_MAX,&max)) { print_label(label,10); if (cur == 0.0) printf("(n/a) "); @@ -544,10 +544,10 @@ void print_gl518(const sensors_chip_name *name) printf("ERROR: Can't get VDD data!\n"); free_the_label(&label); - if (!sensors_get_label(*name,SENSORS_GL518R00_VIN1,&label) && - !sensors_get_feature(*name,SENSORS_GL518R00_VIN1,&cur) && - !sensors_get_feature(*name,SENSORS_GL518R00_VIN1_MIN,&min) && - !sensors_get_feature(*name,SENSORS_GL518R00_VIN1_MAX,&max)) { + if (!sensors_get_label(*name,SENSORS_GL518_VIN1,&label) && + !sensors_get_feature(*name,SENSORS_GL518_VIN1,&cur) && + !sensors_get_feature(*name,SENSORS_GL518_VIN1_MIN,&min) && + !sensors_get_feature(*name,SENSORS_GL518_VIN1_MAX,&max)) { print_label(label,10); if (cur == 0.0) printf("(n/a) "); @@ -559,10 +559,10 @@ void print_gl518(const sensors_chip_name *name) } else printf("ERROR: Can't get VIN1 data!\n"); free_the_label(&label); - if (!sensors_get_label(*name,SENSORS_GL518R00_VIN2,&label) && - !sensors_get_feature(*name,SENSORS_GL518R00_VIN2,&cur) && - !sensors_get_feature(*name,SENSORS_GL518R00_VIN2_MIN,&min) && - !sensors_get_feature(*name,SENSORS_GL518R00_VIN2_MAX,&max)) { + if (!sensors_get_label(*name,SENSORS_GL518_VIN2,&label) && + !sensors_get_feature(*name,SENSORS_GL518_VIN2,&cur) && + !sensors_get_feature(*name,SENSORS_GL518_VIN2_MIN,&min) && + !sensors_get_feature(*name,SENSORS_GL518_VIN2_MAX,&max)) { print_label(label,10); if (cur == 0.0) printf("(n/a) "); @@ -575,10 +575,10 @@ void print_gl518(const sensors_chip_name *name) printf("ERROR: Can't get IN2 data!\n"); free_the_label(&label); } else { - if (!sensors_get_label(*name,SENSORS_GL518R00_VDD,&label) && - !sensors_get_feature(*name,SENSORS_GL518R00_VDD,&cur) && - !sensors_get_feature(*name,SENSORS_GL518R00_VDD_MIN,&min) && - !sensors_get_feature(*name,SENSORS_GL518R00_VDD_MAX,&max)) { + if (!sensors_get_label(*name,SENSORS_GL518_VDD,&label) && + !sensors_get_feature(*name,SENSORS_GL518_VDD,&cur) && + !sensors_get_feature(*name,SENSORS_GL518_VDD_MIN,&min) && + !sensors_get_feature(*name,SENSORS_GL518_VDD_MAX,&max)) { print_label(label,10); printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s %s\n", cur,min,max,alarms&GL518_ALARM_VDD?"ALARM":" ", @@ -586,10 +586,10 @@ void print_gl518(const sensors_chip_name *name) } else printf("ERROR: Can't get VDD data!\n"); free_the_label(&label); - if (!sensors_get_label(*name,SENSORS_GL518R00_VIN1,&label) && - !sensors_get_feature(*name,SENSORS_GL518R00_VIN1,&cur) && - !sensors_get_feature(*name,SENSORS_GL518R00_VIN1_MIN,&min) && - !sensors_get_feature(*name,SENSORS_GL518R00_VIN1_MAX,&max)) { + if (!sensors_get_label(*name,SENSORS_GL518_VIN1,&label) && + !sensors_get_feature(*name,SENSORS_GL518_VIN1,&cur) && + !sensors_get_feature(*name,SENSORS_GL518_VIN1_MIN,&min) && + !sensors_get_feature(*name,SENSORS_GL518_VIN1_MAX,&max)) { print_label(label,10); printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s %s\n", cur,min,max,alarms&GL518_ALARM_VIN1?"ALARM":" ", @@ -597,10 +597,10 @@ void print_gl518(const sensors_chip_name *name) } else printf("ERROR: Can't get VIN1 data!\n"); free_the_label(&label); - if (!sensors_get_label(*name,SENSORS_GL518R00_VIN2,&label) && - !sensors_get_feature(*name,SENSORS_GL518R00_VIN2,&cur) && - !sensors_get_feature(*name,SENSORS_GL518R00_VIN2_MIN,&min) && - !sensors_get_feature(*name,SENSORS_GL518R00_VIN2_MAX,&max)) { + if (!sensors_get_label(*name,SENSORS_GL518_VIN2,&label) && + !sensors_get_feature(*name,SENSORS_GL518_VIN2,&cur) && + !sensors_get_feature(*name,SENSORS_GL518_VIN2_MIN,&min) && + !sensors_get_feature(*name,SENSORS_GL518_VIN2_MAX,&max)) { print_label(label,10); printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s %s\n", cur,min,max,alarms&GL518_ALARM_VIN2?"ALARM":" ", @@ -610,10 +610,10 @@ void print_gl518(const sensors_chip_name *name) free_the_label(&label); } - if (!sensors_get_label(*name,SENSORS_GL518R00_VIN3,&label) && - !sensors_get_feature(*name,SENSORS_GL518R00_VIN3,&cur) && - !sensors_get_feature(*name,SENSORS_GL518R00_VIN3_MIN,&min) && - !sensors_get_feature(*name,SENSORS_GL518R00_VIN3_MAX,&max)) { + if (!sensors_get_label(*name,SENSORS_GL518_VIN3,&label) && + !sensors_get_feature(*name,SENSORS_GL518_VIN3,&cur) && + !sensors_get_feature(*name,SENSORS_GL518_VIN3_MIN,&min) && + !sensors_get_feature(*name,SENSORS_GL518_VIN3_MAX,&max)) { print_label(label,10); printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s %s\n", cur,min,max,alarms&GL518_ALARM_VIN3?"ALARM":" ", @@ -623,10 +623,10 @@ void print_gl518(const sensors_chip_name *name) printf("ERROR: Can't get VIN3 data!\n"); free_the_label(&label); - if (!sensors_get_label(*name,SENSORS_GL518R00_FAN1,&label) && - !sensors_get_feature(*name,SENSORS_GL518R00_FAN1,&cur) && - !sensors_get_feature(*name,SENSORS_GL518R00_FAN1_DIV,&fdiv) && - !sensors_get_feature(*name,SENSORS_GL518R00_FAN1_MIN,&min)) { + if (!sensors_get_label(*name,SENSORS_GL518_FAN1,&label) && + !sensors_get_feature(*name,SENSORS_GL518_FAN1,&cur) && + !sensors_get_feature(*name,SENSORS_GL518_FAN1_DIV,&fdiv) && + !sensors_get_feature(*name,SENSORS_GL518_FAN1_MIN,&min)) { print_label(label,10); printf("%4.0f RPM (min = %4.0f RPM, div = %1.0f) %s %s\n", cur,min,fdiv, alarms&GL518_ALARM_FAN1?"ALARM":" ", @@ -634,10 +634,10 @@ void print_gl518(const sensors_chip_name *name) } else printf("ERROR: Can't get FAN1 data!\n"); free_the_label(&label); - if (!sensors_get_label(*name,SENSORS_GL518R00_FAN2,&label) && - !sensors_get_feature(*name,SENSORS_GL518R00_FAN2,&cur) && - !sensors_get_feature(*name,SENSORS_GL518R00_FAN2_DIV,&fdiv) && - !sensors_get_feature(*name,SENSORS_GL518R00_FAN2_MIN,&min)) { + if (!sensors_get_label(*name,SENSORS_GL518_FAN2,&label) && + !sensors_get_feature(*name,SENSORS_GL518_FAN2,&cur) && + !sensors_get_feature(*name,SENSORS_GL518_FAN2_DIV,&fdiv) && + !sensors_get_feature(*name,SENSORS_GL518_FAN2_MIN,&min)) { print_label(label,10); printf("%4.0f RPM (min = %4.0f RPM, div = %1.0f) %s %s\n", cur,min,fdiv, alarms&GL518_ALARM_FAN2?"ALARM":" ", @@ -646,10 +646,10 @@ void print_gl518(const sensors_chip_name *name) printf("ERROR: Can't get FAN2 data!\n"); free_the_label(&label); - if (!sensors_get_label(*name,SENSORS_GL518R00_TEMP,&label) && - !sensors_get_feature(*name,SENSORS_GL518R00_TEMP,&cur) && - !sensors_get_feature(*name,SENSORS_GL518R00_TEMP_OVER,&max) && - !sensors_get_feature(*name,SENSORS_GL518R00_TEMP_HYST,&min)) { + if (!sensors_get_label(*name,SENSORS_GL518_TEMP,&label) && + !sensors_get_feature(*name,SENSORS_GL518_TEMP,&cur) && + !sensors_get_feature(*name,SENSORS_GL518_TEMP_OVER,&max) && + !sensors_get_feature(*name,SENSORS_GL518_TEMP_HYST,&min)) { print_label(label,10); printf("%+3.0f C (limit = %+3.0f C, hysteresis = %+3.0f C) %s %s\n", cur,max,min, alarms&GL518_ALARM_TEMP?"ALARM":" ", @@ -658,8 +658,8 @@ void print_gl518(const sensors_chip_name *name) printf("ERROR: Can't get TEMP data!\n"); free_the_label(&label); - if (!sensors_get_label(*name,SENSORS_GL518R00_BEEP_ENABLE,&label) && - !sensors_get_feature(*name,SENSORS_GL518R00_BEEP_ENABLE,&cur)) { + if (!sensors_get_label(*name,SENSORS_GL518_BEEP_ENABLE,&label) && + !sensors_get_feature(*name,SENSORS_GL518_BEEP_ENABLE,&cur)) { print_label(label,10); if (cur < 0.5) printf("Sound alarm disabled\n"); diff --git a/prog/sensors/main.c b/prog/sensors/main.c index 47d1c07b..9a01b76a 100644 --- a/prog/sensors/main.c +++ b/prog/sensors/main.c @@ -261,8 +261,7 @@ void do_a_print(sensors_chip_name name) print_sis5595(&name); else if (!strcmp(name.prefix,"lm80")) print_lm80(&name); - else if (!strcmp(name.prefix,"gl518sm-r00") || - !strcmp(name.prefix,"gl518sm-r80")) + else if (!strcmp(name.prefix,"gl518sm")) print_gl518(&name); else if ((!strcmp(name.prefix,"w83781d")) || (!strcmp(name.prefix,"w83782d")) ||