linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Olof Johansson <olof@lixom.net>
Cc: linuxppc-dev@ozlabs.org,
	Yoder Stuart-B08248 <stuart.yoder@freescale.com>
Subject: Re: RFC:  replace device_type with new "class" property?
Date: Tue, 30 Oct 2007 11:51:46 +1100	[thread overview]
Message-ID: <20071030005146.GF29263@localhost.localdomain> (raw)
In-Reply-To: <20071029212213.GA28073@lixom.net>

On Mon, Oct 29, 2007 at 04:22:13PM -0500, Olof Johansson wrote:
[snip]
> I don't see how switching the property name from "device_type" to
> "class" is going to stop people from misunderstanding it's intended
> use. There's nothing inherently more understandable in calling it
> "class" -- it also invites people to make up their own class names
> as they go along, just as what happened to "device_type".
> 
> I also don't understand the people wanting to use "compatible"
> for _everything_. It's just mashing together two separate pieces of
> information into one property, and I seriously don't see how that helps
> anything or anyone. It's absolutely useless for a driver to be able to
> bind to a compatible field of "standard,network" or whatever it might be,
> since there's no way that "standard," will imply that the register layout
> and programming model is somehow the same as all other standard-labelled
> devices.
> 
> So yes, there is a problem with the device trees and how people build
> them, and it requires education on how to properly craft one. I don't
> think changing the layout to either be flatter (only using compatible),
> or changing names of a property (device_type->class) will help anything
> at all.
> 
> I actually prefer keeping device_type myself, since it means existing
> OF-based device trees will already have some of the labels.

Yeah.. what he said.

The *only* substantive change with the "class" proposal is the fact
that multiple classes can be specified.  That's nice, but I don't
think it's worth the trouble of attempting to define a whole new chunk
of standard for.

Stuart, I think you overestimate the value of this class property to a
human reader.  The generic names convention (not followed as much as
it should be) means the name should give the reader some idea of what
the device is, in most cases.  For trickier cases, if we really want
something for humans reading the tree, we could add an optional
"comment" or "description" property with purely human readable
information.

I think we should leave existing IEEE1275 defined uses of device_type,
in order not to make flat trees gratuitously different from real-OF
trees, but we should avoid any new use of device_type.

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.

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

  reply	other threads:[~2007-10-30  0:51 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 [this message]
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
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=20071030005146.GF29263@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).