2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-31 06:15:15 +00:00

(jrm): New driver and other support for the Maxim MAX6650 and MAX6651 chips.

Mainly targetted (and tested) with the 6651, but should work with
       the MAX6550.

       See doc/chips/max6650 for notes, bugs, assumptions, etc.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1987 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
John Morris
2003-08-31 20:45:12 +00:00
parent ebb1dc9a20
commit 45576fb3fd
11 changed files with 786 additions and 2 deletions

View File

@@ -4511,6 +4511,55 @@ void print_xeontemp(const sensors_chip_name *name)
free_the_label(&label);
}
void print_max6650(const sensors_chip_name *name)
{
char *label = NULL;
double tach, speed;
int valid, i;
static const struct
{
int tag;
char *name;
}
tach_list[] =
{
{ SENSORS_MAX6650_FAN1_TACH, "FAN1" },
{ SENSORS_MAX6650_FAN2_TACH, "FAN2" },
{ SENSORS_MAX6650_FAN3_TACH, "FAN3" },
{ SENSORS_MAX6650_FAN4_TACH, "FAN4" }
};
/* Display full config for fan1, which is controlled */
if (!sensors_get_label_and_valid(*name,tach_list[0].tag,&label,&valid) &&
!sensors_get_feature(*name,tach_list[0].tag,&tach) &&
!sensors_get_feature(*name,SENSORS_MAX6650_SPEED,&speed)) {
if (valid) {
print_label(label,10);
printf("configured %4.0f RPM, actual %4.0f RPM.\n", speed, tach);
}
} else
printf("ERROR: Can't get %s data!\n", tach_list[i].name);
free_the_label(&label);
/* Just display the measured speed for the other three, uncontrolled fans */
for (i = 1; i < 4; i++)
{
if (!sensors_get_label_and_valid(*name,tach_list[i].tag,&label,&valid) &&
!sensors_get_feature(*name,tach_list[i].tag,&tach)) {
if (valid) {
print_label(label,10);
printf("%4.0f RPM \n", tach);
}
} else
printf("ERROR: Can't get %s data!\n", tach_list[i].name);
free_the_label(&label);
}
}
void print_unknown_chip(const sensors_chip_name *name)
{
int a,b,valid;