示例#1
0
void
iic_attach(struct device *parent, struct device *self, void *aux)
{
	struct iic_softc *sc = (void *) self;
	struct i2cbus_attach_args *iba = aux;

	sc->sc_tag = iba->iba_tag;

#if NIPMI > 0
	extern int ipmi_enabled;

	if (ipmi_enabled) {
		printf(": disabled to avoid ipmi0 interactions\n");
		return;
	}
#endif

	printf("\n");

	/*
	 * Attach all i2c devices described in the kernel
	 * configuration file.
	 */
	config_search(iic_search, self, NULL);

	/*
	 * Scan for known device signatures.
	 */
	if (iba->iba_bus_scan)
		(iba->iba_bus_scan)(self, aux, iba->iba_bus_scan_arg);
	else
		iic_scan(self, aux);
}
示例#2
0
文件: i2c.c 项目: SylvestreG/bitrig
void
iic_attach(struct device *parent, struct device *self, void *aux)
{
	struct iic_softc *sc = (void *) self;
	struct i2cbus_attach_args *iba = aux;

	sc->sc_tag = iba->iba_tag;

	printf("\n");

	/*
	 * Attach all i2c devices described in the kernel
	 * configuration file.
	 */
	config_search(iic_search, self, NULL);

	/*
	 * Scan for known device signatures.
	 */
	if (iba->iba_bus_scan)
		(iba->iba_bus_scan)(self, aux, iba->iba_bus_scan_arg);
	else
		iic_scan(self, aux);
}