Interfacing devices with multiple parents within newbus

Arnaud Lacombe lacombar at gmail.com
Fri Jul 6 18:46:42 UTC 2012


Hi,

On Fri, Jul 6, 2012 at 11:33 AM, Arnaud Lacombe <lacombar at gmail.com> wrote:
> That's neither correct nor robust in a couple of way:
>  1) you have no guarantee a device unit will always give you the same resource.
this raises the following question: how can a device, today, figure
out which parent in a given devclass would give it access to resources
it needs.

Say, you have gpiobus0 provided by a superio and gpiobus1 provided by
the chipset and a LED on the chipset's GPIO. Now, say gpiobus0
attachment is conditional to some BIOS setting. How can you tell
gpioled(4) to attach on the chipset provided GPIO without hardcoding
unit number either way ?

AFAIK, you can not.

Even hints provided layout description is defeated. Each device in a
given devclass need to have a set of unique attribute to allow a child
to distinguish it from other potential parent in the same devclass...

 - Arnaud


More information about the freebsd-current mailing list