mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-29 21:08:19 +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:
1 parent
ab321d5243
commit
2698188e2f
1 file changed
+2
-15
+2
-15
@@ -172,10 +172,8 @@ extern inline u8 FAN_TO_REG(long rpm, int div)
|
|||||||
#define DIV_FROM_REG(val) (1 << (val))
|
#define DIV_FROM_REG(val) (1 << (val))
|
||||||
#define DIV_TO_REG(val) ((val)==1?0:((val)==8?3:((val)==4?2:1)))
|
#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:\
|
#define VID_FROM_REG(val) ((val)==0x1f?0:(val)>=0x10?510-(val)*10:\
|
||||||
205-(val)*5)
|
205-(val)*5)
|
||||||
#endif
|
|
||||||
|
|
||||||
#define LM87_INIT_IN_0 190
|
#define LM87_INIT_IN_0 190
|
||||||
#define LM87_INIT_IN_1 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)
|
if (operation == SENSORS_PROC_REAL_INFO)
|
||||||
*nrels_mag = 2;
|
*nrels_mag = 2;
|
||||||
else if (operation == SENSORS_PROC_REAL_READ) {
|
else if (operation == SENSORS_PROC_REAL_READ) {
|
||||||
|
|
||||||
lm87_update_client(client);
|
lm87_update_client(client);
|
||||||
if ((data->vid == 0x1f) || (data->vid == 0x0f)) {
|
results[0] = VID_FROM_REG(data->vid);
|
||||||
results[0] = 0;
|
*nrels_mag = 1;
|
||||||
}
|
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user