summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2005-12-29 14:51:09 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2005-12-29 14:51:09 +0000
commitd2d7733cdc56dcf927eab6b192d4ebc51c7bc74e (patch)
tree4e34e5479fe2e9dcb3b8a6982eba4a01c524144f /sys/dev
parent85c8734cdfb81843001da918e4d375906fe2da11 (diff)
stop using I2C_F_POLL; it is a bus driver responsibility now
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/i2c/adm1021.c12
-rw-r--r--sys/dev/i2c/adm1024.c28
-rw-r--r--sys/dev/i2c/adm1025.c26
-rw-r--r--sys/dev/i2c/adm1026.c46
-rw-r--r--sys/dev/i2c/i2c_scan.c24
-rw-r--r--sys/dev/i2c/lm75.c14
-rw-r--r--sys/dev/i2c/lm_i2c.c8
7 files changed, 79 insertions, 79 deletions
diff --git a/sys/dev/i2c/adm1021.c b/sys/dev/i2c/adm1021.c
index ea5aa51b164..523c9090e4f 100644
--- a/sys/dev/i2c/adm1021.c
+++ b/sys/dev/i2c/adm1021.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adm1021.c,v 1.17 2005/12/29 00:30:44 deraadt Exp $ */
+/* $OpenBSD: adm1021.c,v 1.18 2005/12/29 14:51:08 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -94,7 +94,7 @@ admtemp_attach(struct device *parent, struct device *self, void *aux)
iic_acquire_bus(sc->sc_tag, 0);
cmd = ADM1021_CONFIG_READ;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL)) {
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0)) {
iic_release_bus(sc->sc_tag, 0);
printf(", cannot get control register\n");
return;
@@ -102,7 +102,7 @@ admtemp_attach(struct device *parent, struct device *self, void *aux)
if (data & ADM1021_CONFIG_RUN) {
cmd = ADM1021_STATUS;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &stat, sizeof stat, I2C_F_POLL)) {
+ sc->sc_addr, &cmd, sizeof cmd, &stat, sizeof stat, 0)) {
iic_release_bus(sc->sc_tag, 0);
printf(", cannot read status register\n");
return;
@@ -124,7 +124,7 @@ admtemp_attach(struct device *parent, struct device *self, void *aux)
data &= ~ADM1021_CONFIG_RUN;
cmd = ADM1021_CONFIG_WRITE;
if (iic_exec(sc->sc_tag, I2C_OP_WRITE_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL)) {
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0)) {
iic_release_bus(sc->sc_tag, 0);
printf(", cannot set control register\n");
return;
@@ -170,7 +170,7 @@ admtemp_refresh(void *arg)
if (sc->sc_noexternal == 0) {
cmd = ADM1021_EXT_TEMP;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr,
- &cmd, sizeof cmd, &sdata, sizeof sdata, I2C_F_POLL) == 0) {
+ &cmd, sizeof cmd, &sdata, sizeof sdata, 0) == 0) {
if (sdata == 0x7f) {
sc->sc_sensor[ADMTEMP_EXT].flags |= SENSOR_FINVALID;
} else {
@@ -185,7 +185,7 @@ admtemp_refresh(void *arg)
cmd = ADM1021_INT_TEMP;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr,
- &cmd, sizeof cmd, &sdata, sizeof sdata, I2C_F_POLL) == 0) {
+ &cmd, sizeof cmd, &sdata, sizeof sdata, 0) == 0) {
if (sdata == 0x7f) {
sc->sc_sensor[ADMTEMP_INT].flags |= SENSOR_FINVALID;
} else {
diff --git a/sys/dev/i2c/adm1024.c b/sys/dev/i2c/adm1024.c
index 9108357df8e..94be3b612a8 100644
--- a/sys/dev/i2c/adm1024.c
+++ b/sys/dev/i2c/adm1024.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adm1024.c,v 1.7 2005/12/28 22:04:28 deraadt Exp $ */
+/* $OpenBSD: adm1024.c,v 1.8 2005/12/29 14:51:08 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -102,7 +102,7 @@ admlc_attach(struct device *parent, struct device *self, void *aux)
iic_acquire_bus(sc->sc_tag, 0);
cmd = ADM1024_CONFIG1;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL)) {
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0)) {
iic_release_bus(sc->sc_tag, 0);
printf(": cannot get control register\n");
return;
@@ -111,7 +111,7 @@ admlc_attach(struct device *parent, struct device *self, void *aux)
data2 = data2 & ~ADM1024_CONFIG1_INTCLR;
if (data != data2) {
if (iic_exec(sc->sc_tag, I2C_OP_WRITE_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data2, sizeof data2, I2C_F_POLL)) {
+ sc->sc_addr, &cmd, sizeof cmd, &data2, sizeof data2, 0)) {
iic_release_bus(sc->sc_tag, 0);
printf(": cannot set control register\n");
return;
@@ -208,17 +208,17 @@ admlc_refresh(void *arg)
cmd = ADM1024_INT_TEMP;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &sdata, sizeof sdata, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &sdata, sizeof sdata, 0) == 0)
sc->sc_sensor[ADMLC_INT].value = 273150000 + 1000000 * sdata;
cmd = ADM1024_EXT_TEMP;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &sdata, sizeof sdata, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &sdata, sizeof sdata, 0) == 0)
sc->sc_sensor[ADMLC_EXT].value = 273150000 + 1000000 * sdata;
cmd = ADM1024_STATUS2;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0) {
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0) {
if (data & ADM1024_STATUS2_EXT)
sc->sc_sensor[ADMLC_EXT].flags |= SENSOR_FINVALID;
else
@@ -227,42 +227,42 @@ admlc_refresh(void *arg)
cmd = ADM1024_V2_5;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
sc->sc_sensor[ADMLC_V2_5].value = 2500000 * data / 192;
cmd = ADM1024_Vccp;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
sc->sc_sensor[ADMLC_Vcc].value = 2249000 * data / 192;
cmd = ADM1024_Vcc;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
sc->sc_sensor[ADMLC_Vcc].value = 3300000 * data / 192;
cmd = ADM1024_V5;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
sc->sc_sensor[ADMLC_V5].value = 5000000 * data / 192;
cmd = ADM1024_V12;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
sc->sc_sensor[ADMLC_V12].value = 12000000 * data / 192;
cmd = ADM1024_Vccp2;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
sc->sc_sensor[ADMLC_Vccp2].value = 2700000 * data / 192;
cmd = ADM1024_FAN1;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
fanval(&sc->sc_sensor[ADMLC_FAN1], sc->sc_fan1mul, data);
cmd = ADM1024_FAN2;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
fanval(&sc->sc_sensor[ADMLC_FAN2], sc->sc_fan2mul, data);
iic_release_bus(sc->sc_tag, 0);
}
diff --git a/sys/dev/i2c/adm1025.c b/sys/dev/i2c/adm1025.c
index c4c8c86885c..3a44e39a0fc 100644
--- a/sys/dev/i2c/adm1025.c
+++ b/sys/dev/i2c/adm1025.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adm1025.c,v 1.17 2005/12/28 18:41:24 deraadt Exp $ */
+/* $OpenBSD: adm1025.c,v 1.18 2005/12/29 14:51:08 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -209,17 +209,17 @@ admtm_refresh(void *arg)
cmd = ADM1025_INT_TEMP;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &sdata, sizeof sdata, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &sdata, sizeof sdata, 0) == 0)
sc->sc_sensor[ADMTM_INT].value = 273150000 + 1000000 * sdata;
cmd = ADM1025_EXT_TEMP;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &sdata, sizeof sdata, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &sdata, sizeof sdata, 0) == 0)
sc->sc_sensor[ADMTM_EXT].value = 273150000 + 1000000 * sdata;
cmd = ADM1025_STATUS2;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0) {
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0) {
if (data & ADM1025_STATUS2_EXT)
sc->sc_sensor[ADMTM_EXT].flags |= SENSOR_FINVALID;
else
@@ -228,49 +228,49 @@ admtm_refresh(void *arg)
cmd = ADM1025_V2_5;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
sc->sc_sensor[ADMTM_V2_5].value = 2500000 * data / 192;
cmd = ADM1025_Vccp;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
sc->sc_sensor[ADMTM_Vcc].value = 2249000 * data / 192;
cmd = ADM1025_V3_3;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
sc->sc_sensor[ADMTM_V3_3].value = 3300000 * data / 192;
cmd = ADM1025_V5;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
sc->sc_sensor[ADMTM_V5].value = 5000000 * data / 192;
cmd = ADM1025_V12;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
sc->sc_sensor[ADMTM_V12].value = 12000000 * data / 192;
cmd = ADM1025_Vcc;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
sc->sc_sensor[ADMTM_Vcc].value = 3300000 * data / 192;
if (sc->sc_model == 192) {
cmd = SMSC47M192_V1_5;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
sc->sc_sensor[SMSC_V1_5].value = 1500000 * data / 192;
cmd = SMSC47M192_V1_8;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
sc->sc_sensor[SMSC_V1_8].value = 1800000 * data / 192;
cmd = SMSC47M192_TEMP2;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
sc->sc_addr, &cmd, sizeof cmd, &sdata, sizeof sdata,
- I2C_F_POLL) == 0)
+ 0) == 0)
sc->sc_sensor[SMSC_TEMP2].value = 273150000 + 1000000 * sdata;
}
diff --git a/sys/dev/i2c/adm1026.c b/sys/dev/i2c/adm1026.c
index 18c0d2cf462..16066fe8a05 100644
--- a/sys/dev/i2c/adm1026.c
+++ b/sys/dev/i2c/adm1026.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adm1026.c,v 1.3 2005/12/28 22:04:28 deraadt Exp $ */
+/* $OpenBSD: adm1026.c,v 1.4 2005/12/29 14:51:08 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -118,7 +118,7 @@ admcts_attach(struct device *parent, struct device *self, void *aux)
iic_acquire_bus(sc->sc_tag, 0);
cmd = ADM1026_CONTROL;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL)) {
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0)) {
iic_release_bus(sc->sc_tag, 0);
printf(": cannot get control register\n");
return;
@@ -127,7 +127,7 @@ admcts_attach(struct device *parent, struct device *self, void *aux)
data2 = data2 & ~ADM1026_CONTROL_INTCLR;
if (data != data2) {
if (iic_exec(sc->sc_tag, I2C_OP_WRITE_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data2, sizeof data2, I2C_F_POLL)) {
+ sc->sc_addr, &cmd, sizeof cmd, &data2, sizeof data2, 0)) {
iic_release_bus(sc->sc_tag, 0);
printf(": cannot set control register\n");
return;
@@ -136,7 +136,7 @@ admcts_attach(struct device *parent, struct device *self, void *aux)
cmd = ADM1026_FAN0123DIV;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL)) {
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0)) {
iic_release_bus(sc->sc_tag, 0);
printf(": cannot get fan0123div register\n");
return;
@@ -148,7 +148,7 @@ admcts_attach(struct device *parent, struct device *self, void *aux)
cmd = ADM1026_FAN4567DIV;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL)) {
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0)) {
iic_release_bus(sc->sc_tag, 0);
printf(": cannot get fan0123div register\n");
return;
@@ -270,92 +270,92 @@ admcts_refresh(void *arg)
cmd = ADM1026_TEMP;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &sdata, sizeof sdata, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &sdata, sizeof sdata, 0) == 0)
sc->sc_sensor[ADMCTS_TEMP].value = 273150000 + 1000000 * sdata;
cmd = ADM1026_EXT1;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &sdata, sizeof sdata, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &sdata, sizeof sdata, 0) == 0)
sc->sc_sensor[ADMCTS_EXT1].value = 273150000 + 1000000 * sdata;
cmd = ADM1026_EXT2;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &sdata, sizeof sdata, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &sdata, sizeof sdata, 0) == 0)
sc->sc_sensor[ADMCTS_EXT2].value = 273150000 + 1000000 * sdata;
cmd = ADM1026_Vbat;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
sc->sc_sensor[ADMCTS_Vbat].value = 3000000 * data / 192;
cmd = ADM1026_V3_3stby;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
sc->sc_sensor[ADMCTS_V3_3stby].value = 3300000 * data / 192;
cmd = ADM1026_V3_3main;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
sc->sc_sensor[ADMCTS_V3_3main].value = 3300000 * data / 192;
cmd = ADM1026_V5;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
sc->sc_sensor[ADMCTS_V5].value = 5500000 * data / 192;
cmd = ADM1026_Vccp;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
sc->sc_sensor[ADMCTS_Vccp].value = 2250000 * data / 192;
cmd = ADM1026_V12;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
sc->sc_sensor[ADMCTS_V12].value = 12000000 * data / 192;
cmd = ADM1026_Vminus12;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
sc->sc_sensor[ADMCTS_Vminus12].value = -2125000 * data / 192;
cmd = ADM1026_FAN0;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
fanval(&sc->sc_sensor[ADMCTS_FAN0], sc->sc_fanmul[0], data);
cmd = ADM1026_FAN1;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
fanval(&sc->sc_sensor[ADMCTS_FAN1], sc->sc_fanmul[1], data);
cmd = ADM1026_FAN2;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
fanval(&sc->sc_sensor[ADMCTS_FAN2], sc->sc_fanmul[2], data);
cmd = ADM1026_FAN3;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
fanval(&sc->sc_sensor[ADMCTS_FAN3], sc->sc_fanmul[3], data);
cmd = ADM1026_FAN4;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
fanval(&sc->sc_sensor[ADMCTS_FAN4], sc->sc_fanmul[4], data);
cmd = ADM1026_FAN5;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
fanval(&sc->sc_sensor[ADMCTS_FAN5], sc->sc_fanmul[5], data);
cmd = ADM1026_FAN6;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
fanval(&sc->sc_sensor[ADMCTS_FAN6], sc->sc_fanmul[6], data);
cmd = ADM1026_FAN7;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL) == 0)
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0) == 0)
fanval(&sc->sc_sensor[ADMCTS_FAN7], sc->sc_fanmul[7], data);
iic_release_bus(sc->sc_tag, 0);
diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c
index 1338cb22f5f..64bb2a9400d 100644
--- a/sys/dev/i2c/i2c_scan.c
+++ b/sys/dev/i2c/i2c_scan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i2c_scan.c,v 1.35 2005/12/29 09:20:04 deraadt Exp $ */
+/* $OpenBSD: i2c_scan.c,v 1.36 2005/12/29 14:51:08 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt <deraadt@openbsd.org>
@@ -97,11 +97,11 @@ iicprobenc(u_int8_t cmd)
*/
if (skip_fc && cmd == 0xfc)
return (0xff);
- probe_ic->ic_acquire_bus(probe_ic->ic_cookie, I2C_F_POLL);
+ probe_ic->ic_acquire_bus(probe_ic->ic_cookie, 0);
if (iic_exec(probe_ic, I2C_OP_READ_WITH_STOP,
- probe_addr, &cmd, 1, &data, 1, I2C_F_POLL) != 0)
+ probe_addr, &cmd, 1, &data, 1, 0) != 0)
data = 0xff;
- probe_ic->ic_release_bus(probe_ic->ic_cookie, I2C_F_POLL);
+ probe_ic->ic_release_bus(probe_ic->ic_cookie, 0);
return (data);
}
@@ -116,11 +116,11 @@ iicprobew(u_int8_t cmd)
*/
if (skip_fc && cmd == 0xfc)
return (0xffff);
- probe_ic->ic_acquire_bus(probe_ic->ic_cookie, I2C_F_POLL);
+ probe_ic->ic_acquire_bus(probe_ic->ic_cookie, 0);
if (iic_exec(probe_ic, I2C_OP_READ_WITH_STOP,
- probe_addr, &cmd, 1, &data2, 2, I2C_F_POLL) != 0)
+ probe_addr, &cmd, 1, &data2, 2, 0) != 0)
data2 = 0xffff;
- probe_ic->ic_release_bus(probe_ic->ic_cookie, I2C_F_POLL);
+ probe_ic->ic_release_bus(probe_ic->ic_cookie, 0);
return (data2);
}
@@ -464,18 +464,18 @@ iic_scan(struct device *self, struct i2cbus_attach_args *iba)
for (addr = probe_addrs[i].start; addr <= probe_addrs[i].end;
addr++) {
/* Perform RECEIVE BYTE command */
- ic->ic_acquire_bus(ic->ic_cookie, I2C_F_POLL);
+ ic->ic_acquire_bus(ic->ic_cookie, 0);
if (iic_exec(ic, I2C_OP_READ_WITH_STOP, addr,
- &cmd, 1, NULL, 0, I2C_F_POLL) == 0) {
- ic->ic_release_bus(ic->ic_cookie, I2C_F_POLL);
+ &cmd, 1, NULL, 0, 0) == 0) {
+ ic->ic_release_bus(ic->ic_cookie, 0);
/* Some device exists, so go scope it out */
iic_probe(self, iba, addr);
- ic->ic_acquire_bus(ic->ic_cookie, I2C_F_POLL);
+ ic->ic_acquire_bus(ic->ic_cookie, 0);
}
- ic->ic_release_bus(ic->ic_cookie, I2C_F_POLL);
+ ic->ic_release_bus(ic->ic_cookie, 0);
}
}
}
diff --git a/sys/dev/i2c/lm75.c b/sys/dev/i2c/lm75.c
index 2e06e68a136..f48693412c7 100644
--- a/sys/dev/i2c/lm75.c
+++ b/sys/dev/i2c/lm75.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lm75.c,v 1.5 2005/12/27 17:18:18 deraadt Exp $ */
+/* $OpenBSD: lm75.c,v 1.6 2005/12/29 14:51:08 deraadt Exp $ */
/* $NetBSD: lm75.c,v 1.1 2003/09/30 00:35:31 thorpej Exp $ */
/*
* Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org>
@@ -115,7 +115,7 @@ lmtemp_attach(struct device *parent, struct device *self, void *aux)
/* Try to detect LM77 by poking Thigh register */
ptr[0] = LM77_REG_THIGH;
- iic_acquire_bus(sc->sc_tag, I2C_F_POLL);
+ iic_acquire_bus(sc->sc_tag, 0);
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
sc->sc_address, ptr, 1, reg, LM75_TEMP_LEN, 0) == 0) {
/* Power up default is 64 degC */
@@ -126,17 +126,17 @@ lmtemp_attach(struct device *parent, struct device *self, void *aux)
printf(": %s (%s)\n", ia->ia_name,
sc->sc_model == LM_MODEL_LM75 ? "LM75" : "LM77");
- iic_release_bus(sc->sc_tag, I2C_F_POLL);
+ iic_release_bus(sc->sc_tag, 0);
/* Set the configuration to defaults */
- iic_acquire_bus(sc->sc_tag, I2C_F_POLL);
+ iic_acquire_bus(sc->sc_tag, 0);
if (lmtemp_config_write(sc, 0) != 0) {
printf("%s: unable to write config register\n",
sc->sc_dev.dv_xname);
- iic_release_bus(sc->sc_tag, I2C_F_POLL);
+ iic_release_bus(sc->sc_tag, 0);
return;
}
- iic_release_bus(sc->sc_tag, I2C_F_POLL);
+ iic_release_bus(sc->sc_tag, 0);
/* Initialize sensor data */
strlcpy(sc->sc_sensor.device, sc->sc_dev.dv_xname,
@@ -159,7 +159,7 @@ lmtemp_config_write(struct lmtemp_softc *sc, uint8_t val)
cmdbuf[1] = val;
return (iic_exec(sc->sc_tag, I2C_OP_WRITE_WITH_STOP,
- sc->sc_address, cmdbuf, 1, &cmdbuf[1], 1, I2C_F_POLL));
+ sc->sc_address, cmdbuf, 1, &cmdbuf[1], 1, 0));
}
int
diff --git a/sys/dev/i2c/lm_i2c.c b/sys/dev/i2c/lm_i2c.c
index 3f06d9d1fdc..5ddfa4d39d1 100644
--- a/sys/dev/i2c/lm_i2c.c
+++ b/sys/dev/i2c/lm_i2c.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lm_i2c.c,v 1.2 2005/12/28 01:02:58 deraadt Exp $ */
+/* $OpenBSD: lm_i2c.c,v 1.3 2005/12/29 14:51:08 deraadt Exp $ */
/*
* Copyright (c) 2005 Mark Kettenis
@@ -68,13 +68,13 @@ lm_i2c_attach(struct device *parent, struct device *self, void *aux)
lm_attach(&sc->sc_lmsc);
- iic_acquire_bus(sc->sc_tag, I2C_F_POLL);
+ iic_acquire_bus(sc->sc_tag, 0);
cmd = 0x4a;
iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, I2C_F_POLL);
+ sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0);
- iic_release_bus(sc->sc_tag, I2C_F_POLL);
+ iic_release_bus(sc->sc_tag, 0);
printf("%s: satellites at addr 0x%x and addr 0x%x\n",
sc->sc_lmsc.sc_dev.dv_xname,