Date: Sun, 1 Mar 2009 16:44:12 -0500 From: Justin Hibbits <jrh29@alumni.cwru.edu> To: Marco Trillo <marcotrillo@gmail.com> Cc: freebsd-ppc@freebsd.org Subject: Re: No mixer with Snapper Message-ID: <20090301214412.GA1055@narn.knownspace> In-Reply-To: <b9c23c9f0903010813p8d1aa55nd2a3f6d94547862b@mail.gmail.com> References: <20090228165533.GA1166@narn.knownspace> <b9c23c9f0903010445k32205622u6dca98b98a26e93b@mail.gmail.com> <20090301142432.GC1166@narn.knownspace> <b9c23c9f0903010813p8d1aa55nd2a3f6d94547862b@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
On Sun, Mar 01, 2009 at 05:13:13PM +0100, Marco Trillo wrote:
> Hi,
>
> Thanks! The problem is that an <i2c-address> property is used, while
> the OFW-I2C code only looks for <reg>.
>
> The attached patch -- to apply in /usr/src/sys -- makes the OFW-I2C
> code also look for the <i2c-address> property. With the patch, the
> mixer should attach and work fine.
>
> Regards
> Marco
> --- dev/ofw/ofw_iicbus.c.orig 2009-03-01 16:41:57.000000000 +0100
> +++ dev/ofw/ofw_iicbus.c 2009-03-01 16:45:50.000000000 +0100
> @@ -118,7 +118,8 @@
> node = ofw_bus_get_node(dev);
>
> for (child = OF_child(node); child != 0; child = OF_peer(child)) {
> - if (OF_getprop(child, "reg", &addr, sizeof(addr)) == -1)
> + if (OF_getprop(child, "reg", &addr, sizeof(addr)) == -1 &&
> + OF_getprop(child, "i2c-address", &addr, sizeof(addr)) == -1)
> continue;
>
> /*
Marco,
The patch worked perfectly, thanks.
- Justin
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090301214412.GA1055>
