mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-31 14:25:39 +00:00
Add preliminary support for the w83627ehf.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2950 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
72
lib/chips.c
72
lib/chips.c
@@ -40,6 +40,7 @@
|
||||
#define NOMAP SENSORS_NO_MAPPING
|
||||
#define R SENSORS_MODE_R
|
||||
#define RW SENSORS_MODE_RW
|
||||
#define NOSYSCTL 0
|
||||
|
||||
static sensors_chip_feature lm78_features[] =
|
||||
{
|
||||
@@ -1869,6 +1870,76 @@ static sensors_chip_feature w83l785ts_features[] =
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
/* No support for Linux 2.4 yet (sysctl) */
|
||||
static sensors_chip_feature w83627ehf_features[] =
|
||||
{
|
||||
{ SENSORS_W83627EHF_FAN1, "fan1", NOMAP, NOMAP,
|
||||
R, NOSYSCTL, VALUE(2), 0 },
|
||||
{ SENSORS_W83627EHF_FAN2, "fan2", NOMAP, NOMAP,
|
||||
R, NOSYSCTL, VALUE(2), 0 },
|
||||
{ SENSORS_W83627EHF_FAN3, "fan3", NOMAP, NOMAP,
|
||||
R, NOSYSCTL, VALUE(2), 0 },
|
||||
{ SENSORS_W83627EHF_FAN4, "fan4", NOMAP, NOMAP,
|
||||
R, NOSYSCTL, VALUE(2), 0 },
|
||||
{ SENSORS_W83627EHF_FAN5, "fan5", NOMAP, NOMAP,
|
||||
R, NOSYSCTL, VALUE(2), 0 },
|
||||
{ SENSORS_W83627EHF_FAN1_MIN, "fan1_min",
|
||||
SENSORS_W83627EHF_FAN1, SENSORS_W83627EHF_FAN1,
|
||||
RW, NOSYSCTL, VALUE(1), 0 },
|
||||
{ SENSORS_W83627EHF_FAN2_MIN, "fan2_min",
|
||||
SENSORS_W83627EHF_FAN2, SENSORS_W83627EHF_FAN2,
|
||||
RW, NOSYSCTL, VALUE(1), 0 },
|
||||
{ SENSORS_W83627EHF_FAN3_MIN, "fan3_min",
|
||||
SENSORS_W83627EHF_FAN3, SENSORS_W83627EHF_FAN3,
|
||||
RW, NOSYSCTL, VALUE(1), 0 },
|
||||
{ SENSORS_W83627EHF_FAN4_MIN, "fan4_min",
|
||||
SENSORS_W83627EHF_FAN4, SENSORS_W83627EHF_FAN4,
|
||||
RW, NOSYSCTL, VALUE(1), 0 },
|
||||
{ SENSORS_W83627EHF_FAN5_MIN, "fan5_min",
|
||||
SENSORS_W83627EHF_FAN5, SENSORS_W83627EHF_FAN5,
|
||||
RW, NOSYSCTL, VALUE(1), 0 },
|
||||
{ SENSORS_W83627EHF_FAN1_DIV, "fan1_div",
|
||||
SENSORS_W83627EHF_FAN1, NOMAP,
|
||||
R, NOSYSCTL, VALUE(1), 0 },
|
||||
{ SENSORS_W83627EHF_FAN2_DIV, "fan2_div",
|
||||
SENSORS_W83627EHF_FAN2, NOMAP,
|
||||
R, NOSYSCTL, VALUE(2), 0 },
|
||||
{ SENSORS_W83627EHF_FAN3_DIV, "fan3_div",
|
||||
SENSORS_W83627EHF_FAN3, NOMAP,
|
||||
R, NOSYSCTL, VALUE(3), 0 },
|
||||
{ SENSORS_W83627EHF_FAN4_DIV, "fan4_div",
|
||||
SENSORS_W83627EHF_FAN4, NOMAP,
|
||||
R, NOSYSCTL, VALUE(4), 0 },
|
||||
{ SENSORS_W83627EHF_FAN5_DIV, "fan5_div",
|
||||
SENSORS_W83627EHF_FAN5, NOMAP,
|
||||
R, NOSYSCTL, VALUE(5), 0 },
|
||||
{ SENSORS_W83627EHF_TEMP1, "temp1", NOMAP, NOMAP,
|
||||
R, NOSYSCTL, VALUE(3), 0 },
|
||||
{ SENSORS_W83627EHF_TEMP2, "temp2", NOMAP, NOMAP,
|
||||
R, NOSYSCTL, VALUE(3), 0 },
|
||||
{ SENSORS_W83627EHF_TEMP3, "temp3", NOMAP, NOMAP,
|
||||
R, NOSYSCTL, VALUE(3), 0 },
|
||||
{ SENSORS_W83627EHF_TEMP1_OVER, "temp1_over",
|
||||
SENSORS_W83627EHF_TEMP1, SENSORS_W83627EHF_TEMP1,
|
||||
RW, NOSYSCTL, VALUE(1), 0 },
|
||||
{ SENSORS_W83627EHF_TEMP2_OVER, "temp2_over",
|
||||
SENSORS_W83627EHF_TEMP2, SENSORS_W83627EHF_TEMP2,
|
||||
RW, NOSYSCTL, VALUE(1), 1 },
|
||||
{ SENSORS_W83627EHF_TEMP3_OVER, "temp3_over",
|
||||
SENSORS_W83627EHF_TEMP3, SENSORS_W83627EHF_TEMP3,
|
||||
RW, NOSYSCTL, VALUE(1), 1 },
|
||||
{ SENSORS_W83627EHF_TEMP1_HYST, "temp1_hyst",
|
||||
SENSORS_W83627EHF_TEMP1, SENSORS_W83627EHF_TEMP1,
|
||||
RW, NOSYSCTL, VALUE(2), 0 },
|
||||
{ SENSORS_W83627EHF_TEMP2_HYST, "temp2_hyst",
|
||||
SENSORS_W83627EHF_TEMP2, SENSORS_W83627EHF_TEMP2,
|
||||
RW, NOSYSCTL, VALUE(2), 1 },
|
||||
{ SENSORS_W83627EHF_TEMP3_HYST, "temp3_hyst",
|
||||
SENSORS_W83627EHF_TEMP3, SENSORS_W83627EHF_TEMP3,
|
||||
RW, NOSYSCTL, VALUE(2), 1 },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
static sensors_chip_feature adm9240_features[] =
|
||||
{
|
||||
{ SENSORS_ADM9240_IN0, "2.5V", NOMAP, NOMAP,
|
||||
@@ -5451,6 +5522,7 @@ sensors_chip_features sensors_chip_features_list[] =
|
||||
{ SENSORS_W83791D_PREFIX, w83791d_features },
|
||||
{ SENSORS_W83792D_PREFIX, w83792d_features },
|
||||
{ SENSORS_W83L785TS_PREFIX, w83l785ts_features },
|
||||
{ SENSORS_W83627EHF_PREFIX, w83627ehf_features },
|
||||
{ SENSORS_AS99127F_PREFIX, as99127f_features },
|
||||
{ SENSORS_ASB100_PREFIX, asb100_features },
|
||||
{ SENSORS_ADM9240_PREFIX, adm9240_features },
|
||||
|
30
lib/chips.h
30
lib/chips.h
@@ -842,6 +842,36 @@
|
||||
#define SENSORS_W83L785TS_TEMP_OVER 52 /* R for now */
|
||||
|
||||
|
||||
/* Winbond W83627EHF Super-I/O chips */
|
||||
|
||||
#define SENSORS_W83627EHF_PREFIX "w83627ehf"
|
||||
|
||||
#define SENSORS_W83627EHF_FAN1 31 /* R */
|
||||
#define SENSORS_W83627EHF_FAN2 32 /* R */
|
||||
#define SENSORS_W83627EHF_FAN3 33 /* R */
|
||||
#define SENSORS_W83627EHF_FAN4 34 /* R */
|
||||
#define SENSORS_W83627EHF_FAN5 35 /* R */
|
||||
#define SENSORS_W83627EHF_FAN1_MIN 41 /* RW */
|
||||
#define SENSORS_W83627EHF_FAN2_MIN 42 /* RW */
|
||||
#define SENSORS_W83627EHF_FAN3_MIN 43 /* RW */
|
||||
#define SENSORS_W83627EHF_FAN4_MIN 44 /* RW */
|
||||
#define SENSORS_W83627EHF_FAN5_MIN 45 /* RW */
|
||||
#define SENSORS_W83627EHF_FAN1_DIV 51 /* RW */
|
||||
#define SENSORS_W83627EHF_FAN2_DIV 52 /* RW */
|
||||
#define SENSORS_W83627EHF_FAN3_DIV 53 /* RW */
|
||||
#define SENSORS_W83627EHF_FAN4_DIV 54 /* RW */
|
||||
#define SENSORS_W83627EHF_FAN5_DIV 55 /* RW */
|
||||
#define SENSORS_W83627EHF_TEMP1 61 /* R */
|
||||
#define SENSORS_W83627EHF_TEMP2 62 /* R */
|
||||
#define SENSORS_W83627EHF_TEMP3 63 /* R */
|
||||
#define SENSORS_W83627EHF_TEMP1_OVER 71 /* RW */
|
||||
#define SENSORS_W83627EHF_TEMP2_OVER 72 /* RW */
|
||||
#define SENSORS_W83627EHF_TEMP3_OVER 73 /* RW */
|
||||
#define SENSORS_W83627EHF_TEMP1_HYST 81 /* RW */
|
||||
#define SENSORS_W83627EHF_TEMP2_HYST 82 /* RW */
|
||||
#define SENSORS_W83627EHF_TEMP3_HYST 83 /* RW */
|
||||
|
||||
|
||||
/* Analog Devices ADM9240 chips */
|
||||
|
||||
#define SENSORS_ADM9240_PREFIX "adm9240"
|
||||
|
@@ -2809,6 +2809,47 @@ void print_w83l785ts(const sensors_chip_name *name)
|
||||
free_the_label(&label);
|
||||
}
|
||||
|
||||
void print_w83627ehf(const sensors_chip_name *name)
|
||||
{
|
||||
char *label;
|
||||
int i, valid;
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
double cur, min, div;
|
||||
if (!sensors_get_label_and_valid(*name, SENSORS_W83627EHF_FAN1+i,
|
||||
&label, &valid)
|
||||
&& !sensors_get_feature(*name, SENSORS_W83627EHF_FAN1+i, &cur)
|
||||
&& !sensors_get_feature(*name, SENSORS_W83627EHF_FAN1_MIN+i, &min)) {
|
||||
if (valid) {
|
||||
print_label(label,10);
|
||||
printf("%4.0f RPM (min = %4.0f RPM", cur, min);
|
||||
if (!sensors_get_feature(*name, SENSORS_W83627EHF_FAN1_DIV+i, &div))
|
||||
printf(", div = %1.0f", div);
|
||||
printf(")\n");
|
||||
}
|
||||
} else if (i < 3)
|
||||
printf("ERROR: Can't get FAN%d data!\n", i + 1);
|
||||
free_the_label(&label);
|
||||
}
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
double cur, over, hyst;
|
||||
if (!sensors_get_label_and_valid(*name, SENSORS_W83627EHF_TEMP1+i,
|
||||
&label, &valid)
|
||||
&& !sensors_get_feature(*name, SENSORS_W83627EHF_TEMP1+i, &cur)
|
||||
&& !sensors_get_feature(*name, SENSORS_W83627EHF_TEMP1_OVER+i, &over)
|
||||
&& !sensors_get_feature(*name, SENSORS_W83627EHF_TEMP1_HYST+i, &hyst)) {
|
||||
if (valid) {
|
||||
print_label(label,10);
|
||||
print_temp_info(cur, over, hyst, HYST, i ? 1 : 0, i ? 1 : 0);
|
||||
printf("\n");
|
||||
}
|
||||
} else
|
||||
printf("ERROR: Can't get TEMP%d data!\n", i + 1);
|
||||
free_the_label(&label);
|
||||
}
|
||||
}
|
||||
|
||||
void print_maxilife(const sensors_chip_name *name)
|
||||
{
|
||||
char *label = NULL;
|
||||
|
@@ -43,6 +43,7 @@ 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_w83627ehf(const sensors_chip_name *name);
|
||||
extern void print_maxilife(const sensors_chip_name *name);
|
||||
extern void print_ddcmon(const sensors_chip_name *name);
|
||||
extern void print_eeprom(const sensors_chip_name *name);
|
||||
|
@@ -360,6 +360,7 @@ struct match matches[] = {
|
||||
{ "w83627thf", print_w83781d },
|
||||
{ "w83637hf", print_w83781d },
|
||||
{ "w83697hf", print_w83781d },
|
||||
{ "w83627ehf", print_w83627ehf },
|
||||
{ "w83791d", print_w83781d },
|
||||
{ "w83792d", print_w83792d },
|
||||
{ "w83l785ts", print_w83l785ts },
|
||||
|
Reference in New Issue
Block a user