mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-06 15:51:34 +00:00
fix gl518sm r00 recognition. 'sensors' will again say n/a for
voltages if an r00 chip and iterate = 0. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1568 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
5fcf1bf774
commit
1dc7bcdb8b
3 files changed
+22
-8
No files matched your search
@@ -366,11 +366,10 @@ static int gl518_detect(struct i2c_adapter *adapter, int address,
|
||||
}
|
||||
}
|
||||
|
||||
type_name = "gl518sm";
|
||||
if (kind == gl518sm_r00) {
|
||||
type_name = "gl518sm";
|
||||
client_name = "GL518SM Revision 0x00 chip";
|
||||
} else if (kind == gl518sm_r80) {
|
||||
type_name = "gl518sm";
|
||||
client_name = "GL518SM Revision 0x80 chip";
|
||||
} else {
|
||||
#ifdef DEBUG
|
||||
@@ -414,7 +413,10 @@ static int gl518_detect(struct i2c_adapter *adapter, int address,
|
||||
data->sysctl_id = i;
|
||||
|
||||
/* Initialize the GL518SM chip */
|
||||
data->iterate = 0;
|
||||
if (kind == gl518sm_r00)
|
||||
data->iterate = 0;
|
||||
else
|
||||
data->iterate = 3;
|
||||
data->iterate_lock = 0;
|
||||
data->quit_thread = 0;
|
||||
data->thread = NULL;
|
||||
@@ -1046,7 +1048,8 @@ void gl518_iterate(struct i2c_client *client, int operation, int ctl_name,
|
||||
else if (operation == SENSORS_PROC_REAL_READ) {
|
||||
results[0] = data->iterate;
|
||||
*nrels_mag = 1;
|
||||
} else if (operation == SENSORS_PROC_REAL_WRITE) {
|
||||
} else if (operation == SENSORS_PROC_REAL_WRITE &&
|
||||
data->type == gl518sm_r00 ) {
|
||||
if ((*nrels_mag >= 1) && (data->iterate != results[0])) {
|
||||
data->iterate = results[0];
|
||||
for (i = 0; i < 4; i++) {
|
||||
|
||||
Reference in new issue
Block a user