linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Yoder Stuart-B08248 <stuart.yoder@freescale.com>
Cc: Olof Johansson <olof@lixom.net>, linuxppc-dev@ozlabs.org
Subject: Re: RFC:  replace device_type with new "class" property?
Date: Thu, 1 Nov 2007 09:55:23 +1100	[thread overview]
Message-ID: <20071031225523.GA16119@localhost.localdomain> (raw)
In-Reply-To: <9696D7A991D0824DBA8DFAC74A9C5FA3035F2AC3@az33exm25.fsl.freescale.net>

On Wed, Oct 31, 2007 at 08:31:02AM -0700, Yoder Stuart-B08248 wrote:
>  
> > > I think what we should do is keep device_type, including
> > > permitting new uses of it in a limited way-- only permitting
> > > the use of device_type when there is an official binding
> > > (like in the power.org ePAPR) defined.    
> > 
> > That's what I was thinking when we first started defining flat tree
> > bindings.  But the more time I've spent thinking about it, and the
> > more time I've spent reviewing people's proposed bindings, the less
> > useful I think it is.
> > 
> > The *only* reason I'm suggesting leaving device_type values for
> > IEEE1275 defined classes is so that flat trees written as flat trees
> > look more similar to OF derived trees.
> > 
> > > > Explicitly specifying what device class bindings / conventions the
> > > > node complies with is cute, but not actually all that useful in
> > > > practice.  If it looks like a "duck" class device node, and it
> > > > quacks^Whas the properties of a "duck" class device node, 
> > it's "duck"
> > > > class compliant.
> > > > 
> > > > Or to look at it another way, "class bindings" aren't 
> > really bindings,
> > > > but rather a set of conventions that device bindings for specific
> > > > devices in that class ought to follow.
> > > 
> > > I tend to think of a 'binding' as a 'set of conventions'.
> > 
> > Well, whatever.  My point is that conventions are most flexible if you
> > don't have to explicitly announce that you're following them - you
> > just go ahead and follow as many conventions as make sense for your
> > device.
> 
> Let me repeat what I think you are advocating--  we should
> treat the collection of properties for 'established' device
> classes like like "network", "serial", etc as a set of useful 
> conventions.  That is, there are no set of _required_ properties
> per se, but the device tree creator picks from the established
> properties plus supplementing with "company,xyz" properties
> in whatever way they think makes sense for them.

Not the device tree creater, the device binding creator (though for
"one-off" type devices those may be the same person).

> This works...but certainly is weaker with respect to
> standardization.  My previous argument had the assumption
> that something like "mac-address" in a network node was
> _required_, and thus needed a class id of some sort to tie
> the standardized node to.

Not for a network device type that represented a point-to-point link..

(Well, technically most nodes should lack 'mac-address', but I think
'local-mac-address' is what you meant)

> If we relax things so there are no required properties for
> device nodes, then I agree that a device class property
> has limited or no value.

There are required properties, but the requrements are done at the
device binding (i.e. compatible property) level.  Those bindings might
in turn reference class requirements ("A foobaz-ethernet node must
have all the standard properties for a network node described in
Sx.y.z, and in addition must have foobaz,frobnication-quotient").

> However, maybe we do want to keep device_type in 
> a very limited way to define requirements for what you
> call 'fundamental' types of nodes.  It may be that certain
> properties in a "cpu" node (like cache-size?) should be
> _required_ so that an OS that consumes the device tree
> can really count on certain properties being there.  Or,
> I guess we could use "compatible" for that...?

No, I'm saying keep device_type for cpu and memory - we could do
otherwise but it would be a gratuitous divergence from OF trees.  And
yes they should have their required properties, too.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

  parent reply	other threads:[~2007-10-31 22:55 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-29 14:37 RFC: replace device_type with new "class" property? Yoder Stuart-B08248
2007-10-29 15:20 ` Matt Sealey
2007-10-29 16:11   ` Scott Wood
2007-10-29 17:27     ` Dale Farnsworth
2007-10-29 19:02       ` Matt Sealey
2007-10-29 19:30         ` Scott Wood
2007-10-29 19:34         ` Yoder Stuart-B08248
2007-10-29 19:44           ` Scott Wood
2007-10-29 20:20             ` Yoder Stuart-B08248
2007-10-29 23:03           ` Dale Farnsworth
2007-10-30  0:29           ` David Gibson
2007-10-30  0:26       ` David Gibson
2007-10-29 18:55     ` Matt Sealey
2007-10-29 19:21       ` Scott Wood
2007-10-30  0:23     ` David Gibson
2007-10-29 21:22 ` Olof Johansson
2007-10-30  0:51   ` David Gibson
2007-10-30 14:56     ` Yoder Stuart-B08248
2007-10-30 23:27       ` David Gibson
2007-10-31 15:25         ` Yoder Stuart-B08248
2007-10-31 15:31         ` Yoder Stuart-B08248
2007-10-31 17:06           ` Scott Wood
2007-10-31 18:05             ` Yoder Stuart-B08248
2007-10-31 22:55           ` David Gibson [this message]
2007-10-30 16:23     ` Yoder Stuart-B08248
2007-10-30 16:33       ` Scott Wood
2007-10-30 19:06         ` Yoder Stuart-B08248
2007-10-30 19:38           ` Grant Likely
2007-10-30 23:02           ` David Gibson
2007-10-30 22:58       ` David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071031225523.GA16119@localhost.localdomain \
    --to=david@gibson.dropbear.id.au \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=olof@lixom.net \
    --cc=stuart.yoder@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).