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

Yoder Stuart-B08248 stuart.yoder at freescale.com
Fri Jun 15 01:53:20 EST 2007


 

> -----Original Message-----
> From: linuxppc-dev-bounces+b08248=freescale.com at ozlabs.org 
> [mailto:linuxppc-dev-bounces+b08248=freescale.com at ozlabs.org] 
> On Behalf Of Segher Boessenkool
> Sent: Thursday, June 14, 2007 10:36 AM
> To: Yoder Stuart-B08248
> Cc: linuxppc-dev at ozlabs.org; Olaf Hering; paulus at samba.org
> Subject: Re: [patch 29/30] PS3: Device tree source.
> 
> >> "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.

But the recommended practice doesn't have an "...if".  It says
"compatible" must always be present.

The reason an OS would need to support "name" as well as 
"compatbile" for device driver matching would be
for _legacy_ device trees that don't follow the recommended
practice.

For newly developed trees "compatible" should specify the programming
model, if we are following that recommended practice.

So bottom line is that we shouldn't be moving toward using "name"
to specify the programming model.

[snip]

> 
> 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.

As mentioned above, matching on "name" would seem to be
needed to handle legacy device trees as I read some of
the reasoning in the generic names recommended practice.
Not sure if that applies to Linux or not... 

Stuart



More information about the Linuxppc-dev mailing list