mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-20 11:29:31 +00:00
Use standard LSB (0.5 degree C) for AS99127F temp2 and temp3.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2865 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
5d53492dde
commit
64eeab4ffa
2 files changed
+20
-45
No files matched your search
+13
-13
@@ -750,24 +750,24 @@ chip "as99127f-*"
|
||||
# compute in5 (5.14 * @) - 14.91 , (@ + 14.91) / 5.14
|
||||
# compute in6 (3.14 * @) - 7.71 , (@ + 7.71) / 3.14
|
||||
|
||||
# Depending on your motherboard, you have to choose between three formulae
|
||||
# for temp2. Quoting Artur Gawryszczak:
|
||||
# "I guess, that the formula "temp2 (@*30/43)+25, (@-25)*43/30" is correct
|
||||
# Depending on your motherboard, you may have to use any of two formulae
|
||||
# for temp2. Quoting Artur Gawryszczak (edited to reflect subsequent fixes
|
||||
# to the driver):
|
||||
# "I guess, that the formula "(@*15/43)+25, (@-25)*43/15" is correct
|
||||
# for those Asus motherboards, which get CPU temperature from internal
|
||||
# thermal diode (Pentium Coppermine, and above), and "temp2 @*2.0, @/2.0"
|
||||
# is correct for Athlon/Duron boards, which use a thermistor in the
|
||||
# socket."
|
||||
# The third formula was found and reported by Victor G. Marimon.
|
||||
# Asus CUV4X, Asus A7V8X
|
||||
# compute temp2 (@*30/43)+25, (@-25)*43/30
|
||||
# thermal diode (Pentium Coppermine, and above), while no formula is needed
|
||||
# for Athlon/Duron boards, which use a thermistor in the socket."
|
||||
# An alternative formula was then found and reported by Victor G. Marimon.
|
||||
|
||||
# Asus A7V133, Asus A7M266
|
||||
compute temp2 @*2.0, @/2.0
|
||||
# No compute line is needed
|
||||
# Asus CUV4X, Asus A7V8X
|
||||
# compute temp2 (@*15/43)+25, (@-25)*43/15
|
||||
# Asus CUSL2, Asus CUV266-DLS
|
||||
# compute temp2 (@*60/43)+25, (@-25)*43/60
|
||||
# compute temp2 (@*30/43)+25, (@-25)*43/30
|
||||
|
||||
# See comments above if temp3 looks bad. What works for temp2 is likely
|
||||
# to work for temp3.
|
||||
compute temp3 @*2.0, @/2.0
|
||||
# to work for temp3 for dual-CPU boards.
|
||||
|
||||
# Most Asus boards have temperatures settled like that:
|
||||
label temp1 "M/B Temp"
|
||||
|
||||
+7
-32
@@ -200,10 +200,6 @@ static inline u8 FAN_TO_REG(long rpm, int div)
|
||||
((val)+5)/10),0,255))
|
||||
#define TEMP_FROM_REG(val) (((val)>0x80?(val)-0x100:(val))*10)
|
||||
|
||||
#define AS99127_TEMP_ADD_TO_REG(val) (SENSORS_LIMIT((((((val) + 2)*4)/10) \
|
||||
<< 7),0,0xffff))
|
||||
#define AS99127_TEMP_ADD_FROM_REG(val) ((((val) >> 7) * 10) / 4)
|
||||
|
||||
#define ALARMS_FROM_REG(val) (val)
|
||||
#define PWM_FROM_REG(val) (val)
|
||||
#define PWM_TO_REG(val) (SENSORS_LIMIT((val),0,255))
|
||||
@@ -1588,43 +1584,22 @@ void w83781d_temp_add(struct i2c_client *client, int operation,
|
||||
*nrels_mag = 1;
|
||||
else if (operation == SENSORS_PROC_REAL_READ) {
|
||||
w83781d_update_client(client);
|
||||
if (data->type == as99127f) {
|
||||
results[0] =
|
||||
AS99127_TEMP_ADD_FROM_REG(data->
|
||||
temp_add_over[nr]);
|
||||
results[1] =
|
||||
AS99127_TEMP_ADD_FROM_REG(data->
|
||||
temp_add_hyst[nr]);
|
||||
results[2] =
|
||||
AS99127_TEMP_ADD_FROM_REG(data->temp_add[nr]);
|
||||
} else {
|
||||
results[0] =
|
||||
LM75_TEMP_FROM_REG(data->temp_add_over[nr]);
|
||||
results[1] =
|
||||
LM75_TEMP_FROM_REG(data->temp_add_hyst[nr]);
|
||||
results[2] = LM75_TEMP_FROM_REG(data->temp_add[nr]);
|
||||
}
|
||||
results[0] = LM75_TEMP_FROM_REG(data->temp_add_over[nr]);
|
||||
results[1] = LM75_TEMP_FROM_REG(data->temp_add_hyst[nr]);
|
||||
results[2] = LM75_TEMP_FROM_REG(data->temp_add[nr]);
|
||||
*nrels_mag = 3;
|
||||
} else if (operation == SENSORS_PROC_REAL_WRITE) {
|
||||
if (*nrels_mag >= 1) {
|
||||
if (data->type == as99127f)
|
||||
data->temp_add_over[nr] =
|
||||
AS99127_TEMP_ADD_TO_REG(results[0]);
|
||||
else
|
||||
data->temp_add_over[nr] =
|
||||
LM75_TEMP_TO_REG(results[0]);
|
||||
data->temp_add_over[nr] =
|
||||
LM75_TEMP_TO_REG(results[0]);
|
||||
w83781d_write_value(client,
|
||||
nr ? W83781D_REG_TEMP3_OVER :
|
||||
W83781D_REG_TEMP2_OVER,
|
||||
data->temp_add_over[nr]);
|
||||
}
|
||||
if (*nrels_mag >= 2) {
|
||||
if (data->type == as99127f)
|
||||
data->temp_add_hyst[nr] =
|
||||
AS99127_TEMP_ADD_TO_REG(results[1]);
|
||||
else
|
||||
data->temp_add_hyst[nr] =
|
||||
LM75_TEMP_TO_REG(results[1]);
|
||||
data->temp_add_hyst[nr] =
|
||||
LM75_TEMP_TO_REG(results[1]);
|
||||
w83781d_write_value(client,
|
||||
nr ? W83781D_REG_TEMP3_HYST :
|
||||
W83781D_REG_TEMP2_HYST,
|
||||
|
||||
Reference in new issue
Block a user