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: Wed, 31 Oct 2007 09:58:27 +1100	[thread overview]
Message-ID: <20071030225827.GA2784@localhost.localdomain> (raw)
In-Reply-To: <9696D7A991D0824DBA8DFAC74A9C5FA3035F278B@az33exm25.fsl.freescale.net>

On Tue, Oct 30, 2007 at 09:23:14AM -0700, Yoder Stuart-B08248 wrote:
> 
> > 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.
> 
> Don't know how cute it is, but I think it is practically 
> helpful.   Take another example:
> 
> Say you-- a human reader-- see this in a device
> tree:
> 
> ...
> interrupts = <b 8>;
> interrupt-parent = < &mpic >;
> ...
> 
> What does the 'b' and '8' mean?  You look
> at the interrupt controller node--
> 
>   mpic: pic@40000 {
>      clock-frequency = <0>;
>      interrupt-controller;
>      #address-cells = <0>;
>      #interrupt-cells = <2>;
>      reg = <40000 40000>;
>      compatible = "fsl,xyz";
>      big-endian;
> }
> 
> Note-- I removed the device_type property and changed
> compatible somewhat.  How are you going to find where
> the meaning interrupt controller's interrupt cells are
> defined?   What spec will you look at?
> 
> device_type = "open-pic"; makes it perfectly clear.
> It's an open-pic type controller and follows that
> binding.

That's an extremely contrived example - it only works because for
historical reasons the "open-pic" device_type describes a programming
model as well as an OF method interface.  In general, you always need
to look at a node's "compatible" and the binding for that to work out
what it's properties mean, or if it's an interrupt controller what the
format of its interrupt specifiers is.

open-pic is the *only* example I can think of where device_type will
tell you this.  In fact, "open-pic" really belongs in compatible.

-- 
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-30 22:58 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
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 [this message]

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=20071030225827.GA2784@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).