summaryrefslogtreecommitdiff
path: root/sys/dev/i2c
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2007-10-24 19:01:00 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2007-10-24 19:01:00 +0000
commitc714cacd141cf760172df4ee096001cc2d89a2e4 (patch)
treed4e92c94799a29f9e8fb975cb67df5a30bab6592 /sys/dev/i2c
parentc4998b6d88072c1048e6cfaa492184914609d0f9 (diff)
Uncomment PECI mode diagnosting bits.
ok deraadt
Diffstat (limited to 'sys/dev/i2c')
-rw-r--r--sys/dev/i2c/asc7621.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/sys/dev/i2c/asc7621.c b/sys/dev/i2c/asc7621.c
index f602264cba5..c52f1a7d08a 100644
--- a/sys/dev/i2c/asc7621.c
+++ b/sys/dev/i2c/asc7621.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: asc7621.c,v 1.2 2007/09/07 23:56:33 deraadt Exp $ */
+/* $OpenBSD: asc7621.c,v 1.3 2007/10/24 19:00:59 mikeb Exp $ */
/*
* Copyright (c) 2007 Mike Belopuhov
@@ -146,9 +146,7 @@ adl_attach(struct device *parent, struct device *self, void *aux)
{
struct adl_softc *sc = (struct adl_softc *)self;
struct i2c_attach_args *ia = aux;
-#if 0
u_int8_t cmd, data;
-#endif
int i;
sc->sc_tag = ia->ia_tag;
@@ -160,17 +158,14 @@ adl_attach(struct device *parent, struct device *self, void *aux)
strlcpy(sc->sc_sensordev.xname, sc->sc_dev.dv_xname,
sizeof(sc->sc_sensordev.xname));
-#if 0
/* Check for PECI mode */
cmd = ASC7621_PECI;
- if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr,
- &cmd, sizeof(cmd), &data, sizeof(data), 0)) {
- printf(", unable to read PECI status register\n");
- }
- if (data & ASC7621_PECI_MASK) {
+ (void)iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr,
+ &cmd, sizeof(cmd), &data, sizeof(data), 0);
+ if (data & ASC7621_PECI_MASK)
printf(", PECI enabled\n");
- peci_enabled = 1;
- }
+
+#if 0
/* Check for legacy mode */
cmd = ASC7621_LEGACY;
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr,