[patch 29/30] PS3: Device tree source.

Segher Boessenkool segher at kernel.crashing.org
Fri Jun 15 01:36:05 EST 2007


>> "compatible" is only needed if your "name" is bogus, or your
>> machine _actually_ is 100% compatible to some other machine.
>
> Segher,
>
> I don't understand this if we are following the 'Generic Names'
> recommendation (which I thought we were).

Yes, we should follow that recommended practice.

> Guideline 1: "name" property values must be generic, reflecting
> the device's function, but not necessarily its precise programming
> model.

Yes -- a short clear name that makes device tree paths
easily readable (and easy to type ;-) ) for human beings.

> Guideline 2: The "compatible" property must be present.

...if "name" doesn't perform the same function yet, which
of course is almost always.

> Its first
> component should be an explicit, unique name that identifies the
> device precisely enough to be able to infer the detailed programming
> model from that name. The format of that explicit name is
> manufacturer,model,...

Yep.  You understand "generic names" just fine.

> I read that and my understand is that _compatible_ is required
> and specifies the precise programming model.  name is supposed
> to be generic-- currently booting-without-of.txt says the
> property is optional because the name can be inferred from
> the node name which should be generic.

"node name" in flat device trees doesn't allow a proper
"name" property to exist for the root node.  This is a
bug in the flat device tree tools, and either should be
fixed, or this should be clearly documented as a divergence
from "real" OF.

"name" of the root node is a bit special, since it is
never displayed as part of a device path or used for
device selection (instead, "/" at start of a path is
handled specially, just like on unix filesystems).

Since anything that matches for "compatible" entries
also first should check the "name" contents, it should
be okay for flat device trees to have the information
that could/should be in "name" in "compatible", instead.

Does this answer all questions / clarify my position
on all this?

Cheers,


Segher




More information about the Linuxppc-dev mailing list