mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-08 16:11:26 +00:00
Several fixes to the fschmd support
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4952 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
c681f7c79c
commit
f945c74d50
3 files changed
+18
-12
No files matched your search
+1
-1
@@ -6342,7 +6342,7 @@ static sensors_chip_feature f71882fg_features[] =
|
||||
NOMAP, NOMAP, R }, \
|
||||
NOSYSCTL, VALUE(1), 0 }, \
|
||||
{ { SENSORS_FSCHMD_FAN_DIV(nr), "fan" #nr "_div", \
|
||||
SENSORS_FSCHMD_FAN(nr), NOMAP, R }, \
|
||||
SENSORS_FSCHMD_FAN(nr), NOMAP, RW }, \
|
||||
NOSYSCTL, VALUE(nr), 0 }, \
|
||||
{ { SENSORS_FSCHMD_FAN_ALARM(nr), "fan" #nr "_alarm", \
|
||||
SENSORS_FSCHMD_FAN(nr), NOMAP, R }, \
|
||||
|
||||
+1
-2
@@ -455,8 +455,7 @@ static int getsysname(const sensors_chip_feature *feature, char *sysname,
|
||||
|
||||
/* give up, use old name (probably won't work though...) */
|
||||
/* known to be the same:
|
||||
"alarms", "beep_enable", "vrm", "fan%d_div" (except old fscxxx drivers
|
||||
which use fan%d_ripple, fixed using altsysname for new drv. GRR)
|
||||
"alarms", "beep_enable", "vrm", "fan%d_div"
|
||||
*/
|
||||
strcpy(sysname, name);
|
||||
*sysmag = feature->scaling;
|
||||
|
||||
+16
-9
@@ -6354,10 +6354,9 @@ static void print_fschmd_fan(const sensors_chip_name *name, int i,
|
||||
printf("%4.0f RPM (div = %1.0f) %s\n", cur, fdiv,
|
||||
alarm ? "ALARM" : "");
|
||||
}
|
||||
}
|
||||
/* no error on failure as we get used for various FSC chips and not all
|
||||
have the same amount of fan sensors */
|
||||
|
||||
} else {
|
||||
printf("ERROR: Can't get fan%d data!\n", i);
|
||||
}
|
||||
free(label);
|
||||
}
|
||||
|
||||
@@ -6387,25 +6386,33 @@ static void print_fschmd_temp(const sensors_chip_name *name, int i,
|
||||
printf("%s\n", alarm ? "ALARM" : "");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
printf("ERROR: Can't get temp%d data!\n", i);
|
||||
}
|
||||
/* no error on failure as we get used for various FSC chips and not all
|
||||
have the same amount of temp sensors */
|
||||
|
||||
free(label);
|
||||
}
|
||||
|
||||
void print_fschmd(const sensors_chip_name *name)
|
||||
{
|
||||
int i;
|
||||
int no_fan_sensors, no_temp_sensors;
|
||||
|
||||
if (!strcmp(name->prefix,"fschmd")) {
|
||||
no_fan_sensors = 5;
|
||||
no_temp_sensors = 5;
|
||||
} else { /* fschrc */
|
||||
no_fan_sensors = 4;
|
||||
no_temp_sensors = 3;
|
||||
}
|
||||
|
||||
for (i = 0; i <= 2; i++)
|
||||
print_fschmd_in(name, i, SENSORS_FSCHMD_IN(i));
|
||||
|
||||
for (i = 1; i <= 6; i++)
|
||||
for (i = 1; i <= no_fan_sensors; i++)
|
||||
print_fschmd_fan(name, i, SENSORS_FSCHMD_FAN(i),
|
||||
SENSORS_FSCHMD_FAN_DIV(i));
|
||||
|
||||
for (i = 1; i <= 5; i++)
|
||||
for (i = 1; i <= no_temp_sensors; i++)
|
||||
print_fschmd_temp(name, i, SENSORS_FSCHMD_TEMP(i),
|
||||
SENSORS_FSCHMD_TEMP_MAX(i));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user