summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-04-10 00:57:24 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-04-10 00:57:24 +0000
commit0602c2b7470c56147da822cbe3090da04d90944f (patch)
tree775ae059593610f0cb774b9216c37efdb6799974 /sys/dev
parent2838f69c6622a9eb3a2db9ff1466b4d5dd2eb379 (diff)
make this match our code standards
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/i2c/ad741x.c4
-rw-r--r--sys/dev/i2c/adm1021.c6
-rw-r--r--sys/dev/i2c/adm1024.c6
-rw-r--r--sys/dev/i2c/adm1025.c8
-rw-r--r--sys/dev/i2c/adm1026.c8
-rw-r--r--sys/dev/i2c/adm1030.c6
-rw-r--r--sys/dev/i2c/adm1031.c8
-rw-r--r--sys/dev/i2c/asb100.c10
-rw-r--r--sys/dev/i2c/ds1631.c4
-rw-r--r--sys/dev/i2c/lm75.c4
-rw-r--r--sys/dev/i2c/maxim6690.c6
-rw-r--r--sys/dev/i2c/sch5017.c97
12 files changed, 70 insertions, 97 deletions
diff --git a/sys/dev/i2c/ad741x.c b/sys/dev/i2c/ad741x.c
index 6cb5106f019..521814702e6 100644
--- a/sys/dev/i2c/ad741x.c
+++ b/sys/dev/i2c/ad741x.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ad741x.c,v 1.7 2006/01/19 17:08:39 grange Exp $ */
+/* $OpenBSD: ad741x.c,v 1.8 2006/04/10 00:57:23 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -124,7 +124,7 @@ adc_attach(struct device *parent, struct device *self, void *aux)
sizeof(sc->sc_sensor[i].device));
sc->sc_sensor[ADC_TEMP].type = SENSOR_TEMP;
- strlcpy(sc->sc_sensor[ADC_TEMP].desc, "Internal",
+ strlcpy(sc->sc_sensor[ADC_TEMP].desc, "Internal Temp",
sizeof(sc->sc_sensor[ADC_TEMP].desc));
nsens = 1;
diff --git a/sys/dev/i2c/adm1021.c b/sys/dev/i2c/adm1021.c
index f5541ae0ba6..4097435fc58 100644
--- a/sys/dev/i2c/adm1021.c
+++ b/sys/dev/i2c/adm1021.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adm1021.c,v 1.21 2006/01/19 17:08:39 grange Exp $ */
+/* $OpenBSD: adm1021.c,v 1.22 2006/04/10 00:57:23 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -139,12 +139,12 @@ admtemp_attach(struct device *parent, struct device *self, void *aux)
sc->sc_sensor[ADMTEMP_EXT].type = SENSOR_TEMP;
strlcpy(sc->sc_sensor[ADMTEMP_EXT].desc,
- xeon ? "Xeon" : "External",
+ xeon ? "Xeon Temp" : "External Temp",
sizeof(sc->sc_sensor[ADMTEMP_EXT].desc));
sc->sc_sensor[ADMTEMP_INT].type = SENSOR_TEMP;
strlcpy(sc->sc_sensor[ADMTEMP_INT].desc,
- xeon ? "Xeon" : "Internal",
+ xeon ? "Xeon Temp" : "Internal Temp",
sizeof(sc->sc_sensor[ADMTEMP_INT].desc));
if (sensor_task_register(sc, admtemp_refresh, 5)) {
diff --git a/sys/dev/i2c/adm1024.c b/sys/dev/i2c/adm1024.c
index fb43c6b56ac..997a38e22f1 100644
--- a/sys/dev/i2c/adm1024.c
+++ b/sys/dev/i2c/adm1024.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adm1024.c,v 1.10 2006/01/19 17:08:39 grange Exp $ */
+/* $OpenBSD: adm1024.c,v 1.11 2006/04/10 00:57:23 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -135,11 +135,11 @@ admlc_attach(struct device *parent, struct device *self, void *aux)
sizeof(sc->sc_sensor[i].device));
sc->sc_sensor[ADMLC_INT].type = SENSOR_TEMP;
- strlcpy(sc->sc_sensor[ADMLC_INT].desc, "Internal",
+ strlcpy(sc->sc_sensor[ADMLC_INT].desc, "Internal Temp",
sizeof(sc->sc_sensor[ADMLC_INT].desc));
sc->sc_sensor[ADMLC_EXT].type = SENSOR_TEMP;
- strlcpy(sc->sc_sensor[ADMLC_EXT].desc, "External",
+ strlcpy(sc->sc_sensor[ADMLC_EXT].desc, "External Temp",
sizeof(sc->sc_sensor[ADMLC_EXT].desc));
sc->sc_sensor[ADMLC_V2_5].type = SENSOR_VOLTS_DC;
diff --git a/sys/dev/i2c/adm1025.c b/sys/dev/i2c/adm1025.c
index 81fb2b172d3..5f7f45bd74f 100644
--- a/sys/dev/i2c/adm1025.c
+++ b/sys/dev/i2c/adm1025.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adm1025.c,v 1.21 2006/01/19 17:08:39 grange Exp $ */
+/* $OpenBSD: adm1025.c,v 1.22 2006/04/10 00:57:23 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -136,11 +136,11 @@ admtm_attach(struct device *parent, struct device *self, void *aux)
sizeof(sc->sc_sensor[i].device));
sc->sc_sensor[ADMTM_INT].type = SENSOR_TEMP;
- strlcpy(sc->sc_sensor[ADMTM_INT].desc, "Internal",
+ strlcpy(sc->sc_sensor[ADMTM_INT].desc, "Internal Temp",
sizeof(sc->sc_sensor[ADMTM_INT].desc));
sc->sc_sensor[ADMTM_EXT].type = SENSOR_TEMP;
- strlcpy(sc->sc_sensor[ADMTM_EXT].desc, "External",
+ strlcpy(sc->sc_sensor[ADMTM_EXT].desc, "External Temp",
sizeof(sc->sc_sensor[ADMTM_EXT].desc));
sc->sc_sensor[ADMTM_V2_5].type = SENSOR_VOLTS_DC;
@@ -176,7 +176,7 @@ admtm_attach(struct device *parent, struct device *self, void *aux)
sizeof(sc->sc_sensor[SMSC_V1_8].desc));
sc->sc_sensor[SMSC_TEMP2].type = SENSOR_TEMP;
- strlcpy(sc->sc_sensor[SMSC_TEMP2].desc, "External2",
+ strlcpy(sc->sc_sensor[SMSC_TEMP2].desc, "External2 Temp",
sizeof(sc->sc_sensor[SMSC_TEMP2].desc));
if (sensor_task_register(sc, admtm_refresh, 5)) {
diff --git a/sys/dev/i2c/adm1026.c b/sys/dev/i2c/adm1026.c
index d356794231e..29620347309 100644
--- a/sys/dev/i2c/adm1026.c
+++ b/sys/dev/i2c/adm1026.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adm1026.c,v 1.6 2006/01/19 17:08:39 grange Exp $ */
+/* $OpenBSD: adm1026.c,v 1.7 2006/04/10 00:57:23 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -166,7 +166,7 @@ admcts_attach(struct device *parent, struct device *self, void *aux)
sizeof(sc->sc_sensor[i].device));
sc->sc_sensor[ADMCTS_TEMP].type = SENSOR_TEMP;
- strlcpy(sc->sc_sensor[ADMCTS_TEMP].desc, "Internal",
+ strlcpy(sc->sc_sensor[ADMCTS_TEMP].desc, "Internal Temp",
sizeof(sc->sc_sensor[ADMCTS_TEMP].desc));
sc->sc_sensor[ADMCTS_Vbat].type = SENSOR_VOLTS_DC;
@@ -174,11 +174,11 @@ admcts_attach(struct device *parent, struct device *self, void *aux)
sizeof(sc->sc_sensor[ADMCTS_Vbat].desc));
sc->sc_sensor[ADMCTS_EXT1].type = SENSOR_TEMP;
- strlcpy(sc->sc_sensor[ADMCTS_EXT1].desc, "External1",
+ strlcpy(sc->sc_sensor[ADMCTS_EXT1].desc, "External1 Temp",
sizeof(sc->sc_sensor[ADMCTS_EXT1].desc));
sc->sc_sensor[ADMCTS_EXT2].type = SENSOR_TEMP;
- strlcpy(sc->sc_sensor[ADMCTS_EXT2].desc, "External2",
+ strlcpy(sc->sc_sensor[ADMCTS_EXT2].desc, "External2 Temp",
sizeof(sc->sc_sensor[ADMCTS_EXT2].desc));
sc->sc_sensor[ADMCTS_V3_3stby].type = SENSOR_VOLTS_DC;
diff --git a/sys/dev/i2c/adm1030.c b/sys/dev/i2c/adm1030.c
index dba434b18e3..0dea59aa5ed 100644
--- a/sys/dev/i2c/adm1030.c
+++ b/sys/dev/i2c/adm1030.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adm1030.c,v 1.4 2006/01/19 17:08:39 grange Exp $ */
+/* $OpenBSD: adm1030.c,v 1.5 2006/04/10 00:57:23 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -93,11 +93,11 @@ admtmp_attach(struct device *parent, struct device *self, void *aux)
sizeof(sc->sc_sensor[i].device));
sc->sc_sensor[ADMTMP_INT].type = SENSOR_TEMP;
- strlcpy(sc->sc_sensor[ADMTMP_INT].desc, "Internal",
+ strlcpy(sc->sc_sensor[ADMTMP_INT].desc, "Internal Temp",
sizeof(sc->sc_sensor[ADMTMP_INT].desc));
sc->sc_sensor[ADMTMP_EXT].type = SENSOR_TEMP;
- strlcpy(sc->sc_sensor[ADMTMP_EXT].desc, "External",
+ strlcpy(sc->sc_sensor[ADMTMP_EXT].desc, "External Temp",
sizeof(sc->sc_sensor[ADMTMP_EXT].desc));
sc->sc_sensor[ADMTMP_FAN].type = SENSOR_FANRPM;
diff --git a/sys/dev/i2c/adm1031.c b/sys/dev/i2c/adm1031.c
index 2beb7bd3b78..0b9feddf5c4 100644
--- a/sys/dev/i2c/adm1031.c
+++ b/sys/dev/i2c/adm1031.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adm1031.c,v 1.4 2006/01/19 17:08:39 grange Exp $ */
+/* $OpenBSD: adm1031.c,v 1.5 2006/04/10 00:57:23 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -97,15 +97,15 @@ admtt_attach(struct device *parent, struct device *self, void *aux)
sizeof(sc->sc_sensor[i].device));
sc->sc_sensor[ADMTT_INT].type = SENSOR_TEMP;
- strlcpy(sc->sc_sensor[ADMTT_INT].desc, "Internal",
+ strlcpy(sc->sc_sensor[ADMTT_INT].desc, "Internal Temp",
sizeof(sc->sc_sensor[ADMTT_INT].desc));
sc->sc_sensor[ADMTT_EXT].type = SENSOR_TEMP;
- strlcpy(sc->sc_sensor[ADMTT_EXT].desc, "External1",
+ strlcpy(sc->sc_sensor[ADMTT_EXT].desc, "External1 Temp",
sizeof(sc->sc_sensor[ADMTT_EXT].desc));
sc->sc_sensor[ADMTT_EXT2].type = SENSOR_TEMP;
- strlcpy(sc->sc_sensor[ADMTT_EXT2].desc, "External2",
+ strlcpy(sc->sc_sensor[ADMTT_EXT2].desc, "External2 Temp",
sizeof(sc->sc_sensor[ADMTT_EXT2].desc));
sc->sc_sensor[ADMTT_FAN].type = SENSOR_FANRPM;
diff --git a/sys/dev/i2c/asb100.c b/sys/dev/i2c/asb100.c
index f4e9e46161a..26bd9b36486 100644
--- a/sys/dev/i2c/asb100.c
+++ b/sys/dev/i2c/asb100.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: asb100.c,v 1.6 2006/03/04 08:14:01 djm Exp $ */
+/* $OpenBSD: asb100.c,v 1.7 2006/04/10 00:57:23 deraadt Exp $ */
/*
* Copyright (c) 2005 Damien Miller <djm@openbsd.org>
@@ -269,21 +269,21 @@ asbtm_attach(struct device *parent, struct device *self, void *aux)
sizeof(sc->sc_sensor[ASB100_SENSOR_FAN2].desc));
sc->sc_sensor[ASB100_SENSOR_TEMP0].type = SENSOR_TEMP;
- strlcpy(sc->sc_sensor[ASB100_SENSOR_TEMP0].desc, "External",
+ strlcpy(sc->sc_sensor[ASB100_SENSOR_TEMP0].desc, "External Temp",
sizeof(sc->sc_sensor[ASB100_SENSOR_TEMP0].desc));
sc->sc_sensor[ASB100_SENSOR_TEMP1].type = SENSOR_TEMP;
- strlcpy(sc->sc_sensor[ASB100_SENSOR_TEMP1].desc, "Internal",
+ strlcpy(sc->sc_sensor[ASB100_SENSOR_TEMP1].desc, "Internal Temp",
sizeof(sc->sc_sensor[ASB100_SENSOR_TEMP1].desc));
sc->sc_sensor[ASB100_SENSOR_TEMP2].type = SENSOR_TEMP;
- strlcpy(sc->sc_sensor[ASB100_SENSOR_TEMP2].desc, "Internal",
+ strlcpy(sc->sc_sensor[ASB100_SENSOR_TEMP2].desc, "Internal Temp",
sizeof(sc->sc_sensor[ASB100_SENSOR_TEMP2].desc));
if (sc->sc_satellite[1] == -1)
sc->sc_sensor[ASB100_SENSOR_TEMP2].flags |= SENSOR_FINVALID;
sc->sc_sensor[ASB100_SENSOR_TEMP3].type = SENSOR_TEMP;
- strlcpy(sc->sc_sensor[ASB100_SENSOR_TEMP3].desc, "External",
+ strlcpy(sc->sc_sensor[ASB100_SENSOR_TEMP3].desc, "External Temp",
sizeof(sc->sc_sensor[ASB100_SENSOR_TEMP3].desc));
if (sensor_task_register(sc, asbtm_refresh, 5)) {
diff --git a/sys/dev/i2c/ds1631.c b/sys/dev/i2c/ds1631.c
index 2eb38c59d18..6d20f1411ce 100644
--- a/sys/dev/i2c/ds1631.c
+++ b/sys/dev/i2c/ds1631.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ds1631.c,v 1.5 2006/01/19 17:08:39 grange Exp $ */
+/* $OpenBSD: ds1631.c,v 1.6 2006/04/10 00:57:23 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -117,7 +117,7 @@ dostart:
sizeof(sc->sc_sensor[i].device));
sc->sc_sensor[MAXDS_TEMP].type = SENSOR_TEMP;
- strlcpy(sc->sc_sensor[MAXDS_TEMP].desc, "Internal",
+ strlcpy(sc->sc_sensor[MAXDS_TEMP].desc, "Internal Temp",
sizeof(sc->sc_sensor[MAXDS_TEMP].desc));
if (sensor_task_register(sc, maxds_refresh, 5)) {
diff --git a/sys/dev/i2c/lm75.c b/sys/dev/i2c/lm75.c
index caf0ea97a77..49742c12bd6 100644
--- a/sys/dev/i2c/lm75.c
+++ b/sys/dev/i2c/lm75.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lm75.c,v 1.11 2006/01/19 17:08:39 grange Exp $ */
+/* $OpenBSD: lm75.c,v 1.12 2006/04/10 00:57:23 deraadt Exp $ */
/* $NetBSD: lm75.c,v 1.1 2003/09/30 00:35:31 thorpej Exp $ */
/*
* Copyright (c) 2006 Theo de Raadt <deraadt@openbsd.org>
@@ -177,7 +177,7 @@ lmtemp_attach(struct device *parent, struct device *self, void *aux)
strlcpy(sc->sc_sensor.device, sc->sc_dev.dv_xname,
sizeof(sc->sc_sensor.device));
sc->sc_sensor.type = SENSOR_TEMP;
- strlcpy(sc->sc_sensor.desc, "TEMP", sizeof(sc->sc_sensor.desc));
+ strlcpy(sc->sc_sensor.desc, "Temp", sizeof(sc->sc_sensor.desc));
/* Hook into the hw.sensors sysctl */
sensor_add(&sc->sc_sensor);
diff --git a/sys/dev/i2c/maxim6690.c b/sys/dev/i2c/maxim6690.c
index 5363693e7e9..59a04270a74 100644
--- a/sys/dev/i2c/maxim6690.c
+++ b/sys/dev/i2c/maxim6690.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: maxim6690.c,v 1.6 2006/01/19 17:08:39 grange Exp $ */
+/* $OpenBSD: maxim6690.c,v 1.7 2006/04/10 00:57:23 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -113,11 +113,11 @@ maxtmp_attach(struct device *parent, struct device *self, void *aux)
sizeof(sc->sc_sensor[i].device));
sc->sc_sensor[MAXTMP_INT].type = SENSOR_TEMP;
- strlcpy(sc->sc_sensor[MAXTMP_INT].desc, "Internal",
+ strlcpy(sc->sc_sensor[MAXTMP_INT].desc, "Internal Temp",
sizeof(sc->sc_sensor[MAXTMP_INT].desc));
sc->sc_sensor[MAXTMP_EXT].type = SENSOR_TEMP;
- strlcpy(sc->sc_sensor[MAXTMP_EXT].desc, "External",
+ strlcpy(sc->sc_sensor[MAXTMP_EXT].desc, "External Temp",
sizeof(sc->sc_sensor[MAXTMP_EXT].desc));
if (sensor_task_register(sc, maxtmp_refresh, 5)) {
diff --git a/sys/dev/i2c/sch5017.c b/sys/dev/i2c/sch5017.c
index 9e386e74a43..ca1a560ded3 100644
--- a/sys/dev/i2c/sch5017.c
+++ b/sys/dev/i2c/sch5017.c
@@ -1,30 +1,6 @@
-Return-Path: roman.hunt@comcast.net
-Delivery-Date: Sun Apr 9 18:44:07 2006
-Received: from shear.ucar.edu (shear.ucar.edu [192.43.244.163])
- by cvs.openbsd.org (8.13.6/8.12.1) with ESMTP id k3A0i6Jq004360
- (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=FAIL)
- for <deraadt@cvs.openbsd.org>; Sun, 9 Apr 2006 18:44:07 -0600 (MDT)
-Received: from sccrmhc12.comcast.net (sccrmhc12.comcast.net [63.240.77.82])
- by shear.ucar.edu (8.13.6/8.13.6) with ESMTP id k3A0gkf0023684
- for <deraadt@openbsd.org>; Sun, 9 Apr 2006 18:42:46 -0600 (MDT)
-Message-Id: <200604100042.k3A0gkf0023684@shear.ucar.edu>
-Date: Mon, 10 Apr 2006 00:42:44 +0000 (GMT)
-X-Comment: Sending client does not conform to RFC822 minimum requirements
-X-Comment: Date has been added by Maillennium
-Received: from murugan.hunt.net (c-68-32-116-27.hsd1.md.comcast.net[68.32.116.27])
- by comcast.net (sccrmhc12) with ESMTP
- id <2006041000424301200htfrse>; Mon, 10 Apr 2006 00:42:43 +0000
-From: Roman Hunt <roman.hunt@comcast.net>
-To: deraadt@openbsd.org, roman.hunt@comcast.net
-Subject: Here is sch5017.c the driver for the SCH5017 I2C chip
-
-Sorry for the delay in sending this. I will send the patches to GENERIC
-and files.i2c seperately.
-
-/usr/src/sys/dev/i2c/sch5017.c:
/*
* Copyright (c) 2006 Roman Hunt
- *
+ *
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
@@ -57,19 +33,19 @@ and files.i2c seperately.
#define SCH5017_RTEMP2 0x27
#define SCH5017_FAN1_LSB 0x28
#define SCH5017_FAN1_MSB 0x29
-#define SCH5017_FAN2_LSB 0x2A
-#define SCH5017_FAN2_MSB 0x2B
-#define SCH5017_FAN3_LSB 0x2C
-#define SCH5017_FAN3_MSB 0x2D
-#define SCH5017_FAN4_LSB 0x2E
-#define SCH5017_FAN4_MSB 0x2F
-#define SCH5017_VERSION 0x3F
+#define SCH5017_FAN2_LSB 0x2a
+#define SCH5017_FAN2_MSB 0x2b
+#define SCH5017_FAN3_LSB 0x2c
+#define SCH5017_FAN3_MSB 0x2d
+#define SCH5017_FAN4_LSB 0x2e
+#define SCH5017_FAN4_MSB 0x2f
+#define SCH5017_VERSION 0x3f
/*
* Sensors
*/
#define SCHENV_VCCP 0
-#define SCHENV_VCC 1
+#define SCHENV_VCC 1
#define SCHENV_5V 2
#define SCHENV_12V 3
#define SCHENV_RTEMP1 4
@@ -108,9 +84,8 @@ schenv_match(struct device *parent, void *match, void *aux)
struct i2c_attach_args *ia = aux;
if (strcmp(ia->ia_name, "sch5017") == 0)
- return (1);
- else
- return (0);
+ return (1);
+ return (0);
}
void
@@ -231,13 +206,13 @@ schenv_refresh(void *arg)
sc->sc_sensor[sensor].value = 16000000 / 256 * data;
break;
case SCHENV_RTEMP1:
- /* FALLTHROUGH */
+ /* FALLTHROUGH */
case SCHENV_ITEMP:
- /* FALLTHROUGH */
+ /* FALLTHROUGH */
case SCHENV_RTEMP2:
if (data == 0x80) {
- sc->sc_sensor[sensor].flags |= SENSOR_FINVALID;
- break;
+ sc->sc_sensor[sensor].flags |= SENSOR_FINVALID;
+ break;
}
sc->sc_sensor[sensor].value =
@@ -246,7 +221,7 @@ schenv_refresh(void *arg)
break;
case SCHENV_FAN1:
cmd = SCH5017_FAN1_LSB;
- if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
+ if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
sc->sc_addr, &cmd, sizeof cmd, &data,
sizeof data, 0)) {
sc->sc_sensor[sensor].flags |=
@@ -255,8 +230,8 @@ schenv_refresh(void *arg)
}
cmd = SCH5017_FAN1_MSB;
- if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data2,
+ if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
+ sc->sc_addr, &cmd, sizeof cmd, &data2,
sizeof data2, 0)) {
sc->sc_sensor[sensor].flags |=
SENSOR_FINVALID;
@@ -266,14 +241,14 @@ schenv_refresh(void *arg)
fanword = fanword << 8;
fanword |= data;
if (fanword == 0xFFFF) {
- sc->sc_sensor[sensor].flags |= SENSOR_FINVALID;
- break;
+ sc->sc_sensor[sensor].flags |= SENSOR_FINVALID;
+ break;
}
sc->sc_sensor[sensor].value = fanword;
break;
case SCHENV_FAN2:
cmd = SCH5017_FAN2_LSB;
- if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
+ if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
sc->sc_addr, &cmd, sizeof cmd, &data,
sizeof data, 0)) {
sc->sc_sensor[sensor].flags |=
@@ -282,8 +257,8 @@ schenv_refresh(void *arg)
}
cmd = SCH5017_FAN2_MSB;
- if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data2,
+ if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
+ sc->sc_addr, &cmd, sizeof cmd, &data2,
sizeof data2, 0)) {
sc->sc_sensor[sensor].flags |=
SENSOR_FINVALID;
@@ -293,14 +268,14 @@ schenv_refresh(void *arg)
fanword = fanword << 8;
fanword |= data;
if (fanword == 0xFFFF) {
- sc->sc_sensor[sensor].flags |= SENSOR_FINVALID;
- break;
+ sc->sc_sensor[sensor].flags |= SENSOR_FINVALID;
+ break;
}
sc->sc_sensor[sensor].value = fanword;
break;
case SCHENV_FAN3:
cmd = SCH5017_FAN3_LSB;
- if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
+ if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
sc->sc_addr, &cmd, sizeof cmd, &data,
sizeof data, 0)) {
sc->sc_sensor[sensor].flags |=
@@ -309,8 +284,8 @@ schenv_refresh(void *arg)
}
cmd = SCH5017_FAN3_MSB;
- if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data2,
+ if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
+ sc->sc_addr, &cmd, sizeof cmd, &data2,
sizeof data2, 0)) {
sc->sc_sensor[sensor].flags |=
SENSOR_FINVALID;
@@ -320,14 +295,14 @@ schenv_refresh(void *arg)
fanword = fanword << 8;
fanword |= data;
if (fanword == 0xFFFF) {
- sc->sc_sensor[sensor].flags |= SENSOR_FINVALID;
- break;
+ sc->sc_sensor[sensor].flags |= SENSOR_FINVALID;
+ break;
}
sc->sc_sensor[sensor].value = fanword;
break;
case SCHENV_FAN4:
cmd = SCH5017_FAN4_LSB;
- if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
+ if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
sc->sc_addr, &cmd, sizeof cmd, &data,
sizeof data, 0)) {
sc->sc_sensor[sensor].flags |=
@@ -336,8 +311,8 @@ schenv_refresh(void *arg)
}
cmd = SCH5017_FAN4_MSB;
- if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
- sc->sc_addr, &cmd, sizeof cmd, &data2,
+ if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
+ sc->sc_addr, &cmd, sizeof cmd, &data2,
sizeof data2, 0)) {
sc->sc_sensor[sensor].flags |=
SENSOR_FINVALID;
@@ -347,8 +322,8 @@ schenv_refresh(void *arg)
fanword = fanword << 8;
fanword |= data;
if (fanword == 0xFFFF) {
- sc->sc_sensor[sensor].flags |= SENSOR_FINVALID;
- break;
+ sc->sc_sensor[sensor].flags |= SENSOR_FINVALID;
+ break;
}
sc->sc_sensor[sensor].value = fanword;
break;
@@ -359,5 +334,3 @@ schenv_refresh(void *arg)
}
iic_release_bus(sc->sc_tag, 0);
}
-
-