From 0ca078c43aed260ee3cc985a4445343b739b44df Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Mon, 23 Aug 2004 18:44:15 +0000 Subject: [PATCH] Fix lm87 section, will help with the 2.6 driver. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2670 7894878c-1315-0410-8ee3-d5d059ff63e0 --- etc/sensors.conf.eg | 95 ++++++++++++++++++++++----------------------- lib/chips.c | 22 +++++------ 2 files changed, 57 insertions(+), 60 deletions(-) diff --git a/etc/sensors.conf.eg b/etc/sensors.conf.eg index 8657757a..b68b3c64 100644 --- a/etc/sensors.conf.eg +++ b/etc/sensors.conf.eg @@ -1235,8 +1235,9 @@ chip "lm87-*" # driver computations are correct. Therefore they do not need to # be overridden here. # -# Note: AIN1 (-12?), AIN2 (-5?) and CPU2_temp require changing +# Note: AIN1 (-12?), AIN2 (-5?) and temp3 require changing # #defines in the driver and recompiling!!! +# This does not apply to the Linux 2.6 driver. # # This chip has non-standard entries in lib/chips.c so # the feature names are quite different from other chips. @@ -1250,57 +1251,53 @@ chip "lm87-*" # # Warning - feature names starting with a number must be enclosed # with double quotes. -# -# It is unlikely you will need to use the following 6 lines (see above) -# label "2.5V" "xxx" -# label Vccp1 "xxx" -# label "3.3V" "xxx" -# label "5V" "xxx" -# label "12V" "xxx" -# label Vccp2 "xxx" -# label fan1 "xxx" -# label fan2 "xxx" -# label temp1 "xxx" -# label CPU_Temp "xxx" -# label CPU2_Temp "xxx" -# -# set AmbTemp_min xxx -# set Vccp1_min xxx -# set "3.3V_min" xxx -# set "5V_min" xxx -# set "12V_min" xxx -# set Vccp2_min xxx -# -# set AmbTemp_max xxx -# set Vccp1_max xxx -# set "3.3V_max" xxx -# set "5V_max" xxx -# set "12V_max" xxx -# set Vccp2_max xxx -# -# set fan1_div xxx -# set fan2_div xxx -# set fan1_min xxx -# set fan2_min xxx -# set temp1_min xxx -# set temp1_max xxx -# set temp2_min xxx -# set temp2_max xxx -# set temp3_min xxx -# set temp3_max xxx + label "2.5V" "+2.5V" + label Vccp1 "VCore" + label "3.3V" "+3.3V" + label "5V" "+5V" + label "12V" "+12V" +# label Vccp2 "VCore2" -# It is unlikely you will need to use the following 6 lines (see above) -# compute "2.5V" xxx -# compute Vccp1 xxx -# compute "3.3V" xxx -# compute "5V" xxx -# compute "12V" xxx -# compute Vccp2 xxx + label fan1 "CPU Fan" +# label fan2 "Case Fan" + label temp1 "M/B Temp" + label CPU_Temp "CPU Temp" +# label temp3 "AUX Temp" -# compute temp1 xxx -# compute CPU_Temp xxx -# compute CPU2_Temp xxx + set Vccp1_min vid * 0.95 + set Vccp1_max vid * 1.05 + set "3.3V_min" 3.3 * 0.92 + set "3.3V_max" 3.3 * 1.08 + set "5V_min" 5 * 0.92 + set "5V_max" 5 * 1.08 + set "12V_min" 12 * 0.90 + set "12V_max" 12 * 1.10 + +# These ones are mutually exclusive with temp3. If you have temp3, +# comment out these lines as they will trigger errors on "sensors -s". + set "2.5V_min" 2.5 * 0.92 + set "2.5V_max" 2.5 * 1.08 + set Vccp2_min vid * 0.95 + set Vccp2_max vid * 1.05 + +# Increase fan clock dividers if your fans read 0 RPM while you know +# they are connected and running. +# set fan1_div 4 +# set fan2_div 4 + + set fan1_min 3000 + set fan2_min 3000 + + set temp1_min 5 + set temp1_max 65 + set temp2_min 5 + set temp2_max 70 + +# Uncomment if you actually have temp3 (which means you don't have 2.5V +# nor Vccp2, as they are mutually exclusive). +# set temp3_min 5 +# set temp3_max 70 # LM87 AIN1 and AIN2 Section # As described above, the driver must be recompiled to use either or diff --git a/lib/chips.c b/lib/chips.c index bb696cf7..7f971a6a 100644 --- a/lib/chips.c +++ b/lib/chips.c @@ -3619,10 +3619,10 @@ static sensors_chip_feature lm87_features[] = { SENSORS_LM87_IN5, "Vccp2", NOMAP, NOMAP, R, LM87_SYSCTL_IN5, VALUE(3), 2, "in5_input", 3 }, { SENSORS_LM87_AIN1, "AIN1", NOMAP, NOMAP, - R, LM87_SYSCTL_AIN1, VALUE(3), 0 }, + R, LM87_SYSCTL_AIN1, VALUE(3), 0, "in6_input", 3 }, { SENSORS_LM87_AIN2, "AIN2", NOMAP, NOMAP, - R, LM87_SYSCTL_AIN2, VALUE(3), 0 }, - { SENSORS_LM87_IN0_MIN, "AmbTemp_min", SENSORS_LM87_IN0, + R, LM87_SYSCTL_AIN2, VALUE(3), 0, "in7_input", 3 }, + { SENSORS_LM87_IN0_MIN, "2.5V_min", SENSORS_LM87_IN0, SENSORS_LM87_IN0, RW, LM87_SYSCTL_IN0, VALUE(1), 2, "in0_min", 3 }, { SENSORS_LM87_IN1_MIN, "Vccp1_min", SENSORS_LM87_IN1, @@ -3642,11 +3642,11 @@ static sensors_chip_feature lm87_features[] = LM87_SYSCTL_IN5, VALUE(1), 2, "in5_min", 3 }, { SENSORS_LM87_AIN1_MIN, "AIN1_min", SENSORS_LM87_AIN1, SENSORS_LM87_AIN1, RW, - LM87_SYSCTL_AIN1, VALUE(1), 0 }, + LM87_SYSCTL_AIN1, VALUE(1), 0, "in6_min", 3 }, { SENSORS_LM87_AIN2_MIN, "AIN2_min", SENSORS_LM87_AIN2, SENSORS_LM87_AIN2, RW, - LM87_SYSCTL_AIN2, VALUE(1), 0 }, - { SENSORS_LM87_IN0_MAX, "AmbTemp_max", SENSORS_LM87_IN0, + LM87_SYSCTL_AIN2, VALUE(1), 0, "in7_min", 3 }, + { SENSORS_LM87_IN0_MAX, "2.5V_max", SENSORS_LM87_IN0, SENSORS_LM87_IN0, RW, LM87_SYSCTL_IN0, VALUE(2), 2, "in0_max", 3 }, { SENSORS_LM87_IN1_MAX, "Vccp1_max", SENSORS_LM87_IN1, @@ -3666,10 +3666,10 @@ static sensors_chip_feature lm87_features[] = LM87_SYSCTL_IN5, VALUE(2), 2, "in5_max", 3 }, { SENSORS_LM87_AIN1_MAX, "AIN1_max", SENSORS_LM87_AIN1, SENSORS_LM87_AIN1, RW, - LM87_SYSCTL_AIN1, VALUE(2), 0 }, + LM87_SYSCTL_AIN1, VALUE(2), 0, "in6_max", 3 }, { SENSORS_LM87_AIN2_MAX, "AIN2_max", SENSORS_LM87_AIN2, SENSORS_LM87_AIN2, RW, - LM87_SYSCTL_AIN2, VALUE(2), 0 }, + LM87_SYSCTL_AIN2, VALUE(2), 0, "in7_max", 3 }, { SENSORS_LM87_FAN1, "fan1", NOMAP, NOMAP, R, LM87_SYSCTL_FAN1, VALUE(2), 0 }, { SENSORS_LM87_FAN2, "fan2", NOMAP, NOMAP, @@ -3680,8 +3680,8 @@ static sensors_chip_feature lm87_features[] = { SENSORS_LM87_FAN2_MIN, "fan2_min", SENSORS_LM87_FAN2, SENSORS_LM87_FAN2, RW, LM87_SYSCTL_FAN2, VALUE(1), 0 }, - { SENSORS_LM87_TEMP3, "CPU2_Temp", NOMAP, NOMAP, - R, LM87_SYSCTL_TEMP3, VALUE(3), 1, "temp3_input", 3 }, + { SENSORS_LM87_TEMP3, "temp3", NOMAP, NOMAP, + R, LM87_SYSCTL_TEMP3, VALUE(3), 1 }, { SENSORS_LM87_TEMP2, "CPU_Temp", NOMAP, NOMAP, R, LM87_SYSCTL_TEMP2, VALUE(3), 1, "temp2_input", 3 }, { SENSORS_LM87_TEMP1, "temp1", NOMAP, NOMAP, @@ -3719,7 +3719,7 @@ static sensors_chip_feature lm87_features[] = R, LM87_SYSCTL_ALARMS, VALUE(1), 0 }, { SENSORS_LM87_ANALOG_OUT, "analog_out", NOMAP, NOMAP, RW, - LM87_SYSCTL_ANALOG_OUT, VALUE(1), 0 }, + LM87_SYSCTL_ANALOG_OUT, VALUE(1), 0 , "aout_output", 3 }, { 0 } };