mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-11 16:40:16 +00:00
Several small GL518SM fixes
* (module) VIN limits are now set to sane values (3V instead of 30V, which caused nasty overflows) * (module) VIN limits had min/max swapped in gl518_attach_adapter * (lib) TEMP_HYST used the VID sysctl instead of the TEMP sysctl, leading to bogus readings * (sensors) print n/a for gl518 not available readings. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@145 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
dfc74d0f39
commit
a59e9abc8b
5 files changed
+33
-32
No files matched your search
+12
-12
@@ -81,10 +81,10 @@
|
||||
#define GL518_INIT_FAN_MIN_2 3000
|
||||
|
||||
/* What are sane values for these?!? */
|
||||
#define GL518_INIT_VIN_1 3000
|
||||
#define GL518_INIT_VIN_2 3000
|
||||
#define GL518_INIT_VIN_3 3000
|
||||
#define GL518_INIT_VDD 3000
|
||||
#define GL518_INIT_VIN_1 300
|
||||
#define GL518_INIT_VIN_2 300
|
||||
#define GL518_INIT_VIN_3 300
|
||||
#define GL518_INIT_VDD 300
|
||||
|
||||
#define GL518_INIT_PERCENTAGE 10
|
||||
|
||||
@@ -304,17 +304,17 @@ int gl518_attach_adapter(struct i2c_adapter *adapter)
|
||||
(FAN_TO_REG(GL518_INIT_FAN_MIN_1,2) << 8) |
|
||||
FAN_TO_REG(GL518_INIT_FAN_MIN_2,2));
|
||||
gl518_write_value(new_client,GL518_REG_VIN1_LIMIT,
|
||||
(IN_TO_REG(GL518_INIT_VIN_MIN_1) << 8) |
|
||||
IN_TO_REG(GL518_INIT_VIN_MAX_1));
|
||||
(IN_TO_REG(GL518_INIT_VIN_MAX_1) << 8) |
|
||||
IN_TO_REG(GL518_INIT_VIN_MIN_1));
|
||||
gl518_write_value(new_client,GL518_REG_VIN2_LIMIT,
|
||||
(IN_TO_REG(GL518_INIT_VIN_MIN_2) << 8) |
|
||||
IN_TO_REG(GL518_INIT_VIN_MAX_2));
|
||||
(IN_TO_REG(GL518_INIT_VIN_MAX_2) << 8) |
|
||||
IN_TO_REG(GL518_INIT_VIN_MIN_2));
|
||||
gl518_write_value(new_client,GL518_REG_VIN3_LIMIT,
|
||||
(IN_TO_REG(GL518_INIT_VIN_MIN_3) << 8) |
|
||||
IN_TO_REG(GL518_INIT_VIN_MAX_3));
|
||||
(IN_TO_REG(GL518_INIT_VIN_MAX_3) << 8) |
|
||||
IN_TO_REG(GL518_INIT_VIN_MIN_3));
|
||||
gl518_write_value(new_client,GL518_REG_VDD_LIMIT,
|
||||
(IN_TO_REG(GL518_INIT_VDD_MIN) << 8) |
|
||||
IN_TO_REG(GL518_INIT_VDD_MAX));
|
||||
(IN_TO_REG(GL518_INIT_VDD_MAX) << 8) |
|
||||
IN_TO_REG(GL518_INIT_VDD_MIN));
|
||||
/* Clear status register (bit 5=1), start (bit6=1) */
|
||||
gl518_write_value(new_client,GL518_REG_CONF,0x24);
|
||||
gl518_write_value(new_client,GL518_REG_CONF,0x44);
|
||||
|
||||
Reference in new issue
Block a user