summaryrefslogtreecommitdiff
path: root/sys/dev/i2c/adm1024.c
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/i2c/adm1024.c
parent85c8734cdfb81843001da918e4d375906fe2da11 (diff)
stop using I2C_F_POLL; it is a bus driver responsibility now
Diffstat (limited to 'sys/dev/i2c/adm1024.c')
-rw-r--r--sys/dev/i2c/adm1024.c28
1 files changed, 14 insertions, 14 deletions
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);
}