mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-12-04 21:58:18 +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 in5 (5.14 * @) - 14.91 , (@ + 14.91) / 5.14
|
||||||
# compute in6 (3.14 * @) - 7.71 , (@ + 7.71) / 3.14
|
# compute in6 (3.14 * @) - 7.71 , (@ + 7.71) / 3.14
|
||||||
|
|
||||||
# Depending on your motherboard, you have to choose between three formulae
|
# Depending on your motherboard, you may have to use any of two formulae
|
||||||
# for temp2. Quoting Artur Gawryszczak:
|
# for temp2. Quoting Artur Gawryszczak (edited to reflect subsequent fixes
|
||||||
# "I guess, that the formula "temp2 (@*30/43)+25, (@-25)*43/30" is correct
|
# 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
|
# for those Asus motherboards, which get CPU temperature from internal
|
||||||
# thermal diode (Pentium Coppermine, and above), and "temp2 @*2.0, @/2.0"
|
# thermal diode (Pentium Coppermine, and above), while no formula is needed
|
||||||
# is correct for Athlon/Duron boards, which use a thermistor in the
|
# for Athlon/Duron boards, which use a thermistor in the socket."
|
||||||
# socket."
|
# An alternative formula was then found and reported by Victor G. Marimon.
|
||||||
# The third formula was found and reported by Victor G. Marimon.
|
|
||||||
# Asus CUV4X, Asus A7V8X
|
|
||||||
# compute temp2 (@*30/43)+25, (@-25)*43/30
|
|
||||||
# Asus A7V133, Asus A7M266
|
# 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
|
# 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
|
# See comments above if temp3 looks bad. What works for temp2 is likely
|
||||||
# to work for temp3.
|
# to work for temp3 for dual-CPU boards.
|
||||||
compute temp3 @*2.0, @/2.0
|
|
||||||
|
|
||||||
# Most Asus boards have temperatures settled like that:
|
# Most Asus boards have temperatures settled like that:
|
||||||
label temp1 "M/B Temp"
|
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))
|
((val)+5)/10),0,255))
|
||||||
#define TEMP_FROM_REG(val) (((val)>0x80?(val)-0x100:(val))*10)
|
#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 ALARMS_FROM_REG(val) (val)
|
||||||
#define PWM_FROM_REG(val) (val)
|
#define PWM_FROM_REG(val) (val)
|
||||||
#define PWM_TO_REG(val) (SENSORS_LIMIT((val),0,255))
|
#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;
|
*nrels_mag = 1;
|
||||||
else if (operation == SENSORS_PROC_REAL_READ) {
|
else if (operation == SENSORS_PROC_REAL_READ) {
|
||||||
w83781d_update_client(client);
|
w83781d_update_client(client);
|
||||||
if (data->type == as99127f) {
|
results[0] = LM75_TEMP_FROM_REG(data->temp_add_over[nr]);
|
||||||
results[0] =
|
results[1] = LM75_TEMP_FROM_REG(data->temp_add_hyst[nr]);
|
||||||
AS99127_TEMP_ADD_FROM_REG(data->
|
results[2] = LM75_TEMP_FROM_REG(data->temp_add[nr]);
|
||||||
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]);
|
|
||||||
}
|
|
||||||
*nrels_mag = 3;
|
*nrels_mag = 3;
|
||||||
} else if (operation == SENSORS_PROC_REAL_WRITE) {
|
} else if (operation == SENSORS_PROC_REAL_WRITE) {
|
||||||
if (*nrels_mag >= 1) {
|
if (*nrels_mag >= 1) {
|
||||||
if (data->type == as99127f)
|
data->temp_add_over[nr] =
|
||||||
data->temp_add_over[nr] =
|
LM75_TEMP_TO_REG(results[0]);
|
||||||
AS99127_TEMP_ADD_TO_REG(results[0]);
|
|
||||||
else
|
|
||||||
data->temp_add_over[nr] =
|
|
||||||
LM75_TEMP_TO_REG(results[0]);
|
|
||||||
w83781d_write_value(client,
|
w83781d_write_value(client,
|
||||||
nr ? W83781D_REG_TEMP3_OVER :
|
nr ? W83781D_REG_TEMP3_OVER :
|
||||||
W83781D_REG_TEMP2_OVER,
|
W83781D_REG_TEMP2_OVER,
|
||||||
data->temp_add_over[nr]);
|
data->temp_add_over[nr]);
|
||||||
}
|
}
|
||||||
if (*nrels_mag >= 2) {
|
if (*nrels_mag >= 2) {
|
||||||
if (data->type == as99127f)
|
data->temp_add_hyst[nr] =
|
||||||
data->temp_add_hyst[nr] =
|
LM75_TEMP_TO_REG(results[1]);
|
||||||
AS99127_TEMP_ADD_TO_REG(results[1]);
|
|
||||||
else
|
|
||||||
data->temp_add_hyst[nr] =
|
|
||||||
LM75_TEMP_TO_REG(results[1]);
|
|
||||||
w83781d_write_value(client,
|
w83781d_write_value(client,
|
||||||
nr ? W83781D_REG_TEMP3_HYST :
|
nr ? W83781D_REG_TEMP3_HYST :
|
||||||
W83781D_REG_TEMP2_HYST,
|
W83781D_REG_TEMP2_HYST,
|
||||||
|
|||||||
Reference in new issue
Block a user