From 5c6a275d22890d00126f51fb7cbff1aa01948aca Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sun, 1 Jan 2006 20:52:29 +0000 Subject: switch from macppc-specific maciic(4) driver to the generic iic(4), after teaching it to use a function pointer to get back to the OFW scan.. this will also help the sparc64 later; ok kettenis --- sys/arch/macppc/dev/smu.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'sys/arch/macppc/dev/smu.c') diff --git a/sys/arch/macppc/dev/smu.c b/sys/arch/macppc/dev/smu.c index d9a0219ccd9..70e7edc67d9 100644 --- a/sys/arch/macppc/dev/smu.c +++ b/sys/arch/macppc/dev/smu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smu.c,v 1.9 2005/12/09 22:55:10 kettenis Exp $ */ +/* $OpenBSD: smu.c,v 1.10 2006/01/01 20:52:25 deraadt Exp $ */ /* * Copyright (c) 2005 Mark Kettenis @@ -175,7 +175,7 @@ smu_attach(struct device *parent, struct device *self, void *aux) { struct smu_softc *sc = (struct smu_softc *)self; struct confargs *ca = aux; - struct maci2cbus_attach_args iba; + struct i2cbus_attach_args iba; struct smu_fan *fan; struct smu_sensor *sensor; int nseg, node; @@ -347,10 +347,13 @@ smu_attach(struct device *parent, struct device *self, void *aux) sc->sc_i2c_tag.ic_exec = smu_i2c_exec; node = OF_getnodebyname(ca->ca_node, "smu-i2c-control"); + node = OF_child(node); - /* XXX */ - iba.iba_node = OF_child(node); + bzero(&iba, sizeof iba); + iba.iba_name = "iic"; iba.iba_tag = &sc->sc_i2c_tag; + iba.iba_bus_scan = maciic_scan; + iba.iba_bus_scan_arg = &node; config_found(&sc->sc_dev, &iba, NULL); } -- cgit v1.2.3