2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-31 14:25:39 +00:00

(mds) change to standard VID calculation

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@954 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Mark D. Studebaker
2000-12-16 17:22:08 +00:00
parent ab321d5243
commit 2698188e2f

View File

@@ -172,10 +172,8 @@ extern inline u8 FAN_TO_REG(long rpm, int div)
#define DIV_FROM_REG(val) (1 << (val))
#define DIV_TO_REG(val) ((val)==1?0:((val)==8?3:((val)==4?2:1)))
#if 0
#define VID_FROM_REG(val) ((val)==0x1f?0:(val)>=0x10?510-(val)*10:\
205-(val)*5)
#endif
#define LM87_INIT_IN_0 190
#define LM87_INIT_IN_1 190
@@ -897,20 +895,9 @@ void lm87_vid(struct i2c_client *client, int operation, int ctl_name,
if (operation == SENSORS_PROC_REAL_INFO)
*nrels_mag = 2;
else if (operation == SENSORS_PROC_REAL_READ) {
lm87_update_client(client);
if ((data->vid == 0x1f) || (data->vid == 0x0f)) {
results[0] = 0;
}
else if (data->vid > 0x0f) {
results[0] = (1275 -
(((data->vid - 0x10) * 1000) * 0.025))/10;
}
else {
results[0] = 200 - ((data->vid * 100) * 0.05);
}
*nrels_mag = 1;
results[0] = VID_FROM_REG(data->vid);
*nrels_mag = 1;
}
}