mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-30 13:00:30 +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
+12
-3
@@ -40,7 +40,8 @@ Module Parameters
|
||||
Description
|
||||
-----------
|
||||
|
||||
IMPORTANT: in0, in1, and in2 values (+5, +3, and +12) CANNOT be read
|
||||
IMPORTANT: For the revision 0x00 chip, the
|
||||
in0, in1, and in2 values (+5, +3, and +12) CANNOT be read
|
||||
unless you use the slow 'iterate' method. Limits will still
|
||||
work even when iterate=0. See below. This is a limitation
|
||||
of the chip, not the driver.
|
||||
@@ -96,14 +97,22 @@ will do no harm, but will return 'old' values.
|
||||
Iteration Code
|
||||
--------------
|
||||
|
||||
You can select between three modes to read the vin0-2 inputs with
|
||||
IMPORTANT: For the revision 0x00 chip only,
|
||||
you may select between three modes to read the vin0-2 inputs with
|
||||
the following lines in /etc/sensors.conf:
|
||||
|
||||
set iterate 0 Don't read vin0-vin2 inputs.
|
||||
set iterate 0 Don't read in0-in2 inputs.
|
||||
set iterate 1 Run the iteration loop, this takes up to 10 seconds.
|
||||
set iterate 2 Show the results of the last iteration loop,
|
||||
and start a new loop to run in the background.
|
||||
|
||||
You may also set the iteration type with
|
||||
'echo n > /proc/sys/dev/sensors/gl518sm-i2c-x-y/iterate'.
|
||||
|
||||
If you have a rev 0x80 chip, the in0-in2 inputs are readable.
|
||||
In this case, 'iterate' will be read-only and the read value is 3.
|
||||
|
||||
|
||||
Chip Features
|
||||
-------------
|
||||
|
||||
|
||||
@@ -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++) {
|
||||
|
||||
@@ -999,7 +999,9 @@ void print_gl518(const sensors_chip_name *name)
|
||||
int alarms,beeps,valid;
|
||||
int is_r00;
|
||||
|
||||
is_r00 = !strcmp(name->prefix,"gl518sm-r00");
|
||||
cur = 0.0;
|
||||
sensors_get_feature(*name,SENSORS_GL518_ITERATE,&cur);
|
||||
is_r00 = ((int) (cur + 0.5)) != 3;
|
||||
if (!sensors_get_feature(*name,SENSORS_GL518_ALARMS,&cur))
|
||||
alarms = cur + 0.5;
|
||||
else {
|
||||
|
||||
Reference in new issue
Block a user