2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-30 13:57:41 +00:00

w83792d driver and userspace support patch from Winbond.

by Chunhao Huang <huang0@winbond.com.tw>
         submitted by <DZShen@winbond.com.tw>


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2925 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Mark D. Studebaker 2005-03-10 19:03:52 +00:00
parent c6b95bf7e3
commit e25e3511f4
8 changed files with 2008 additions and 0 deletions

View File

@ -360,6 +360,7 @@ chip "lm78-*" "lm78-j-*" "lm79-*" "w83781d-*"
# set beep_enable 1
chip "lm75-*"
# Most boards don't need scaling. Following is
@ -724,6 +725,74 @@ chip "w83627thf-*" "w83637hf-*"
# ignore fan3
# Here are configurations for Winbond W83792AD/D chip.
chip "w83792d-*"
label in0 "VCoreA"
label in1 "VCoreB"
label in2 "VIN0"
label in3 "VIN1"
label in4 "VIN2"
label in5 "VIN3"
label in6 "5VCC"
label in7 "5VSB"
label in8 "VBAT"
label fan1 "Fan1"
label fan2 "Fan2"
label fan3 "Fan3"
label fan4 "Fan4"
label fan5 "Fan5"
label fan6 "Fan6"
label fan7 "Fan7"
label temp1 "Temp1"
label temp2 "Temp2"
label temp3 "Temp3"
set in0_min 1.4
set in0_max 1.6
set in1_min 1.4
set in1_max 1.6
set in2_min 3.2
set in2_max 3.4
set in3_min 3.1
set in3_max 3.3
set in4_min 1.4
set in4_max 1.5
set in5_min 2.6
set in5_max 2.65
set in6_min 5 * 0.95
set in6_max 5 * 1.05
set in7_min 5 * 0.95
set in7_max 5 * 1.05
set in8_min 3 * 0.95
set in8_max 3 * 1.05
#set fan1_div 4
#set fan1_min 1500
set fan2_div 4
set fan2_min 1500
#set fan3_min 1300
#set fan4_min 1500
#set fan5_min 1500
#set fan6_min 1500
#set fan7_min 1500
set temp1_over 42
set temp1_hyst 37
set temp2_over 43
set temp2_hyst 38
set temp3_over 45
set temp3_hyst 40
#ignore fan1
#ignore fan3
#ignore fan4
#ignore fan5
#ignore fan6
#ignore fan7
#ignore temp3
chip "as99127f-*"
# Asus won't release a datasheet so this is guesswork.

View File

@ -35,6 +35,7 @@ KERNELCHIPSTARGETS += $(MODULE_DIR)/mic74.o
KERNELCHIPSTARGETS += $(MODULE_DIR)/saa1064.o
KERNELCHIPSTARGETS += $(MODULE_DIR)/smartbatt.o
KERNELCHIPSTARGETS += $(MODULE_DIR)/smbus-arp.o
KERNELCHIPSTARGETS += $(MODULE_DIR)/w83792d.o
# These targets ARE included in 'mkpatch'

1417
kernel/chips/w83792d.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1694,6 +1694,171 @@ static sensors_chip_feature w83791d_features[] =
{ 0 }
};
static sensors_chip_feature w83792d_features[] =
{
{ SENSORS_W83792D_IN0, "in0", NOMAP, NOMAP,
R, W83792D_SYSCTL_IN0, VALUE(3), 3 },
{ SENSORS_W83792D_IN1, "in1", NOMAP, NOMAP,
R, W83792D_SYSCTL_IN1, VALUE(3), 3 },
{ SENSORS_W83792D_IN2, "in2", NOMAP, NOMAP,
R, W83792D_SYSCTL_IN2, VALUE(3), 3 },
{ SENSORS_W83792D_IN3, "in3", NOMAP, NOMAP,
R, W83792D_SYSCTL_IN3, VALUE(3), 3 },
{ SENSORS_W83792D_IN4, "in4", NOMAP, NOMAP,
R, W83792D_SYSCTL_IN4, VALUE(3), 3 },
{ SENSORS_W83792D_IN5, "in5", NOMAP, NOMAP,
R, W83792D_SYSCTL_IN5, VALUE(3), 3 },
{ SENSORS_W83792D_IN6, "in6", NOMAP, NOMAP,
R, W83792D_SYSCTL_IN6, VALUE(3), 3 },
{ SENSORS_W83792D_IN7, "in7", NOMAP, NOMAP,
R, W83792D_SYSCTL_IN7, VALUE(3), 3 },
{ SENSORS_W83792D_IN8, "in8", NOMAP, NOMAP,
R, W83792D_SYSCTL_IN8, VALUE(3), 3 },
{ SENSORS_W83792D_IN0_MIN, "in0_min", SENSORS_W83792D_IN0,
SENSORS_W83792D_IN0, RW,
W83792D_SYSCTL_IN0, VALUE(1), 3 },
{ SENSORS_W83792D_IN1_MIN, "in1_min", SENSORS_W83792D_IN1,
SENSORS_W83792D_IN1, RW,
W83792D_SYSCTL_IN1, VALUE(1), 3 },
{ SENSORS_W83792D_IN2_MIN, "in2_min", SENSORS_W83792D_IN2,
SENSORS_W83792D_IN2, RW,
W83792D_SYSCTL_IN2, VALUE(1), 3 },
{ SENSORS_W83792D_IN3_MIN, "in3_min", SENSORS_W83792D_IN3,
SENSORS_W83792D_IN3, RW,
W83792D_SYSCTL_IN3, VALUE(1), 3 },
{ SENSORS_W83792D_IN4_MIN, "in4_min", SENSORS_W83792D_IN4,
SENSORS_W83792D_IN4, RW,
W83792D_SYSCTL_IN4, VALUE(1), 3 },
{ SENSORS_W83792D_IN5_MIN, "in5_min", SENSORS_W83792D_IN5,
SENSORS_W83792D_IN5, RW,
W83792D_SYSCTL_IN5, VALUE(1), 3 },
{ SENSORS_W83792D_IN6_MIN, "in6_min", SENSORS_W83792D_IN6,
SENSORS_W83792D_IN6, RW,
W83792D_SYSCTL_IN6, VALUE(1), 3 },
{ SENSORS_W83792D_IN7_MIN, "in7_min", SENSORS_W83792D_IN7,
SENSORS_W83792D_IN7, RW,
W83792D_SYSCTL_IN7, VALUE(1), 3 },
{ SENSORS_W83792D_IN8_MIN, "in8_min", SENSORS_W83792D_IN8,
SENSORS_W83792D_IN8, RW,
W83792D_SYSCTL_IN8, VALUE(1), 3 },
{ SENSORS_W83792D_IN0_MAX, "in0_max", SENSORS_W83792D_IN0,
SENSORS_W83792D_IN0, RW,
W83792D_SYSCTL_IN0, VALUE(2), 3 },
{ SENSORS_W83792D_IN1_MAX, "in1_max", SENSORS_W83792D_IN1,
SENSORS_W83792D_IN1, RW,
W83792D_SYSCTL_IN1, VALUE(2), 3 },
{ SENSORS_W83792D_IN2_MAX, "in2_max", SENSORS_W83792D_IN2,
SENSORS_W83792D_IN2, RW,
W83792D_SYSCTL_IN2, VALUE(2), 3 },
{ SENSORS_W83792D_IN3_MAX, "in3_max", SENSORS_W83792D_IN3,
SENSORS_W83792D_IN3, RW,
W83792D_SYSCTL_IN3, VALUE(2), 3 },
{ SENSORS_W83792D_IN4_MAX, "in4_max", SENSORS_W83792D_IN4,
SENSORS_W83792D_IN4, RW,
W83792D_SYSCTL_IN4, VALUE(2), 3 },
{ SENSORS_W83792D_IN5_MAX, "in5_max", SENSORS_W83792D_IN5,
SENSORS_W83792D_IN5, RW,
W83792D_SYSCTL_IN5, VALUE(2), 3 },
{ SENSORS_W83792D_IN6_MAX, "in6_max", SENSORS_W83792D_IN6,
SENSORS_W83792D_IN6, RW,
W83792D_SYSCTL_IN6, VALUE(2), 3 },
{ SENSORS_W83792D_IN7_MAX, "in7_max", SENSORS_W83792D_IN7,
SENSORS_W83792D_IN7, RW,
W83792D_SYSCTL_IN7, VALUE(2), 3 },
{ SENSORS_W83792D_IN8_MAX, "in8_max", SENSORS_W83792D_IN8,
SENSORS_W83792D_IN8, RW,
W83792D_SYSCTL_IN8, VALUE(2), 3 },
{ SENSORS_W83792D_FAN1, "fan1", NOMAP, NOMAP,
R, W83792D_SYSCTL_FAN1, VALUE(2), 0 },
{ SENSORS_W83792D_FAN2, "fan2", NOMAP, NOMAP,
R, W83792D_SYSCTL_FAN2, VALUE(2), 0 },
{ SENSORS_W83792D_FAN3, "fan3", NOMAP, NOMAP,
R, W83792D_SYSCTL_FAN3, VALUE(2), 0 },
{ SENSORS_W83792D_FAN4, "fan4", NOMAP, NOMAP,
R, W83792D_SYSCTL_FAN4, VALUE(2), 0 },
{ SENSORS_W83792D_FAN5, "fan5", NOMAP, NOMAP,
R, W83792D_SYSCTL_FAN5, VALUE(2), 0 },
{ SENSORS_W83792D_FAN6, "fan6", NOMAP, NOMAP,
R, W83792D_SYSCTL_FAN6, VALUE(2), 0 },
{ SENSORS_W83792D_FAN7, "fan7", NOMAP, NOMAP,
R, W83792D_SYSCTL_FAN7, VALUE(2), 0 },
{ SENSORS_W83792D_FAN1_MIN, "fan1_min", SENSORS_W83792D_FAN1,
SENSORS_W83792D_FAN1, RW,
W83792D_SYSCTL_FAN1, VALUE(1), 0 },
{ SENSORS_W83792D_FAN2_MIN, "fan2_min", SENSORS_W83792D_FAN2,
SENSORS_W83792D_FAN2, RW,
W83792D_SYSCTL_FAN2, VALUE(1), 0 },
{ SENSORS_W83792D_FAN3_MIN, "fan3_min", SENSORS_W83792D_FAN3,
SENSORS_W83792D_FAN3, RW,
W83792D_SYSCTL_FAN3, VALUE(1), 0 },
{ SENSORS_W83792D_FAN4_MIN, "fan4_min", SENSORS_W83792D_FAN4,
SENSORS_W83792D_FAN4, RW,
W83792D_SYSCTL_FAN4, VALUE(1), 0 },
{ SENSORS_W83792D_FAN5_MIN, "fan5_min", SENSORS_W83792D_FAN5,
SENSORS_W83792D_FAN5, RW,
W83792D_SYSCTL_FAN5, VALUE(1), 0 },
{ SENSORS_W83792D_FAN6_MIN, "fan6_min", SENSORS_W83792D_FAN6,
SENSORS_W83792D_FAN6, RW,
W83792D_SYSCTL_FAN6, VALUE(1), 0 },
{ SENSORS_W83792D_FAN7_MIN, "fan7_min", SENSORS_W83792D_FAN7,
SENSORS_W83792D_FAN7, RW,
W83792D_SYSCTL_FAN7, VALUE(1), 0 },
{ SENSORS_W83792D_TEMP1, "temp1", NOMAP, NOMAP,
R, W83792D_SYSCTL_TEMP1, VALUE(3), 1 },
{ SENSORS_W83792D_TEMP1_HYST, "temp1_hyst", SENSORS_W83792D_TEMP1,
SENSORS_W83792D_TEMP1, RW,
W83792D_SYSCTL_TEMP1, VALUE(2), 1 },
{ SENSORS_W83792D_TEMP1_OVER, "temp1_over", SENSORS_W83792D_TEMP1,
SENSORS_W83792D_TEMP1, RW,
W83792D_SYSCTL_TEMP1, VALUE(1), 1 },
{ SENSORS_W83792D_TEMP2, "temp2", NOMAP, NOMAP,
R, W83792D_SYSCTL_TEMP2, VALUE(3), 1 },
{ SENSORS_W83792D_TEMP2_HYST, "temp2_hyst", SENSORS_W83792D_TEMP2,
SENSORS_W83792D_TEMP2, RW,
W83792D_SYSCTL_TEMP2, VALUE(2), 1 },
{ SENSORS_W83792D_TEMP2_OVER, "temp2_over", SENSORS_W83792D_TEMP2,
SENSORS_W83792D_TEMP2, RW,
W83792D_SYSCTL_TEMP2, VALUE(1), 1 },
{ SENSORS_W83792D_TEMP3, "temp3", NOMAP, NOMAP,
R, W83792D_SYSCTL_TEMP3, VALUE(3), 1 },
{ SENSORS_W83792D_TEMP3_HYST, "temp3_hyst", SENSORS_W83792D_TEMP3,
SENSORS_W83792D_TEMP3, RW,
W83792D_SYSCTL_TEMP3, VALUE(2), 1 },
{ SENSORS_W83792D_TEMP3_OVER, "temp3_over", SENSORS_W83792D_TEMP3,
SENSORS_W83792D_TEMP3, RW,
W83792D_SYSCTL_TEMP3, VALUE(1), 1 },
/* { SENSORS_W83792D_VID, "vid", NOMAP, NOMAP,
R, W83792D_SYSCTL_VID, VALUE(1), 3 },
{ SENSORS_W83792D_VRM, "vrm", NOMAP, NOMAP,
RW, W83792D_SYSCTL_VRM, VALUE(1), 1 }, */
{ SENSORS_W83792D_CHASSIS, "chassis", SENSORS_W83792D_CHASSIS,
NOMAP, RW,
W83792D_SYSCTL_CHASSIS, VALUE(1), 0 },
{ SENSORS_W83792D_FAN1_DIV, "fan1_div", SENSORS_W83792D_FAN1,
NOMAP, RW,
W83792D_SYSCTL_FAN_DIV, VALUE(1), 0 },
{ SENSORS_W83792D_FAN2_DIV, "fan2_div", SENSORS_W83792D_FAN2,
NOMAP, RW,
W83792D_SYSCTL_FAN_DIV, VALUE(2), 0 },
{ SENSORS_W83792D_FAN3_DIV, "fan3_div", SENSORS_W83792D_FAN3,
NOMAP, RW,
W83792D_SYSCTL_FAN_DIV, VALUE(3), 0 },
{ SENSORS_W83792D_FAN4_DIV, "fan4_div", SENSORS_W83792D_FAN4,
NOMAP, RW,
W83792D_SYSCTL_FAN_DIV, VALUE(4), 0 },
{ SENSORS_W83792D_FAN5_DIV, "fan5_div", SENSORS_W83792D_FAN5,
NOMAP, RW,
W83792D_SYSCTL_FAN_DIV, VALUE(5), 0 },
{ SENSORS_W83792D_FAN6_DIV, "fan6_div", SENSORS_W83792D_FAN6,
NOMAP, RW,
W83792D_SYSCTL_FAN_DIV, VALUE(6), 0 },
{ SENSORS_W83792D_FAN7_DIV, "fan7_div", SENSORS_W83792D_FAN7,
NOMAP, RW,
W83792D_SYSCTL_FAN_DIV, VALUE(7), 0 },
{ 0 }
};
static sensors_chip_feature w83l785ts_features[] =
{
{ SENSORS_W83L785TS_TEMP, "temp", NOMAP, NOMAP,
@ -5284,6 +5449,7 @@ sensors_chip_features sensors_chip_features_list[] =
/* Cheat on 83637HF for now - no separate #defines */
{ SENSORS_W83637HF_PREFIX, w83782d_features },
{ SENSORS_W83791D_PREFIX, w83791d_features },
{ SENSORS_W83792D_PREFIX, w83792d_features },
{ SENSORS_W83L785TS_PREFIX, w83l785ts_features },
{ SENSORS_AS99127F_PREFIX, as99127f_features },
{ SENSORS_ASB100_PREFIX, asb100_features },

View File

@ -650,6 +650,81 @@
/* Winbond W83792AD/D chip */
#define SENSORS_W83792D_PREFIX "w83792d"
#define SENSORS_W83792D_IN0 1 /* R */
#define SENSORS_W83792D_IN1 2 /* R */
#define SENSORS_W83792D_IN2 3 /* R */
#define SENSORS_W83792D_IN3 4 /* R */
#define SENSORS_W83792D_IN4 5 /* R */
#define SENSORS_W83792D_IN5 6 /* R */
#define SENSORS_W83792D_IN6 7 /* R */
#define SENSORS_W83792D_IN7 8 /* R */
#define SENSORS_W83792D_IN8 9 /* R */
#define SENSORS_W83792D_IN9 10 /* R */
#define SENSORS_W83792D_IN0_MIN 11 /* RW */
#define SENSORS_W83792D_IN1_MIN 12 /* RW */
#define SENSORS_W83792D_IN2_MIN 13 /* RW */
#define SENSORS_W83792D_IN3_MIN 14 /* RW */
#define SENSORS_W83792D_IN4_MIN 15 /* RW */
#define SENSORS_W83792D_IN5_MIN 16 /* RW */
#define SENSORS_W83792D_IN6_MIN 17 /* RW */
#define SENSORS_W83792D_IN7_MIN 18 /* RW */
#define SENSORS_W83792D_IN8_MIN 19 /* RW */
#define SENSORS_W83792D_IN9_MIN 20 /* RW */
#define SENSORS_W83792D_IN0_MAX 21 /* RW */
#define SENSORS_W83792D_IN1_MAX 22 /* RW */
#define SENSORS_W83792D_IN2_MAX 23 /* RW */
#define SENSORS_W83792D_IN3_MAX 24 /* RW */
#define SENSORS_W83792D_IN4_MAX 25 /* RW */
#define SENSORS_W83792D_IN5_MAX 26 /* RW */
#define SENSORS_W83792D_IN6_MAX 27 /* RW */
#define SENSORS_W83792D_IN7_MAX 28 /* RW */
#define SENSORS_W83792D_IN8_MAX 29 /* RW */
#define SENSORS_W83792D_IN9_MAX 30 /* RW */
#define SENSORS_W83792D_FAN1 31 /* R */
#define SENSORS_W83792D_FAN2 32 /* R */
#define SENSORS_W83792D_FAN3 33 /* R */
#define SENSORS_W83792D_FAN4 34 /* R */
#define SENSORS_W83792D_FAN5 35 /* R */
#define SENSORS_W83792D_FAN6 36 /* R */
#define SENSORS_W83792D_FAN7 37 /* R */
#define SENSORS_W83792D_FAN1_MIN 41 /* RW */
#define SENSORS_W83792D_FAN2_MIN 42 /* RW */
#define SENSORS_W83792D_FAN3_MIN 43 /* RW */
#define SENSORS_W83792D_FAN4_MIN 44 /* RW */
#define SENSORS_W83792D_FAN5_MIN 45 /* RW */
#define SENSORS_W83792D_FAN6_MIN 46 /* RW */
#define SENSORS_W83792D_FAN7_MIN 47 /* RW */
#define SENSORS_W83792D_TEMP1 51 /* R */
#define SENSORS_W83792D_TEMP1_HYST 52 /* RW */
#define SENSORS_W83792D_TEMP1_OVER 53 /* RW */
#define SENSORS_W83792D_TEMP2 54 /* R */
#define SENSORS_W83792D_TEMP2_HYST 55 /* RW */
#define SENSORS_W83792D_TEMP2_OVER 56 /* RW */
#define SENSORS_W83792D_TEMP3 57 /* R */
#define SENSORS_W83792D_TEMP3_HYST 58 /* RW */
#define SENSORS_W83792D_TEMP3_OVER 59 /* RW */
/*#define SENSORS_W83792D_VID 61 */ /* R */
/*#define SENSORS_W83792D_VRM 62 */ /* RW */
#define SENSORS_W83792D_CHASSIS 63 /* R */
#define SENSORS_W83792D_FAN1_DIV 71 /* RW */
#define SENSORS_W83792D_FAN2_DIV 72 /* RW */
#define SENSORS_W83792D_FAN3_DIV 73 /* RW */
#define SENSORS_W83792D_FAN4_DIV 74 /* RW */
#define SENSORS_W83792D_FAN5_DIV 75 /* RW */
#define SENSORS_W83792D_FAN6_DIV 76 /* RW */
#define SENSORS_W83792D_FAN7_DIV 77 /* RW */
#define SENSORS_AS99127F_PREFIX "as99127f"

View File

@ -2512,6 +2512,284 @@ void print_w83781d(const sensors_chip_name *name)
free_the_label(&label);
}
void print_w83792d(const sensors_chip_name *name)
{
char *label = NULL;
double cur,min,max,fdiv;
int valid = 0;
if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_IN0,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_W83792D_IN0,&cur) &&
!sensors_get_feature(*name,SENSORS_W83792D_IN0_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_W83792D_IN0_MAX,&max)) {
if (valid) {
print_label(label,10);
printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s\n",
cur,min,max, ((cur<min)||(cur>max))?"ALARM":"");
}
} else
printf("ERROR: Can't get IN0 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_IN1,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_W83792D_IN1,&cur) &&
!sensors_get_feature(*name,SENSORS_W83792D_IN1_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_W83792D_IN1_MAX,&max)) {
if (valid) {
print_label(label,10);
printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s\n",
cur,min,max, ((cur<min)||(cur>max))?"ALARM":"");
}
} else
printf("ERROR: Can't get IN1 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_IN2,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_W83792D_IN2,&cur) &&
!sensors_get_feature(*name,SENSORS_W83792D_IN2_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_W83792D_IN2_MAX,&max)) {
if (valid) {
print_label(label,10);
printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s\n",
cur,min,max, ((cur<min)||(cur>max))?"ALARM":"");
}
} else
printf("ERROR: Can't get IN2 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_IN3,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_W83792D_IN3,&cur) &&
!sensors_get_feature(*name,SENSORS_W83792D_IN3_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_W83792D_IN3_MAX,&max)) {
if (valid) {
print_label(label,10);
printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s\n",
cur,min,max, ((cur<min)||(cur>max))?"ALARM":"");
}
} else
printf("ERROR: Can't get IN3 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_IN4,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_W83792D_IN4,&cur) &&
!sensors_get_feature(*name,SENSORS_W83792D_IN4_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_W83792D_IN4_MAX,&max)) {
if (valid) {
print_label(label,10);
printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s\n",
cur,min,max, ((cur<min)||(cur>max))?"ALARM":"");
}
} else
printf("ERROR: Can't get IN4 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_IN5,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_W83792D_IN5,&cur) &&
!sensors_get_feature(*name,SENSORS_W83792D_IN5_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_W83792D_IN5_MAX,&max)) {
if (valid) {
print_label(label,10);
printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s\n",
cur,min,max, ((cur<min)||(cur>max))?"ALARM":"");
}
} else
printf("ERROR: Can't get IN5 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_IN6,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_W83792D_IN6,&cur) &&
!sensors_get_feature(*name,SENSORS_W83792D_IN6_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_W83792D_IN6_MAX,&max)) {
if (valid) {
print_label(label,10);
printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s\n",
cur,min,max, ((cur<min)||(cur>max))?"ALARM":"");
}
} else
printf("ERROR: Can't get IN6 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_W83782D_IN7,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_W83782D_IN7,&cur) &&
!sensors_get_feature(*name,SENSORS_W83782D_IN7_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_W83782D_IN7_MAX,&max)) {
if (valid) {
print_label(label,10);
printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s\n",
cur,min,max, ((cur<min)||(cur>max))?"ALARM":"");
}
} else
printf("ERROR: Can't get IN7 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_W83782D_IN8,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_W83782D_IN8,&cur) &&
!sensors_get_feature(*name,SENSORS_W83782D_IN8_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_W83782D_IN8_MAX,&max)) {
if (valid) {
print_label(label,10);
printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s\n",
cur,min,max, ((cur<min)||(cur>max))?"ALARM":"");
}
} else
printf("ERROR: Can't get IN8 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_FAN1,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_W83792D_FAN1,&cur) &&
!sensors_get_feature(*name,SENSORS_W83792D_FAN1_DIV,&fdiv) &&
!sensors_get_feature(*name,SENSORS_W83792D_FAN1_MIN,&min)) {
if (valid) {
print_label(label,10);
printf("%4.0f RPM (min = %4.0f RPM, div = %1.0f) %s\n",
cur,min,fdiv, ((cur<min)&&(cur!=0))?"ALARM":"");
}
} else
printf("ERROR: Can't get FAN1 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_FAN2,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_W83792D_FAN2,&cur) &&
!sensors_get_feature(*name,SENSORS_W83792D_FAN2_DIV,&fdiv) &&
!sensors_get_feature(*name,SENSORS_W83792D_FAN2_MIN,&min)) {
if (valid) {
print_label(label,10);
printf("%4.0f RPM (min = %4.0f RPM, div = %1.0f) %s\n",
cur,min,fdiv, ((cur<min)&&(cur!=0))?"ALARM":"");
}
} else
printf("ERROR: Can't get FAN2 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_FAN3,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_W83792D_FAN3,&cur) &&
!sensors_get_feature(*name,SENSORS_W83792D_FAN3_DIV,&fdiv) &&
!sensors_get_feature(*name,SENSORS_W83792D_FAN3_MIN,&min)) {
if (valid) {
print_label(label,10);
printf("%4.0f RPM (min = %4.0f RPM, div = %1.0f) %s\n",
cur,min,fdiv, ((cur<min)&&(cur!=0))?"ALARM":"");
}
} else
printf("ERROR: Can't get FAN3 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_FAN4,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_W83792D_FAN4,&cur) &&
!sensors_get_feature(*name,SENSORS_W83792D_FAN4_DIV,&fdiv) &&
!sensors_get_feature(*name,SENSORS_W83792D_FAN4_MIN,&min)) {
if (valid) {
print_label(label,10);
printf("%4.0f RPM (min = %4.0f RPM, div = %1.0f) %s\n",
cur,min,fdiv, ((cur<min)&&(cur!=0))?"ALARM":"");
}
} else
printf("ERROR: Can't get FAN4 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_FAN5,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_W83792D_FAN5,&cur) &&
!sensors_get_feature(*name,SENSORS_W83792D_FAN5_DIV,&fdiv) &&
!sensors_get_feature(*name,SENSORS_W83792D_FAN5_MIN,&min)) {
if (valid) {
print_label(label,10);
printf("%4.0f RPM (min = %4.0f RPM, div = %1.0f) %s\n",
cur,min,fdiv, ((cur<min)&&(cur!=0))?"ALARM":"");
}
} else
printf("ERROR: Can't get FAN5 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_FAN6,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_W83792D_FAN6,&cur) &&
!sensors_get_feature(*name,SENSORS_W83792D_FAN6_DIV,&fdiv) &&
!sensors_get_feature(*name,SENSORS_W83792D_FAN6_MIN,&min)) {
if (valid) {
print_label(label,10);
printf("%4.0f RPM (min = %4.0f RPM, div = %1.0f) %s\n",
cur,min,fdiv, ((cur<min)&&(cur!=0))?"ALARM":"");
}
} else
printf("ERROR: Can't get FAN6 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_FAN7,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_W83792D_FAN7,&cur) &&
!sensors_get_feature(*name,SENSORS_W83792D_FAN7_DIV,&fdiv) &&
!sensors_get_feature(*name,SENSORS_W83792D_FAN7_MIN,&min)) {
if (valid) {
print_label(label,10);
printf("%4.0f RPM (min = %4.0f RPM, div = %1.0f) %s\n",
cur,min,fdiv, ((cur<min)&&(cur!=0))?"ALARM":"");
}
} else
printf("ERROR: Can't get FAN7 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_TEMP1,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_W83792D_TEMP1,&cur) &&
!sensors_get_feature(*name,SENSORS_W83792D_TEMP1_HYST,&min) &&
!sensors_get_feature(*name,SENSORS_W83792D_TEMP1_OVER,&max)) {
if (valid) {
print_label(label,10);
if(min == 127){
print_temp_info( cur, max, 0, MAXONLY, 1, 1);
printf(" %s\n", (cur>max)?"ALARM":"");
}else{
print_temp_info( cur, max, min, HYST, 1, 1);
printf(" %s\n", ((cur<min)||(cur>max))?"ALARM":"");
}
}
} else
printf("ERROR: Can't get TEMP1 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_TEMP2,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_W83792D_TEMP2,&cur) &&
!sensors_get_feature(*name,SENSORS_W83792D_TEMP2_HYST,&min) &&
!sensors_get_feature(*name,SENSORS_W83792D_TEMP2_OVER,&max)) {
if (valid) {
print_label(label,10);
print_temp_info( cur, max, min, HYST, 1, 1);
printf(" %s\n", ((cur<min)||(cur>max))?"ALARM":"");
}
} else
printf("ERROR: Can't get TEMP2 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_TEMP3,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_W83792D_TEMP3,&cur) &&
!sensors_get_feature(*name,SENSORS_W83792D_TEMP3_HYST,&min) &&
!sensors_get_feature(*name,SENSORS_W83792D_TEMP3_OVER,&max)) {
if (valid) {
print_label(label,10);
print_temp_info( cur, max, min, HYST, 1, 1);
printf(" %s\n", ((cur<min)||(cur>max))?"ALARM":"");
}
} else
printf("ERROR: Can't get TEMP3 data!\n");
free_the_label(&label);
/* print_vid_info(name, SENSORS_W83792D_VID, SENSORS_W83792D_VRM); */
if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_CHASSIS,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_W83792D_CHASSIS,&cur) )
{
if (valid) {
print_label(label,10);
if (cur==1) {
printf("Chassis intrusion detection ALARM\n");
}else{
printf("Chassis is normal.\n");
}
}
}else{
printf("ERROR: Can't get Chassis data!\n");
}
free_the_label(&label);
}
void print_w83l785ts(const sensors_chip_name *name)
{
char *label;

View File

@ -41,6 +41,7 @@ extern void print_gl520(const sensors_chip_name *name);
extern void print_lm80(const sensors_chip_name *name);
extern void print_lm85(const sensors_chip_name *name);
extern void print_w83781d(const sensors_chip_name *name);
extern void print_w83792d(const sensors_chip_name *name);
extern void print_w83l785ts(const sensors_chip_name *name);
extern void print_maxilife(const sensors_chip_name *name);
extern void print_ddcmon(const sensors_chip_name *name);

View File

@ -361,6 +361,7 @@ struct match matches[] = {
{ "w83637hf", print_w83781d },
{ "w83697hf", print_w83781d },
{ "w83791d", print_w83781d },
{ "w83792d", print_w83792d },
{ "w83l785ts", print_w83l785ts },
{ "as99127f", print_w83781d },
{ "maxilife", print_maxilife },