2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-31 14:25:39 +00:00

(Kyösti)

* removed separation of GL518SM to revision 0x00 and 0x80


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@502 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Kyosti Malkki
1999-07-21 10:14:59 +00:00
parent bddf810ebe
commit 6126040a88
6 changed files with 112 additions and 218 deletions

View File

@@ -252,7 +252,7 @@ chip "w83782d-*" "w83783s-*"
# set sensor3 3435 # set sensor3 3435
chip "gl518sm-r00-*" "gl518sm-r80-*" chip "gl518sm-*"
# Factors and labels taken from GL518SM datasheet, they seem to give # Factors and labels taken from GL518SM datasheet, they seem to give
# reasonable values with EISCA connected Fan78 # reasonable values with EISCA connected Fan78

View File

@@ -329,10 +329,10 @@ static int gl518_detect(struct i2c_adapter *adapter, int address, int kind)
} }
if (kind == gl518sm_r00) { if (kind == gl518sm_r00) {
type_name = "gl518sm-r00"; type_name = "gl518sm";
client_name = "GL518SM Revision 0x00 chip"; client_name = "GL518SM Revision 0x00 chip";
} else if (kind == gl518sm_r80) { } else if (kind == gl518sm_r80) {
type_name = "gl518sm-r80"; type_name = "gl518sm";
client_name = "GL518SM Revision 0x80 chip"; client_name = "GL518SM Revision 0x80 chip";
} else { } else {
#ifdef DEBUG #ifdef DEBUG

View File

@@ -384,143 +384,72 @@ static sensors_chip_feature max1617a_features[] =
static sensors_chip_feature gl518r00_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_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), SENSORS_MODE_R, GL518_SYSCTL_VIN1, VALUE(3),
2 }, 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), SENSORS_MODE_R, GL518_SYSCTL_VIN2, VALUE(3),
2 }, 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_MODE_R, GL518_SYSCTL_VIN3, VALUE(3), 2 },
{ SENSORS_GL518R00_VDD_MIN, "vdd_min", SENSORS_GL518R00_VDD, { SENSORS_GL518_VDD_MIN, "vdd_min", SENSORS_GL518_VDD,
SENSORS_GL518R00_VDD, SENSORS_MODE_RW, SENSORS_GL518_VDD, SENSORS_MODE_RW,
GL518_SYSCTL_VDD, VALUE(1), 2 }, GL518_SYSCTL_VDD, VALUE(1), 2 },
{ SENSORS_GL518R00_VIN1_MIN, "vin1_min", SENSORS_GL518R00_VIN1, { SENSORS_GL518_VIN1_MIN, "vin1_min", SENSORS_GL518_VIN1,
SENSORS_GL518R00_VIN1, SENSORS_MODE_RW, SENSORS_GL518_VIN1, SENSORS_MODE_RW,
GL518_SYSCTL_VIN1, VALUE(1), 2 }, GL518_SYSCTL_VIN1, VALUE(1), 2 },
{ SENSORS_GL518R00_VIN2_MIN, "vin2_min", SENSORS_GL518R00_VIN2, { SENSORS_GL518_VIN2_MIN, "vin2_min", SENSORS_GL518_VIN2,
SENSORS_GL518R00_VIN2, SENSORS_MODE_RW, SENSORS_GL518_VIN2, SENSORS_MODE_RW,
GL518_SYSCTL_VIN2, VALUE(1), 2 }, GL518_SYSCTL_VIN2, VALUE(1), 2 },
{ SENSORS_GL518R00_VIN3_MIN, "vin3_min", SENSORS_GL518R00_VIN3, { SENSORS_GL518_VIN3_MIN, "vin3_min", SENSORS_GL518_VIN3,
SENSORS_GL518R00_VIN3, SENSORS_MODE_RW, SENSORS_GL518_VIN3, SENSORS_MODE_RW,
GL518_SYSCTL_VIN3, VALUE(1), 2 }, GL518_SYSCTL_VIN3, VALUE(1), 2 },
{ SENSORS_GL518R00_VDD_MAX, "vdd_max", SENSORS_GL518R00_VDD, { SENSORS_GL518_VDD_MAX, "vdd_max", SENSORS_GL518_VDD,
SENSORS_GL518R00_VDD, SENSORS_MODE_RW, SENSORS_GL518_VDD, SENSORS_MODE_RW,
GL518_SYSCTL_VDD, VALUE(2), 2 }, GL518_SYSCTL_VDD, VALUE(2), 2 },
{ SENSORS_GL518R00_VIN1_MAX, "vin1_max", SENSORS_GL518R00_VIN1, { SENSORS_GL518_VIN1_MAX, "vin1_max", SENSORS_GL518_VIN1,
SENSORS_GL518R00_VIN1, SENSORS_MODE_RW, SENSORS_GL518_VIN1, SENSORS_MODE_RW,
GL518_SYSCTL_VIN1, VALUE(2), 2 }, GL518_SYSCTL_VIN1, VALUE(2), 2 },
{ SENSORS_GL518R00_VIN2_MAX, "vin2_max", SENSORS_GL518R00_VIN2, { SENSORS_GL518_VIN2_MAX, "vin2_max", SENSORS_GL518_VIN2,
SENSORS_GL518R00_VIN2, SENSORS_MODE_RW, SENSORS_GL518_VIN2, SENSORS_MODE_RW,
GL518_SYSCTL_VIN2, VALUE(2), 2 }, GL518_SYSCTL_VIN2, VALUE(2), 2 },
{ SENSORS_GL518R00_VIN3_MAX, "vin3_max", SENSORS_GL518R00_VIN3, { SENSORS_GL518_VIN3_MAX, "vin3_max", SENSORS_GL518_VIN3,
SENSORS_GL518R00_VIN3, SENSORS_MODE_RW, SENSORS_GL518_VIN3, SENSORS_MODE_RW,
GL518_SYSCTL_VIN3, VALUE(2), 2 }, 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_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_MODE_R, GL518_SYSCTL_FAN2, VALUE(2), 0 },
{ SENSORS_GL518R00_FAN1_MIN, "fan1_min", SENSORS_GL518R00_FAN1, { SENSORS_GL518_FAN1_MIN, "fan1_min", SENSORS_GL518_FAN1,
SENSORS_GL518R00_FAN1, SENSORS_MODE_RW, SENSORS_GL518_FAN1, SENSORS_MODE_RW,
GL518_SYSCTL_FAN1, VALUE(1), 0 }, GL518_SYSCTL_FAN1, VALUE(1), 0 },
{ SENSORS_GL518R00_FAN2_MIN, "fan2_min", SENSORS_GL518R00_FAN2, { SENSORS_GL518_FAN2_MIN, "fan2_min", SENSORS_GL518_FAN2,
SENSORS_GL518R00_FAN2, SENSORS_MODE_RW, SENSORS_GL518_FAN2, SENSORS_MODE_RW,
GL518_SYSCTL_FAN2, VALUE(1), 0 }, 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_MODE_R, GL518_SYSCTL_TEMP, VALUE(3), 1 },
{ SENSORS_GL518R00_TEMP_HYST, "temp_hyst", SENSORS_GL518R00_TEMP, { SENSORS_GL518_TEMP_HYST, "temp_hyst", SENSORS_GL518_TEMP,
SENSORS_GL518R00_TEMP, SENSORS_MODE_RW, SENSORS_GL518_TEMP, SENSORS_MODE_RW,
GL518_SYSCTL_TEMP, VALUE(2), 1 }, GL518_SYSCTL_TEMP, VALUE(2), 1 },
{ SENSORS_GL518R00_TEMP_OVER, "temp_over", SENSORS_GL518R00_TEMP, { SENSORS_GL518_TEMP_OVER, "temp_over", SENSORS_GL518_TEMP,
SENSORS_GL518R00_TEMP, SENSORS_MODE_RW, SENSORS_GL518_TEMP, SENSORS_MODE_RW,
GL518_SYSCTL_TEMP, VALUE(1), 1 }, 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, SENSORS_NO_MAPPING, SENSORS_MODE_RW,
GL518_SYSCTL_FAN_DIV, VALUE(1), 0 }, 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, SENSORS_NO_MAPPING, SENSORS_MODE_RW,
GL518_SYSCTL_FAN_DIV, VALUE(2), 0 }, 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, SENSORS_NO_MAPPING, SENSORS_MODE_R,
GL518_SYSCTL_ALARMS, VALUE(1), 0 }, 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, SENSORS_NO_MAPPING, SENSORS_MODE_RW,
GL518_SYSCTL_BEEP, VALUE(1), 0 }, GL518_SYSCTL_BEEP, VALUE(1), 0 },
{ SENSORS_GL518R00_BEEPS, "beeps", SENSORS_GL518R00_ALARMS, { SENSORS_GL518_BEEPS, "beeps", SENSORS_GL518_ALARMS,
SENSORS_GL518R00_ALARMS, SENSORS_MODE_RW, SENSORS_GL518_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,
GL518_SYSCTL_BEEP, VALUE(2), 0 }, GL518_SYSCTL_BEEP, VALUE(2), 0 },
{ 0 } { 0 }
}; };
@@ -1494,8 +1423,7 @@ sensors_chip_features sensors_chip_features_list[] =
{ SENSORS_LM78J_PREFIX, lm78j_features }, { SENSORS_LM78J_PREFIX, lm78j_features },
{ SENSORS_LM79_PREFIX, lm79_features }, { SENSORS_LM79_PREFIX, lm79_features },
{ SENSORS_LM75_PREFIX, lm75_features }, { SENSORS_LM75_PREFIX, lm75_features },
{ SENSORS_GL518R00_PREFIX, gl518r00_features }, { SENSORS_GL518_PREFIX, gl518r00_features },
{ SENSORS_GL518R80_PREFIX, gl518r80_features },
{ SENSORS_LM80_PREFIX, lm80_features }, { SENSORS_LM80_PREFIX, lm80_features },
{ SENSORS_W83781D_PREFIX, w83781d_features }, { SENSORS_W83781D_PREFIX, w83781d_features },
{ SENSORS_W83782D_PREFIX, w83782d_features }, { SENSORS_W83782D_PREFIX, w83782d_features },

View File

@@ -203,67 +203,34 @@
#define SENSORS_MAX1617A_REMOTE_TEMP_OVER 56 /* RW */ #define SENSORS_MAX1617A_REMOTE_TEMP_OVER 56 /* RW */
#define SENSORS_MAX1617A_ALARMS 81 /* R */ #define SENSORS_MAX1617A_ALARMS 81 /* R */
/* GL518SM revision 0x00 chips. You may also use the revision 0x80 defines, /* GL518SM chips */
but note that some features are unaccessible in revision 0x00. */
#define SENSORS_GL518R00_PREFIX "gl518sm-r00" #define SENSORS_GL518_PREFIX "gl518sm"
/* 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_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 */ /* LM80 chips */

View File

@@ -512,13 +512,13 @@ void print_gl518(const sensors_chip_name *name)
int is_r00; int is_r00;
is_r00 = !strcmp(name->prefix,"gl518sm-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; alarms = cur + 0.5;
else { else {
printf("ERROR: Can't get alarm data!\n"); printf("ERROR: Can't get alarm data!\n");
alarms = 0; alarms = 0;
} }
if (!sensors_get_feature(*name,SENSORS_GL518R00_BEEPS,&cur)) if (!sensors_get_feature(*name,SENSORS_GL518_BEEPS,&cur))
beeps = cur + 0.5; beeps = cur + 0.5;
else { else {
printf("ERROR: Can't get beep data!\n"); 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 /* We need special treatment for the R00 chips, because they can't display
actual readings! We hardcode this, as this is the easiest way. */ actual readings! We hardcode this, as this is the easiest way. */
if (is_r00) { if (is_r00) {
if (!sensors_get_label(*name,SENSORS_GL518R00_VDD,&label) && if (!sensors_get_label(*name,SENSORS_GL518_VDD,&label) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VDD,&cur) && !sensors_get_feature(*name,SENSORS_GL518_VDD,&cur) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VDD_MIN,&min) && !sensors_get_feature(*name,SENSORS_GL518_VDD_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VDD_MAX,&max)) { !sensors_get_feature(*name,SENSORS_GL518_VDD_MAX,&max)) {
print_label(label,10); print_label(label,10);
if (cur == 0.0) if (cur == 0.0)
printf("(n/a) "); printf("(n/a) ");
@@ -544,10 +544,10 @@ void print_gl518(const sensors_chip_name *name)
printf("ERROR: Can't get VDD data!\n"); printf("ERROR: Can't get VDD data!\n");
free_the_label(&label); free_the_label(&label);
if (!sensors_get_label(*name,SENSORS_GL518R00_VIN1,&label) && if (!sensors_get_label(*name,SENSORS_GL518_VIN1,&label) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VIN1,&cur) && !sensors_get_feature(*name,SENSORS_GL518_VIN1,&cur) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VIN1_MIN,&min) && !sensors_get_feature(*name,SENSORS_GL518_VIN1_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VIN1_MAX,&max)) { !sensors_get_feature(*name,SENSORS_GL518_VIN1_MAX,&max)) {
print_label(label,10); print_label(label,10);
if (cur == 0.0) if (cur == 0.0)
printf("(n/a) "); printf("(n/a) ");
@@ -559,10 +559,10 @@ void print_gl518(const sensors_chip_name *name)
} else } else
printf("ERROR: Can't get VIN1 data!\n"); printf("ERROR: Can't get VIN1 data!\n");
free_the_label(&label); free_the_label(&label);
if (!sensors_get_label(*name,SENSORS_GL518R00_VIN2,&label) && if (!sensors_get_label(*name,SENSORS_GL518_VIN2,&label) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VIN2,&cur) && !sensors_get_feature(*name,SENSORS_GL518_VIN2,&cur) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VIN2_MIN,&min) && !sensors_get_feature(*name,SENSORS_GL518_VIN2_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VIN2_MAX,&max)) { !sensors_get_feature(*name,SENSORS_GL518_VIN2_MAX,&max)) {
print_label(label,10); print_label(label,10);
if (cur == 0.0) if (cur == 0.0)
printf("(n/a) "); printf("(n/a) ");
@@ -575,10 +575,10 @@ void print_gl518(const sensors_chip_name *name)
printf("ERROR: Can't get IN2 data!\n"); printf("ERROR: Can't get IN2 data!\n");
free_the_label(&label); free_the_label(&label);
} else { } else {
if (!sensors_get_label(*name,SENSORS_GL518R00_VDD,&label) && if (!sensors_get_label(*name,SENSORS_GL518_VDD,&label) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VDD,&cur) && !sensors_get_feature(*name,SENSORS_GL518_VDD,&cur) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VDD_MIN,&min) && !sensors_get_feature(*name,SENSORS_GL518_VDD_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VDD_MAX,&max)) { !sensors_get_feature(*name,SENSORS_GL518_VDD_MAX,&max)) {
print_label(label,10); print_label(label,10);
printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s %s\n", printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s %s\n",
cur,min,max,alarms&GL518_ALARM_VDD?"ALARM":" ", cur,min,max,alarms&GL518_ALARM_VDD?"ALARM":" ",
@@ -586,10 +586,10 @@ void print_gl518(const sensors_chip_name *name)
} else } else
printf("ERROR: Can't get VDD data!\n"); printf("ERROR: Can't get VDD data!\n");
free_the_label(&label); free_the_label(&label);
if (!sensors_get_label(*name,SENSORS_GL518R00_VIN1,&label) && if (!sensors_get_label(*name,SENSORS_GL518_VIN1,&label) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VIN1,&cur) && !sensors_get_feature(*name,SENSORS_GL518_VIN1,&cur) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VIN1_MIN,&min) && !sensors_get_feature(*name,SENSORS_GL518_VIN1_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VIN1_MAX,&max)) { !sensors_get_feature(*name,SENSORS_GL518_VIN1_MAX,&max)) {
print_label(label,10); print_label(label,10);
printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s %s\n", printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s %s\n",
cur,min,max,alarms&GL518_ALARM_VIN1?"ALARM":" ", cur,min,max,alarms&GL518_ALARM_VIN1?"ALARM":" ",
@@ -597,10 +597,10 @@ void print_gl518(const sensors_chip_name *name)
} else } else
printf("ERROR: Can't get VIN1 data!\n"); printf("ERROR: Can't get VIN1 data!\n");
free_the_label(&label); free_the_label(&label);
if (!sensors_get_label(*name,SENSORS_GL518R00_VIN2,&label) && if (!sensors_get_label(*name,SENSORS_GL518_VIN2,&label) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VIN2,&cur) && !sensors_get_feature(*name,SENSORS_GL518_VIN2,&cur) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VIN2_MIN,&min) && !sensors_get_feature(*name,SENSORS_GL518_VIN2_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VIN2_MAX,&max)) { !sensors_get_feature(*name,SENSORS_GL518_VIN2_MAX,&max)) {
print_label(label,10); print_label(label,10);
printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s %s\n", printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s %s\n",
cur,min,max,alarms&GL518_ALARM_VIN2?"ALARM":" ", cur,min,max,alarms&GL518_ALARM_VIN2?"ALARM":" ",
@@ -610,10 +610,10 @@ void print_gl518(const sensors_chip_name *name)
free_the_label(&label); free_the_label(&label);
} }
if (!sensors_get_label(*name,SENSORS_GL518R00_VIN3,&label) && if (!sensors_get_label(*name,SENSORS_GL518_VIN3,&label) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VIN3,&cur) && !sensors_get_feature(*name,SENSORS_GL518_VIN3,&cur) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VIN3_MIN,&min) && !sensors_get_feature(*name,SENSORS_GL518_VIN3_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_GL518R00_VIN3_MAX,&max)) { !sensors_get_feature(*name,SENSORS_GL518_VIN3_MAX,&max)) {
print_label(label,10); print_label(label,10);
printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s %s\n", printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s %s\n",
cur,min,max,alarms&GL518_ALARM_VIN3?"ALARM":" ", 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"); printf("ERROR: Can't get VIN3 data!\n");
free_the_label(&label); free_the_label(&label);
if (!sensors_get_label(*name,SENSORS_GL518R00_FAN1,&label) && if (!sensors_get_label(*name,SENSORS_GL518_FAN1,&label) &&
!sensors_get_feature(*name,SENSORS_GL518R00_FAN1,&cur) && !sensors_get_feature(*name,SENSORS_GL518_FAN1,&cur) &&
!sensors_get_feature(*name,SENSORS_GL518R00_FAN1_DIV,&fdiv) && !sensors_get_feature(*name,SENSORS_GL518_FAN1_DIV,&fdiv) &&
!sensors_get_feature(*name,SENSORS_GL518R00_FAN1_MIN,&min)) { !sensors_get_feature(*name,SENSORS_GL518_FAN1_MIN,&min)) {
print_label(label,10); print_label(label,10);
printf("%4.0f RPM (min = %4.0f RPM, div = %1.0f) %s %s\n", printf("%4.0f RPM (min = %4.0f RPM, div = %1.0f) %s %s\n",
cur,min,fdiv, alarms&GL518_ALARM_FAN1?"ALARM":" ", cur,min,fdiv, alarms&GL518_ALARM_FAN1?"ALARM":" ",
@@ -634,10 +634,10 @@ void print_gl518(const sensors_chip_name *name)
} else } else
printf("ERROR: Can't get FAN1 data!\n"); printf("ERROR: Can't get FAN1 data!\n");
free_the_label(&label); free_the_label(&label);
if (!sensors_get_label(*name,SENSORS_GL518R00_FAN2,&label) && if (!sensors_get_label(*name,SENSORS_GL518_FAN2,&label) &&
!sensors_get_feature(*name,SENSORS_GL518R00_FAN2,&cur) && !sensors_get_feature(*name,SENSORS_GL518_FAN2,&cur) &&
!sensors_get_feature(*name,SENSORS_GL518R00_FAN2_DIV,&fdiv) && !sensors_get_feature(*name,SENSORS_GL518_FAN2_DIV,&fdiv) &&
!sensors_get_feature(*name,SENSORS_GL518R00_FAN2_MIN,&min)) { !sensors_get_feature(*name,SENSORS_GL518_FAN2_MIN,&min)) {
print_label(label,10); print_label(label,10);
printf("%4.0f RPM (min = %4.0f RPM, div = %1.0f) %s %s\n", printf("%4.0f RPM (min = %4.0f RPM, div = %1.0f) %s %s\n",
cur,min,fdiv, alarms&GL518_ALARM_FAN2?"ALARM":" ", 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"); printf("ERROR: Can't get FAN2 data!\n");
free_the_label(&label); free_the_label(&label);
if (!sensors_get_label(*name,SENSORS_GL518R00_TEMP,&label) && if (!sensors_get_label(*name,SENSORS_GL518_TEMP,&label) &&
!sensors_get_feature(*name,SENSORS_GL518R00_TEMP,&cur) && !sensors_get_feature(*name,SENSORS_GL518_TEMP,&cur) &&
!sensors_get_feature(*name,SENSORS_GL518R00_TEMP_OVER,&max) && !sensors_get_feature(*name,SENSORS_GL518_TEMP_OVER,&max) &&
!sensors_get_feature(*name,SENSORS_GL518R00_TEMP_HYST,&min)) { !sensors_get_feature(*name,SENSORS_GL518_TEMP_HYST,&min)) {
print_label(label,10); print_label(label,10);
printf("%+3.0f C (limit = %+3.0f C, hysteresis = %+3.0f C) %s %s\n", printf("%+3.0f C (limit = %+3.0f C, hysteresis = %+3.0f C) %s %s\n",
cur,max,min, alarms&GL518_ALARM_TEMP?"ALARM":" ", 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"); printf("ERROR: Can't get TEMP data!\n");
free_the_label(&label); free_the_label(&label);
if (!sensors_get_label(*name,SENSORS_GL518R00_BEEP_ENABLE,&label) && if (!sensors_get_label(*name,SENSORS_GL518_BEEP_ENABLE,&label) &&
!sensors_get_feature(*name,SENSORS_GL518R00_BEEP_ENABLE,&cur)) { !sensors_get_feature(*name,SENSORS_GL518_BEEP_ENABLE,&cur)) {
print_label(label,10); print_label(label,10);
if (cur < 0.5) if (cur < 0.5)
printf("Sound alarm disabled\n"); printf("Sound alarm disabled\n");

View File

@@ -261,8 +261,7 @@ void do_a_print(sensors_chip_name name)
print_sis5595(&name); print_sis5595(&name);
else if (!strcmp(name.prefix,"lm80")) else if (!strcmp(name.prefix,"lm80"))
print_lm80(&name); print_lm80(&name);
else if (!strcmp(name.prefix,"gl518sm-r00") || else if (!strcmp(name.prefix,"gl518sm"))
!strcmp(name.prefix,"gl518sm-r80"))
print_gl518(&name); print_gl518(&name);
else if ((!strcmp(name.prefix,"w83781d")) || else if ((!strcmp(name.prefix,"w83781d")) ||
(!strcmp(name.prefix,"w83782d")) || (!strcmp(name.prefix,"w83782d")) ||