linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: "Yoder Stuart-B08248" <stuart.yoder@freescale.com>
Cc: linuxppc-dev@ozlabs.org, david@gibson.dropbear.id.au,
	bluesmoke-devel@lists.sourceforge.net
Subject: Re: RFC: new device types in the device tree (RE: [PATCH] powerpc: Add EDAC platform devices for 85xx)
Date: Sat, 5 May 2007 02:07:08 +0200	[thread overview]
Message-ID: <9585558cf3330e1b18e9becfa3b24864@kernel.crashing.org> (raw)
In-Reply-To: <9696D7A991D0824DBA8DFAC74A9C5FA302D5E891@az33exm25.fsl.freescale.net>

>>> name is always optional (as defined by b-w-of.txt)
>>
>> Where does it say that?  "name" is always required!  In
>> the newer flat tree format, it's even impossible to
>> create a node without "name".
>
> I'm specifically referring to the "name" property.  Here is
> what booting-without-of.txt says:

Okay, a few separate issues here...

>    While earlier users of Open Firmware like OldWorld
>    macintoshes tended to use the actual device name for
>    the "name" property, it's nowadays considered a good
>    practice to use a name that is closer to the device
>    class (often equal to device_type)...

Yes, this is known as "generic names" -- it makes device
trees more readable and easier to use (on real OF).  See
the "generic names" recommended practice document.

> [snip]... However,
>    the kernel doesn't generally put any restriction on the
>    "name" property; it is simply considered good practice
>    to follow the standard and its evolutions as closely as
>    possible.

When the kernel looks for a driver for a device node,
it should first consider "name" and after that the
entries in "compatible", in order.

Yes I know this is not what the kernel does most of
the time.

>    Note also that the new format version 16 makes the
>    "name" property optional. If it's absent for a node, then
>    the node's unit name is then used to reconstruct the name.
>    That is, the part of the unit name before the "@" sign
>    is used (or the entire unit name if no "@" sign is present).
>
> If the name property is missing the kernel contructs it from
> the unit name.

So there _always_ is a "name" property.  Who cares how
it is encoded in the DTB.

> I guess my point is the name property implies
> nothing and the kernel doesn't seem to care what name is used.

It does, in some cases.  See the bindings for "isa" and "pci"
busses for example (for the bus nodes, not the device nodes
under those).

> It certainly doesn't imply a required set of properties.

That depends on the specific binding for the type of
device; in most cases, some binding specific properties
_are_ required.


Segher

  reply	other threads:[~2007-05-05  0:07 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-25 21:37 [PATCH] powerpc: Add EDAC platform devices for 85xx Dave Jiang
2007-04-26  0:08 ` David Gibson
2007-04-26  0:37   ` Dave Jiang
2007-04-26 14:31     ` Kumar Gala
2007-04-26 16:56       ` Dave Jiang
2007-04-26 18:56         ` Segher Boessenkool
2007-05-01 15:11           ` RFC: new device types in the device tree (RE: [PATCH] powerpc: Add EDAC platform devices for 85xx) Yoder Stuart-B08248
2007-05-02  0:34             ` Segher Boessenkool
2007-05-02  1:19               ` David Gibson
2007-05-02 19:04                 ` Yoder Stuart-B08248
2007-05-03  0:17                   ` David Gibson
2007-05-03  0:55                     ` Segher Boessenkool
2007-05-04 15:29                     ` Yoder Stuart-B08248
2007-05-03  0:54                   ` Segher Boessenkool
2007-05-02 18:50               ` Yoder Stuart-B08248
2007-05-03  0:48                 ` Segher Boessenkool
2007-05-04 15:16                   ` Yoder Stuart-B08248
2007-05-05  0:07                     ` Segher Boessenkool [this message]
2007-04-30 17:37       ` [PATCH] powerpc: Add EDAC platform devices for 85xx Dave Jiang
2007-05-01 18:32       ` [PATCH] powerpc: publish 85xx soc devices as of_device on cds and ads Dave Jiang
2007-05-07 23:26         ` [PATCH] powerpc: add dts entries to 85xx for EDAC Dave Jiang
2007-05-08  3:42           ` Olof Johansson
2007-05-08 17:34             ` Dave Jiang
2007-05-08 13:16           ` Kumar Gala
2007-05-08 17:08             ` Dave Jiang
2007-05-09 14:40               ` Segher Boessenkool
2007-05-09 16:53                 ` Dave Jiang
2007-05-10  5:25                   ` Kumar Gala
2007-05-10 17:03                     ` Dave Jiang
2007-05-15 18:20                       ` Kumar Gala

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=9585558cf3330e1b18e9becfa3b24864@kernel.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=bluesmoke-devel@lists.sourceforge.net \
    --cc=david@gibson.dropbear.id.au \
    --cc=linuxppc-dev@ozlabs.org \
    --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).