summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-10-30 07:10:35 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-10-30 07:10:35 +0000
commit8c44a592d3e36f33cecad9c3586427ba7ab22fbb (patch)
tree5c9728c17a6e00b64f4b8cfaf315511a0ebe1233 /sys/dev
parent3f22b98a76afeccbbb5e892d56c8c58ad3162ddb (diff)
print some word reads as well in the verbose output
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/i2c/i2c_scan.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c
index 5d519c1168f..04880775386 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.110 2007/10/25 03:36:01 deraadt Exp $ */
+/* $OpenBSD: i2c_scan.c,v 1.111 2007/10/30 07:10:34 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt <deraadt@openbsd.org>
@@ -430,16 +430,20 @@ iic_dump(struct device *dv, u_int8_t addr, char *name)
val = i;
}
- if (cnt <= 254) {
- printf("%s: addr 0x%x", dv->dv_xname, addr);
- for (i = 0; i <= 0xff; i++) {
- if (iicprobe(i) != val)
- printf(" %02x=%02x", i, iicprobe(i));
- }
- if (name)
- printf(": %s", name);
- printf("\n");
+ if (cnt == 255)
+ return;
+
+ printf("%s: addr 0x%x", dv->dv_xname, addr);
+ for (i = 0; i <= 0xff; i++) {
+ if (iicprobe(i) != val)
+ printf(" %02x=%02x", i, iicprobe(i));
}
+ printf(" words", dv->dv_xname, addr);
+ for (i = 0; i < 16; i++)
+ printf(" %02x=%04x", i, iicprobew(i));
+ if (name)
+ printf(": %s", name);
+ printf("\n");
}
#endif /* I2C_VERBOSE */