Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/dev/i2c/i2c.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/dev/i2c/i2c.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.5 retrieving revision 1.5.10.1 diff -u -p -r1.5 -r1.5.10.1 --- src/sys/dev/i2c/i2c.c 2005/12/11 12:21:22 1.5 +++ src/sys/dev/i2c/i2c.c 2006/04/19 03:24:35 1.5.10.1 @@ -1,4 +1,4 @@ -/* $NetBSD: i2c.c,v 1.5 2005/12/11 12:21:22 christos Exp $ */ +/* $NetBSD: i2c.c,v 1.5.10.1 2006/04/19 03:24:35 elad Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -48,6 +48,7 @@ struct iic_softc { struct device sc_dev; i2c_tag_t sc_tag; + int sc_type; }; int @@ -66,7 +67,8 @@ iic_print(void *aux, const char *pnp) { struct i2c_attach_args *ia = aux; - aprint_normal(" addr 0x%x", ia->ia_addr); + if (ia->ia_addr != (i2c_addr_t)-1) + aprint_normal(" addr 0x%x", ia->ia_addr); return (UNCONF); } @@ -81,6 +83,7 @@ iic_search(struct device *parent, struct ia.ia_tag = sc->sc_tag; ia.ia_addr = cf->cf_loc[IICCF_ADDR]; ia.ia_size = cf->cf_loc[IICCF_SIZE]; + ia.ia_type = sc->sc_type; if (config_match(parent, cf, &ia) > 0) config_attach(parent, cf, &ia, iic_print); @@ -100,13 +103,14 @@ iic_match(struct device *parent, struct static void iic_attach(struct device *parent, struct device *self, void *aux) { - struct iic_softc *sc = (void *) self; + struct iic_softc *sc = device_private(self); struct i2cbus_attach_args *iba = aux; aprint_naive(": I2C bus\n"); aprint_normal(": I2C bus\n"); sc->sc_tag = iba->iba_tag; + sc->sc_type = iba->iba_type; /* * Attach all i2c devices described in the kernel