mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-20 19:41:47 +00:00
Resolved old fan_div related bug in lm80 and w83781 modules.
When computing the fan rotation speed, the register value of the dividers was used, instead of the value it represents. I'ev fixed this ages ago for the LM80 driver, but it seems I had forgotten to fix it at other places. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@149 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
dabc5bfbb6
commit
95961de807
5 files changed
+29
-12
No files matched your search
@@ -13,14 +13,19 @@ ask CVS about it:
|
||||
for example:
|
||||
cvs diff -r V2-0-0 -r V2-0-1 -u
|
||||
|
||||
2.1.2 (199801??)
|
||||
Modules lm80.o, w83781d.o: fan-related Segmentation fault corrected
|
||||
|
||||
2.1.1 (19990107)
|
||||
Module i2c-proc.o: Hack to make /proc/bus/ possible for kernels 2.0.35
|
||||
and older
|
||||
Module gl518sm.o: Miscelaneous bugs and problems solved
|
||||
Program isadump: NEW
|
||||
|
||||
2.1.0 (19981230)
|
||||
Library: Completely NEW
|
||||
Program sensors: NEW
|
||||
Program grab_busses: NEW
|
||||
Program decode-dimms: More information
|
||||
Module bit-mb.o: Removed spurious semicolon; now runs on more VIA chipsets
|
||||
Module w83781d.o: NEW
|
||||
|
||||
+6
-3
@@ -548,12 +548,15 @@ void lm80_fan(struct i2c_client *client, int operation, int ctl_name,
|
||||
*nrels_mag = 0;
|
||||
else if (operation == SENSORS_PROC_REAL_READ) {
|
||||
lm80_update_client(client);
|
||||
results[0] = FAN_FROM_REG(data->fan_min[nr-1],data->fan_div[nr-1]);
|
||||
results[1] = FAN_FROM_REG(data->fan[nr-1],data->fan_div[nr-1]);
|
||||
results[0] = FAN_FROM_REG(data->fan_min[nr-1],
|
||||
DIV_FROM_REG(data->fan_div[nr-1]));
|
||||
results[1] = FAN_FROM_REG(data->fan[nr-1],
|
||||
DIV_FROM_REG(data->fan_div[nr-1]));
|
||||
*nrels_mag = 2;
|
||||
} else if (operation == SENSORS_PROC_REAL_WRITE) {
|
||||
if (*nrels_mag >= 1) {
|
||||
data->fan_min[nr-1] = FAN_TO_REG(results[0],data->fan_div[nr-1]);
|
||||
data->fan_min[nr-1] = FAN_TO_REG(results[0],
|
||||
DIV_FROM_REG(data->fan_div[nr-1]));
|
||||
lm80_write_value(client,nr==1?LM80_REG_FAN1_MIN:LM80_REG_FAN2_MIN,
|
||||
data->fan_min[nr-1]);
|
||||
}
|
||||
|
||||
@@ -915,12 +915,15 @@ void w83781d_fan(struct i2c_client *client, int operation, int ctl_name,
|
||||
*nrels_mag = 0;
|
||||
else if (operation == SENSORS_PROC_REAL_READ) {
|
||||
w83781d_update_client(client);
|
||||
results[0] = FAN_FROM_REG(data->fan_min[nr-1],data->fan_div[nr-1]);
|
||||
results[1] = FAN_FROM_REG(data->fan[nr-1],data->fan_div[nr-1]);
|
||||
results[0] = FAN_FROM_REG(data->fan_min[nr-1],
|
||||
FAN_DIV_FROM_REG(data->fan_div[nr-1]));
|
||||
results[1] = FAN_FROM_REG(data->fan[nr-1],
|
||||
FAN_DIV_FROM_REG(data->fan_div[nr-1]));
|
||||
*nrels_mag = 2;
|
||||
} else if (operation == SENSORS_PROC_REAL_WRITE) {
|
||||
if (*nrels_mag >= 1) {
|
||||
data->fan_min[nr-1] = FAN_TO_REG(results[0],data->fan_div[nr-1]);
|
||||
data->fan_min[nr-1] = FAN_TO_REG(results[0],
|
||||
FAN_DIV_FROM_REG(data->fan_div[nr-1]));
|
||||
w83781d_write_value(client,W83781D_REG_FAN_MIN(nr),data->fan_min[nr-1]);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-3
@@ -548,12 +548,15 @@ void lm80_fan(struct i2c_client *client, int operation, int ctl_name,
|
||||
*nrels_mag = 0;
|
||||
else if (operation == SENSORS_PROC_REAL_READ) {
|
||||
lm80_update_client(client);
|
||||
results[0] = FAN_FROM_REG(data->fan_min[nr-1],data->fan_div[nr-1]);
|
||||
results[1] = FAN_FROM_REG(data->fan[nr-1],data->fan_div[nr-1]);
|
||||
results[0] = FAN_FROM_REG(data->fan_min[nr-1],
|
||||
DIV_FROM_REG(data->fan_div[nr-1]));
|
||||
results[1] = FAN_FROM_REG(data->fan[nr-1],
|
||||
DIV_FROM_REG(data->fan_div[nr-1]));
|
||||
*nrels_mag = 2;
|
||||
} else if (operation == SENSORS_PROC_REAL_WRITE) {
|
||||
if (*nrels_mag >= 1) {
|
||||
data->fan_min[nr-1] = FAN_TO_REG(results[0],data->fan_div[nr-1]);
|
||||
data->fan_min[nr-1] = FAN_TO_REG(results[0],
|
||||
DIV_FROM_REG(data->fan_div[nr-1]));
|
||||
lm80_write_value(client,nr==1?LM80_REG_FAN1_MIN:LM80_REG_FAN2_MIN,
|
||||
data->fan_min[nr-1]);
|
||||
}
|
||||
|
||||
+6
-3
@@ -915,12 +915,15 @@ void w83781d_fan(struct i2c_client *client, int operation, int ctl_name,
|
||||
*nrels_mag = 0;
|
||||
else if (operation == SENSORS_PROC_REAL_READ) {
|
||||
w83781d_update_client(client);
|
||||
results[0] = FAN_FROM_REG(data->fan_min[nr-1],data->fan_div[nr-1]);
|
||||
results[1] = FAN_FROM_REG(data->fan[nr-1],data->fan_div[nr-1]);
|
||||
results[0] = FAN_FROM_REG(data->fan_min[nr-1],
|
||||
FAN_DIV_FROM_REG(data->fan_div[nr-1]));
|
||||
results[1] = FAN_FROM_REG(data->fan[nr-1],
|
||||
FAN_DIV_FROM_REG(data->fan_div[nr-1]));
|
||||
*nrels_mag = 2;
|
||||
} else if (operation == SENSORS_PROC_REAL_WRITE) {
|
||||
if (*nrels_mag >= 1) {
|
||||
data->fan_min[nr-1] = FAN_TO_REG(results[0],data->fan_div[nr-1]);
|
||||
data->fan_min[nr-1] = FAN_TO_REG(results[0],
|
||||
FAN_DIV_FROM_REG(data->fan_div[nr-1]));
|
||||
w83781d_write_value(client,W83781D_REG_FAN_MIN(nr),data->fan_min[nr-1]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user