mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-09-02 15:25:38 +00:00
Add userspace support for the Winbond W83793. Patch contributed by
Yuan Mu (Winbond.) git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4109 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -7,12 +7,14 @@ lm_sensors CHANGES file
|
||||
File etc/sensors.conf.eg: Add an smsc47m192 section
|
||||
Comment out all set statements
|
||||
Add an it8716 section
|
||||
Add a w83793 section
|
||||
Library: Fix device scan when no i2c support is present
|
||||
Add support for W83627EHF voltage inputs and alarms
|
||||
Add support for the smsc47m192 driver
|
||||
Fix all memory leaks (yeah!)
|
||||
Fix no sensors being reported as an error
|
||||
Add support for the IT8716F and IT8718F chips
|
||||
Add support for the W83793 chip (Yuan Mu)
|
||||
Makefile: Don't grep autoconf.h on user-space targets
|
||||
Fix depmod on non-running kernel version
|
||||
Module i2c-ali1535: Drop redundant semaphore (2.6 backport)
|
||||
@@ -49,6 +51,7 @@ lm_sensors CHANGES file
|
||||
Add it8716 and it8718 support
|
||||
Make each it87 fan and fan div optional
|
||||
Print missing w83791d values
|
||||
Add w83793 support (Yuan Mu)
|
||||
Program sensors-detect: Add ServerWorks HT-1000 SMBus detection
|
||||
Add ATI IXP200/300/400 SMBus detection
|
||||
Prevent warning on 64-bit PCI addresses
|
||||
|
@@ -793,6 +793,39 @@ chip "w83792d-*"
|
||||
# ignore fan7
|
||||
# ignore temp3
|
||||
|
||||
|
||||
# Here are configurations for Winbond W83793 chip.
|
||||
chip "w83793-*"
|
||||
|
||||
label in0 "VCoreA"
|
||||
label in1 "VCoreB"
|
||||
label in2 "Vtt"
|
||||
label in5 "+3.3V"
|
||||
label in6 "+12V"
|
||||
label in7 "+5V"
|
||||
label in8 "5VSB"
|
||||
label in9 "VBAT"
|
||||
|
||||
compute in6 12*@ , @/12
|
||||
|
||||
label temp1 "CPU1 Temp"
|
||||
label temp2 "CPU2 Temp"
|
||||
|
||||
# fan1 adjustments examples
|
||||
|
||||
# set fan1_min 1500
|
||||
|
||||
# temp2 limits examples
|
||||
|
||||
# set temp2_max 45
|
||||
# set temp2_max_hyst 40
|
||||
|
||||
# ignore examples
|
||||
|
||||
# ignore fan7
|
||||
# ignore temp3
|
||||
|
||||
|
||||
chip "as99127f-*"
|
||||
|
||||
# Asus won't release a datasheet so this is guesswork.
|
||||
|
82
lib/chips.c
82
lib/chips.c
@@ -1862,6 +1862,87 @@ static sensors_chip_feature w83792d_features[] =
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
|
||||
/* w83793 */
|
||||
#define SENSORS_W83793_FEATURES_IN(nr) \
|
||||
{ SENSORS_W83793_IN(nr), "in" #nr, NOMAP, NOMAP, \
|
||||
R, NOSYSCTL, VALUE(3), 3 }, \
|
||||
{ SENSORS_W83793_IN_MIN(nr), "in" #nr "_min", \
|
||||
SENSORS_W83793_IN(nr), SENSORS_W83793_IN(nr), RW, \
|
||||
NOSYSCTL, VALUE(1), 3 }, \
|
||||
{ SENSORS_W83793_IN_MAX(nr), "in" #nr "_max", \
|
||||
SENSORS_W83793_IN(nr), SENSORS_W83793_IN(nr), RW, \
|
||||
NOSYSCTL, VALUE(2), 3 }, \
|
||||
{ SENSORS_W83793_IN_ALARM(nr), "in" #nr "_alarm", \
|
||||
SENSORS_W83793_IN(nr), NOMAP, R, NOSYSCTL, \
|
||||
VALUE(1), 0 }
|
||||
|
||||
#define SENSORS_W83793_FEATURES_FAN(nr) \
|
||||
{ SENSORS_W83793_FAN(nr), "fan" #nr, NOMAP, NOMAP, \
|
||||
R, NOSYSCTL, VALUE(2), 0 }, \
|
||||
{ SENSORS_W83793_FAN_MIN(nr), "fan" #nr "_min", \
|
||||
SENSORS_W83793_FAN(nr), SENSORS_W83793_FAN(nr), \
|
||||
RW, NOSYSCTL, VALUE(1), 0 }, \
|
||||
{ SENSORS_W83793_FAN_ALARM(nr), "fan" #nr "_alarm", \
|
||||
SENSORS_W83793_FAN(nr), NOMAP, R, NOSYSCTL, \
|
||||
VALUE(1), 0 }
|
||||
|
||||
#define SENSORS_W83793_FEATURES_TEMP(nr) \
|
||||
{ SENSORS_W83793_TEMP(nr), "temp" #nr, NOMAP, NOMAP, \
|
||||
R, NOSYSCTL, VALUE(3), 3 }, \
|
||||
{ SENSORS_W83793_TEMP_CRIT(nr), "temp" #nr "_max", \
|
||||
SENSORS_W83793_TEMP(nr), SENSORS_W83793_TEMP(nr), \
|
||||
RW, NOSYSCTL, VALUE(1), 3 }, \
|
||||
{ SENSORS_W83793_TEMP_CRIT_HYST(nr), "temp" #nr "_max_hyst", \
|
||||
SENSORS_W83793_TEMP(nr), SENSORS_W83793_TEMP(nr), \
|
||||
RW, NOSYSCTL, VALUE(2), 3 }, \
|
||||
{ SENSORS_W83793_TEMP_ALARM(nr), "temp" #nr "_alarm", \
|
||||
SENSORS_W83793_TEMP(nr), NOMAP, R, NOSYSCTL, \
|
||||
VALUE(1), 0 }
|
||||
|
||||
/* No support for Linux 2.4 yet (sysctl) */
|
||||
static sensors_chip_feature w83793_features[] =
|
||||
{
|
||||
SENSORS_W83793_FEATURES_IN(0),
|
||||
SENSORS_W83793_FEATURES_IN(1),
|
||||
SENSORS_W83793_FEATURES_IN(2),
|
||||
SENSORS_W83793_FEATURES_IN(3),
|
||||
SENSORS_W83793_FEATURES_IN(4),
|
||||
SENSORS_W83793_FEATURES_IN(5),
|
||||
SENSORS_W83793_FEATURES_IN(6),
|
||||
SENSORS_W83793_FEATURES_IN(7),
|
||||
SENSORS_W83793_FEATURES_IN(8),
|
||||
SENSORS_W83793_FEATURES_IN(9),
|
||||
SENSORS_W83793_FEATURES_FAN(1),
|
||||
SENSORS_W83793_FEATURES_FAN(2),
|
||||
SENSORS_W83793_FEATURES_FAN(3),
|
||||
SENSORS_W83793_FEATURES_FAN(4),
|
||||
SENSORS_W83793_FEATURES_FAN(5),
|
||||
SENSORS_W83793_FEATURES_FAN(6),
|
||||
SENSORS_W83793_FEATURES_FAN(7),
|
||||
SENSORS_W83793_FEATURES_FAN(8),
|
||||
SENSORS_W83793_FEATURES_FAN(9),
|
||||
SENSORS_W83793_FEATURES_FAN(10),
|
||||
SENSORS_W83793_FEATURES_FAN(11),
|
||||
SENSORS_W83793_FEATURES_FAN(12),
|
||||
SENSORS_W83793_FEATURES_TEMP(1),
|
||||
SENSORS_W83793_FEATURES_TEMP(2),
|
||||
SENSORS_W83793_FEATURES_TEMP(3),
|
||||
SENSORS_W83793_FEATURES_TEMP(4),
|
||||
SENSORS_W83793_FEATURES_TEMP(5),
|
||||
SENSORS_W83793_FEATURES_TEMP(6),
|
||||
{ SENSORS_W83793_VID0, "cpu0_vid", NOMAP, NOMAP,
|
||||
R, NOSYSCTL, VALUE(1), 3 },
|
||||
{ SENSORS_W83793_VID1, "cpu1_vid", NOMAP, NOMAP,
|
||||
R, NOSYSCTL, VALUE(1), 3 },
|
||||
{ SENSORS_W83793_VRM, "vrm", NOMAP, NOMAP,
|
||||
RW, NOSYSCTL, VALUE(1), 1 },
|
||||
{ SENSORS_W83793_CHASSIS, "chassis", NOMAP,
|
||||
NOMAP, RW, NOSYSCTL, VALUE(1), 0 },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
|
||||
static sensors_chip_feature w83l785ts_features[] =
|
||||
{
|
||||
{ SENSORS_W83L785TS_TEMP, "temp", NOMAP, NOMAP,
|
||||
@@ -5877,6 +5958,7 @@ sensors_chip_features sensors_chip_features_list[] =
|
||||
{ SENSORS_W83687THF_PREFIX, w83782d_features }, /* Same as W83627THF */
|
||||
{ SENSORS_W83791D_PREFIX, w83791d_features },
|
||||
{ SENSORS_W83792D_PREFIX, w83792d_features },
|
||||
{ SENSORS_W83793_PREFIX, w83793_features },
|
||||
{ SENSORS_W83L785TS_PREFIX, w83l785ts_features },
|
||||
{ SENSORS_W83627EHF_PREFIX, w83627ehf_features },
|
||||
{ SENSORS_AS99127F_PREFIX, as99127f_features },
|
||||
|
23
lib/chips.h
23
lib/chips.h
@@ -728,6 +728,29 @@
|
||||
#define SENSORS_W83792D_FAN7_DIV 77 /* RW */
|
||||
|
||||
|
||||
/* Winbond W83793R chip */
|
||||
#define SENSORS_W83793_PREFIX "w83793"
|
||||
|
||||
#define SENSORS_W83793_IN(n) (0 + (n)) /* n(0-9) R */
|
||||
#define SENSORS_W83793_IN_MIN(n) (20 + (n)) /* n(0-9) RW */
|
||||
#define SENSORS_W83793_IN_MAX(n) (40 + (n)) /* n(0-9) RW */
|
||||
#define SENSORS_W83793_IN_ALARM(n) (60 + (n)) /* n(0-9) R */
|
||||
|
||||
#define SENSORS_W83793_FAN(n) (80 + (n)) /* n(1-12) R */
|
||||
#define SENSORS_W83793_FAN_MIN(n) (100 + (n)) /* n(1-12) RW */
|
||||
#define SENSORS_W83793_FAN_ALARM(n) (120 + (n)) /* n(1-12) R */
|
||||
|
||||
|
||||
#define SENSORS_W83793_TEMP(n) (140 + (n)) /* n(1-6) R */
|
||||
#define SENSORS_W83793_TEMP_CRIT(n) (160 + (n)) /* n(1-6) RW */
|
||||
#define SENSORS_W83793_TEMP_CRIT_HYST(n) (180 + (n)) /* n(1-6) RW */
|
||||
#define SENSORS_W83793_TEMP_ALARM(n) (200 + (n)) /* n(1-6) R */
|
||||
|
||||
#define SENSORS_W83793_VID0 221 /* R */
|
||||
#define SENSORS_W83793_VID1 222 /* R */
|
||||
#define SENSORS_W83793_VRM 230 /* RW */
|
||||
#define SENSORS_W83793_CHASSIS 240 /* RW */
|
||||
|
||||
|
||||
#define SENSORS_AS99127F_PREFIX "as99127f"
|
||||
|
||||
|
@@ -2958,6 +2958,66 @@ void print_w83627ehf(const sensors_chip_name *name)
|
||||
}
|
||||
}
|
||||
|
||||
void print_w83793(const sensors_chip_name *name)
|
||||
{
|
||||
char *label;
|
||||
int i, valid;
|
||||
double cur, min, max, over, hyst, alarm;
|
||||
|
||||
for (i = 0; i < 10; i++) {
|
||||
if (!sensors_get_label_and_valid(*name,SENSORS_W83793_IN(i),
|
||||
&label, &valid) &&
|
||||
!sensors_get_feature(*name, SENSORS_W83793_IN(i), &cur) &&
|
||||
!sensors_get_feature(*name, SENSORS_W83793_IN_MIN(i), &min) &&
|
||||
!sensors_get_feature(*name, SENSORS_W83793_IN_MAX(i), &max) &&
|
||||
!sensors_get_feature(*name, SENSORS_W83793_IN_ALARM(i), &alarm)) {
|
||||
if (valid) {
|
||||
print_label(label, 10);
|
||||
printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s\n",
|
||||
cur, min, max, alarm ? "ALARM" : "");
|
||||
}
|
||||
} else
|
||||
printf("ERROR: Can't get IN%d data!\n", i);
|
||||
free(label);
|
||||
}
|
||||
|
||||
for (i = 1; i <= 12; i++) {
|
||||
if (!sensors_get_label_and_valid(*name, SENSORS_W83793_FAN(i),
|
||||
&label, &valid) &&
|
||||
!sensors_get_feature(*name, SENSORS_W83793_FAN(i), &cur) &&
|
||||
!sensors_get_feature(*name, SENSORS_W83793_FAN_MIN(i), &min) &&
|
||||
!sensors_get_feature(*name, SENSORS_W83793_FAN_ALARM(i), &alarm)) {
|
||||
if (valid) {
|
||||
print_label(label, 10);
|
||||
printf("%4.0f RPM (min = %4.0f RPM) %s\n",
|
||||
cur, min, alarm ? "ALARM" : "");
|
||||
}
|
||||
} else if (i <= 5)
|
||||
printf("ERROR: Can't get FAN%d data!\n", i);
|
||||
free(label);
|
||||
}
|
||||
|
||||
for (i = 1; i <= 6; i++) {
|
||||
if (!sensors_get_label_and_valid(*name, SENSORS_W83793_TEMP(i),
|
||||
&label, &valid) &&
|
||||
!sensors_get_feature(*name, SENSORS_W83793_TEMP(i), &cur) &&
|
||||
!sensors_get_feature(*name, SENSORS_W83793_TEMP_CRIT(i), &over) &&
|
||||
!sensors_get_feature(*name, SENSORS_W83793_TEMP_CRIT_HYST(i), &hyst) &&
|
||||
!sensors_get_feature(*name, SENSORS_W83793_TEMP_ALARM(i), &alarm)) {
|
||||
if (valid) {
|
||||
print_label(label, 10);
|
||||
print_temp_info(cur, over, hyst, HYST, i <= 4 ? 1 : 0, i <= 4 ? 1 : 0);
|
||||
printf(" %s\n", alarm ? "ALARM" : "");
|
||||
}
|
||||
} else
|
||||
printf("ERROR: Can't get TEMP%d data!\n", i);
|
||||
free(label);
|
||||
}
|
||||
|
||||
print_vid_info(name, SENSORS_W83793_VID0, SENSORS_W83793_VRM);
|
||||
print_vid_info(name, SENSORS_W83793_VID1, SENSORS_W83793_VRM);
|
||||
}
|
||||
|
||||
void print_maxilife(const sensors_chip_name *name)
|
||||
{
|
||||
char *label;
|
||||
|
@@ -42,6 +42,7 @@ 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_w83793(const sensors_chip_name *name);
|
||||
extern void print_w83l785ts(const sensors_chip_name *name);
|
||||
extern void print_w83627ehf(const sensors_chip_name *name);
|
||||
extern void print_maxilife(const sensors_chip_name *name);
|
||||
|
@@ -374,6 +374,7 @@ struct match matches[] = {
|
||||
{ "w83627ehf", print_w83627ehf },
|
||||
{ "w83791d", print_w83781d },
|
||||
{ "w83792d", print_w83792d },
|
||||
{ "w83793", print_w83793 },
|
||||
{ "w83l785ts", print_w83l785ts },
|
||||
{ "as99127f", print_w83781d },
|
||||
{ "maxilife", print_maxilife },
|
||||
|
Reference in New Issue
Block a user