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: linuxppc-dev@ozlabs.org, 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: Thu, 3 May 2007 10:17:29 +1000	[thread overview]
Message-ID: <20070503001729.GB4331@localhost.localdomain> (raw)
In-Reply-To: <9696D7A991D0824DBA8DFAC74A9C5FA302D5E1A9@az33exm25.fsl.freescale.net>

On Wed, May 02, 2007 at 12:04:11PM -0700, Yoder Stuart-B08248 wrote:
>  
> 
> > -----Original Message-----
> > From: David Gibson [mailto:david@gibson.dropbear.id.au] 
> > Sent: Tuesday, May 01, 2007 8:20 PM
> > To: Segher Boessenkool
> > Cc: Yoder Stuart-B08248; linuxppc-dev@ozlabs.org; 
> > bluesmoke-devel@lists.sourceforge.net
> > Subject: Re: RFC: new device types in the device tree (RE: 
> > [PATCH] powerpc: Add EDAC platform devices for 85xx)
> > 
> > On Wed, May 02, 2007 at 02:34:45AM +0200, Segher Boessenkool wrote:
> > > >> "name" = "memory-controller"
> > > >> "compatible" = "fsl,85xx-memory-controller"
> > > >> (or a more specific 85xx model if the controller
> > > >> isn't identical across those chips)
> > > >> No "device_type" at all, since there is no binding
> > > >> for this kind of device.
> > > >
> > > > Is "no device_type" really the approach that should be
> > > > taken?
> > > 
> > > Yes.
> > > 
> > > > booting-without-of.txt currently reads:
> > > >
> > > >    Every node which actually represents an actual device
> > > >    (that is, a node which isn't only a virtual "container"
> > > >    for more nodes, like "/cpus" is) is also required to
> > > >    have a "device_type" property indicating the type of
> > > >    node
> > > 
> > > That is wrong, IMNSHO.
> > 
> > I tend to agree. Device drivers should generally be searching on the
> > "compatible" property, not "device_type".  Defining new device_type
> > values isn't really of any use to the kernel, so we should just avoid
> > it.
> 
> Right-- drivers search on "compatible".
> 
> But, don't we want to keep standardized sets of properties for
> certain classes/types of devices?  Defining a standardized,
> required set of properties for a "network", "rom", or "i2c"
> class of device is helpful.  Without a standardized 'template'
> of properties, developers may make up whatever properties they
> want and things will work fine as long as the device tree and
> driver are in sync.  It works, but you wind up with a plethora
> of properties each describing the same thing.

If there's an obvious new class, with common properties, then yes,
sure.  But I don't think we need to feel impelled to think up new
classes (and therefore a device_type value) for each new device.  

And even in the case of new classes, I think we might be best off
waiting for a few devices to appear so we can tell what's really
common information before we define the class's device_type and
required properties.

> If we do away with device_type,
> what is it that defines a particular node to be a certain class
> of device.

I'm not suggesting doing away with device_type, just making it
optional.

-- 
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-05-03  0:17 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 [this message]
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
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=20070503001729.GB4331@localhost.localdomain \
    --to=david@gibson.dropbear.id.au \
    --cc=bluesmoke-devel@lists.sourceforge.net \
    --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).