2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-30 22:05:11 +00:00

Add support for SMSC LPC57B397-NC sensor chip.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2769 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Mark M. Hoffman
2004-11-23 16:20:25 +00:00
parent 5aef60324d
commit 3b64007d60
6 changed files with 100 additions and 0 deletions

View File

@@ -5197,6 +5197,65 @@ void print_lm93(const sensors_chip_name *name)
print_lm93_vid(name, SENSORS_LM93_VID2);
}
/* print_smsc57b397_temp()
* where temp is a sensors feature ID
*/
static void print_smsc57b397_temp(const sensors_chip_name *name, int temp)
{
char *label = NULL;
double cur;
int valid;
if (!sensors_get_label_and_valid(*name,temp,&label,&valid) &&
!sensors_get_feature(*name,temp,&cur)) {
if (valid) {
print_label(label,10);
print_temp_info(cur, 0, 0, SINGLE, 0, 0);
printf("\n");
}
} else
printf("ERROR: Can't get TEMP data! (0x%04x)\n", temp);
free_the_label(&label);
}
#define PRINT_SMSC57B397_TEMP(num, name) \
print_smsc57b397_temp((name), (SENSORS_SMSC57B397_TEMP1 + (num)))
/* print_smsc57b397_fan()
* where fan is a sensors feature ID
*/
static void print_smsc57b397_fan(const sensors_chip_name *name, int fan)
{
char *label = NULL;
double cur;
int valid;
if (!sensors_get_label_and_valid(*name,fan,&label,&valid) &&
!sensors_get_feature(*name,fan,&cur)) {
if (valid) {
print_label(label,10);
printf("%4.0f RPM\n", cur);
}
} else
printf("ERROR: Can't get FAN data! (0x%04x)\n", fan);
free_the_label(&label);
}
#define PRINT_SMSC57B397_FAN(num, name) \
print_smsc57b397_fan((name), (SENSORS_SMSC57B397_FAN1 + (num)))
void print_smsc57b397(const sensors_chip_name *name)
{
int ii;
for (ii=0;ii<4;ii++)
PRINT_SMSC57B397_TEMP(ii, name);
for (ii=0;ii<4;ii++)
PRINT_SMSC57B397_FAN(ii, name);
}
void print_unknown_chip(const sensors_chip_name *name)
{
int a,b,valid;