2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-09-03 07:45:30 +00:00

Patch from Aurelien Jarno:

Please find attached a patch to support the sis5595 with the new 2.6
driver. It should also add support for displaying in4 with a 2.4 kernel.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2869 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare
2005-01-26 21:01:45 +00:00
parent cb2e5b3d27
commit ef5c0563b8
3 changed files with 20 additions and 4 deletions

View File

@@ -846,17 +846,17 @@
#define SENSORS_SIS5595_IN1 2 /* R */
#define SENSORS_SIS5595_IN2 3 /* R */
#define SENSORS_SIS5595_IN3 4 /* R */
#define SENSORS_SIS5595_IN4 4 /* R */
#define SENSORS_SIS5595_IN4 5 /* R */
#define SENSORS_SIS5595_IN0_MIN 11 /* RW */
#define SENSORS_SIS5595_IN1_MIN 12 /* RW */
#define SENSORS_SIS5595_IN2_MIN 13 /* RW */
#define SENSORS_SIS5595_IN3_MIN 14 /* RW */
#define SENSORS_SIS5595_IN4_MIN 14 /* RW */
#define SENSORS_SIS5595_IN4_MIN 15 /* RW */
#define SENSORS_SIS5595_IN0_MAX 21 /* RW */
#define SENSORS_SIS5595_IN1_MAX 22 /* RW */
#define SENSORS_SIS5595_IN2_MAX 23 /* RW */
#define SENSORS_SIS5595_IN3_MAX 24 /* RW */
#define SENSORS_SIS5595_IN4_MAX 24 /* RW */
#define SENSORS_SIS5595_IN4_MAX 25 /* RW */
#define SENSORS_SIS5595_FAN1 31 /* R */
#define SENSORS_SIS5595_FAN2 32 /* R */
#define SENSORS_SIS5595_FAN1_MIN 41 /* RW */

View File

@@ -326,6 +326,8 @@ static const FeatureDescriptor sis5595_features[] = {
{ SENSORS_SIS5595_IN2, SENSORS_SIS5595_IN2_MIN, SENSORS_SIS5595_IN2_MAX, -1 } },
{ fmtVolts_2, rrdF2, DataType_voltage, SIS5595_ALARM_IN3, 0,
{ SENSORS_SIS5595_IN3, SENSORS_SIS5595_IN3_MIN, SENSORS_SIS5595_IN3_MAX, -1 } },
{ fmtVolts_2, rrdF2, DataType_voltage, SIS5595_ALARM_IN4, 0,
{ SENSORS_SIS5595_IN4, SENSORS_SIS5595_IN4_MIN, SENSORS_SIS5595_IN4_MAX, -1 } },
{ fmtFans_0, rrdF0, DataType_rpm, SIS5595_ALARM_FAN1, 0,
{ SENSORS_SIS5595_FAN1, SENSORS_SIS5595_FAN1_MIN, SENSORS_SIS5595_FAN1_DIV, -1 } },
{ fmtFans_0, rrdF0, DataType_rpm, SIS5595_ALARM_FAN2, 0,

View File

@@ -656,6 +656,19 @@ void print_sis5595(const sensors_chip_name *name)
} else
printf("ERROR: Can't get IN3 data!\n");
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_SIS5595_IN4,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_SIS5595_IN4,&cur) &&
!sensors_get_feature(*name,SENSORS_SIS5595_IN4_MIN,&min) &&
!sensors_get_feature(*name,SENSORS_SIS5595_IN4_MAX,&max)) {
if (valid) {
print_label(label,10);
printf("%+6.2f V (min = %+6.2f V, max = %+6.2f V) %s\n",
cur,min,max,alarms&SIS5595_ALARM_IN4?"ALARM":"");
}
} else
/* No error if IN4 is missing as it will happen with 2.6 kernels when
the chip is configured in 4 voltage + 1 temperature sensors. */
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_SIS5595_FAN1,&label,&valid) &&
!sensors_get_feature(*name,SENSORS_SIS5595_FAN1,&cur) &&
@@ -692,7 +705,8 @@ void print_sis5595(const sensors_chip_name *name)
printf( " %s\n", alarms & SIS5595_ALARM_TEMP ? "ALARM" : "" );
}
} else
printf("ERROR: Can't get TEMP data!\n");
/* No error if TEMP is missing as it will happen with 2.6 kernels when
the chip is configured in 5 voltage sensors mode. */
free_the_label(&label);
if (!sensors_get_label_and_valid(*name,SENSORS_SIS5595_ALARMS,&label,&valid)