mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-28 21:07:55 +00:00
(mds) bug fixes on sensor[1-3] reads and writes.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@663 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
parent
8701621657
commit
b5d883ad24
@ -989,7 +989,7 @@ void w83781d_init_client(struct i2c_client *client)
|
||||
if(!(tmp & BIT_SCFG1[i-1])) {
|
||||
data->sens[i-1] = W83781D_DEFAULT_BETA;
|
||||
} else {
|
||||
if(w83781d_read_value(client,W83781D_REG_TEMP) & BIT_SCFG2[i-1])
|
||||
if(w83781d_read_value(client,W83781D_REG_SCFG2) & BIT_SCFG2[i-1])
|
||||
data->sens[i-1] = 1;
|
||||
else
|
||||
data->sens[i-1] = 2;
|
||||
@ -1456,14 +1456,14 @@ void w83781d_sens(struct i2c_client *client, int operation, int ctl_name,
|
||||
switch(results[0]) {
|
||||
case 1: /* PII/Celeron diode */
|
||||
tmp = w83781d_read_value(client,W83781D_REG_SCFG1);
|
||||
w83781d_write_value(client,W83781D_REG_SCFG1, tmp | BIT_SCFG2[nr-1]);
|
||||
w83781d_write_value(client,W83781D_REG_SCFG1, tmp | BIT_SCFG1[nr-1]);
|
||||
tmp = w83781d_read_value(client,W83781D_REG_SCFG2);
|
||||
w83781d_write_value(client,W83781D_REG_SCFG2, tmp | BIT_SCFG2[nr-1]);
|
||||
data->sens[nr-1] = results[0];
|
||||
break;
|
||||
case 2: /* 3904 */
|
||||
tmp = w83781d_read_value(client,W83781D_REG_SCFG1);
|
||||
w83781d_write_value(client,W83781D_REG_SCFG1, tmp | BIT_SCFG2[nr-1]);
|
||||
w83781d_write_value(client,W83781D_REG_SCFG1, tmp | BIT_SCFG1[nr-1]);
|
||||
tmp = w83781d_read_value(client,W83781D_REG_SCFG2);
|
||||
w83781d_write_value(client,W83781D_REG_SCFG2,
|
||||
tmp & ~BIT_SCFG2[nr-1]);
|
||||
@ -1472,7 +1472,7 @@ void w83781d_sens(struct i2c_client *client, int operation, int ctl_name,
|
||||
case W83781D_DEFAULT_BETA: /* thermistor */
|
||||
tmp = w83781d_read_value(client,W83781D_REG_SCFG1);
|
||||
w83781d_write_value(client,W83781D_REG_SCFG1,
|
||||
tmp & ~BIT_SCFG2[nr-1]);
|
||||
tmp & ~BIT_SCFG1[nr-1]);
|
||||
data->sens[nr-1] = results[0];
|
||||
break;
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user