diff options
author | Alexander Yurchenko <grange@cvs.openbsd.org> | 2005-12-20 05:42:33 +0000 |
---|---|---|
committer | Alexander Yurchenko <grange@cvs.openbsd.org> | 2005-12-20 05:42:33 +0000 |
commit | 9039a07b0e8eda34651f5dde950c2f6b36f53852 (patch) | |
tree | a87b1206a819132a36320bbd31dc9f79bf22e766 /sys/dev/i2c | |
parent | c226a1a5746a6ef88d5315d2c1060b2004d48c7d (diff) |
Do bus scanning only if underlying controller asked for it.
Diffstat (limited to 'sys/dev/i2c')
-rw-r--r-- | sys/dev/i2c/i2c.c | 5 | ||||
-rw-r--r-- | sys/dev/i2c/i2cvar.h | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/i2c/i2c.c b/sys/dev/i2c/i2c.c index b10da67a8a7..1cb87375a11 100644 --- a/sys/dev/i2c/i2c.c +++ b/sys/dev/i2c/i2c.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i2c.c,v 1.3 2005/12/19 19:36:46 grange Exp $ */ +/* $OpenBSD: i2c.c,v 1.4 2005/12/20 05:42:32 grange Exp $ */ /* $NetBSD: i2c.c,v 1.1 2003/09/30 00:35:31 thorpej Exp $ */ /* @@ -137,5 +137,6 @@ iic_attach(struct device *parent, struct device *self, void *aux) /* * Scan for known device signatures. */ - iic_scan(self, aux); + if (iba->iba_scan) + iic_scan(self, aux); } diff --git a/sys/dev/i2c/i2cvar.h b/sys/dev/i2c/i2cvar.h index cc2da79e84f..0081a2ae828 100644 --- a/sys/dev/i2c/i2cvar.h +++ b/sys/dev/i2c/i2cvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: i2cvar.h,v 1.3 2005/12/19 19:36:46 grange Exp $ */ +/* $OpenBSD: i2cvar.h,v 1.4 2005/12/20 05:42:32 grange Exp $ */ /* $NetBSD: i2cvar.h,v 1.1 2003/09/30 00:35:31 thorpej Exp $ */ /* @@ -94,6 +94,7 @@ typedef struct i2c_controller { struct i2cbus_attach_args { const char *iba_name; /* bus name ("iic") */ i2c_tag_t iba_tag; /* the controller */ + int iba_scan; /* do bus scanning */ }; /* Used to attach devices on the i2c bus. */ |