Subject: Re: autoconf(9) tree in an odd hardware arrangement
To: Marco Trillo <>
From: Quentin Garnier <>
List: tech-kern
Date: 11/25/2007 19:18:08
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

First, I apologize if I seem to have missed parts of the discussion.  I
didn't have much time to read the lists, so I'll just make a small point
for now, and catch up later.

On Fri, Nov 23, 2007 at 10:23:15PM +0100, Marco Trillo wrote:
> Hi all,
> For an experiment, I ran into some sort of, perhaps stupid, autoconf(9)-
> -related doubt.
> The hardware arrangement looks like this (please excuse the
> poor ASCII drawing):
>              +------------+
>              |    bus     |
>              +------------+
>      /---------|         |
>      v                   v
> +------------+        +----------+
> |   Audio    |        |   I2C    |
> | controller |        |controller|
> +------------+        +----------+
>   ||                       | (I2C bus)
>   ||                       v
>   ||                   +-------+
>   \\=3D=3D=3D (audio link) =3D=3D| CODEC |->audio out
>                        +-------+
> The 'doubt' is what is the most clean way to attach an audio(4) bus
> in such an arrangement. Some functions of the audio setup need to
> configure the CODEC via the I2C bus, some functions need to configure
> the 'Audio controller', and some need to configure both devices.
> A) Attach all the devices. Defer the configuration of the 'Audio
>    controller' with config_defer(9) and then look for the 'CODEC',
>    connect to it, and attach the 'audio' bus:
>    audio_controller0 at bus0
>    [defers configuration]
>    i2c_controller0 at bus0
>    iic0 at i2c_controller0: I2C bus
>    codec0 at iic0
>    [...]
>    audio_controller0: connecting to codec0
>    audio0 at audio_controller0

This is the best approach, IMO.  As a matter of fact, this is what I did
for attimer/pcppi interaction.

I want to change config_defer(9) to pass the actual device after whose
attachment you want to defer things after, instead of the current
confusing parameter.  That way, as the driver knows more about the
hardware than autoconf(9) can ever guess, it can config_defer(bus)
instead of the (IMO unclear) config_defer(self).

Quentin Garnier - -
"See the look on my face from staying too long in one place
[...] every time the morning breaks I know I'm closer to falling"
KT Tunstall, Saving My Face, Drastic Fantastic, 2007.

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.4.6 (NetBSD)