All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jamie Iles <jamie@jamieiles.com>
To: Artem Bityutskiy <dedekind1@gmail.com>
Cc: devicetree-discuss@lists.ozlabs.org,
	Grant Likely <grant.likely@secretlab.ca>,
	linux-mtd@lists.infradead.org,
	Scott Wood <scottwood@freescale.com>,
	Jamie Iles <jamie@jamieiles.com>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCHv6] mtd: gpio-nand: add device tree bindings
Date: Fri, 14 Oct 2011 15:21:49 +0100	[thread overview]
Message-ID: <20111014142149.GA25079@totoro> (raw)
In-Reply-To: <1318600108.12351.130.camel@sauron>

Hi Artem,

On Fri, Oct 14, 2011 at 04:48:20PM +0300, Artem Bityutskiy wrote:
> On Wed, 2011-10-12 at 00:10 +0100, Jamie Iles wrote:
> > +#ifdef CONFIG_OF
> > +static const struct of_device_id gpio_nand_id_table[] = {
> > +	{ .compatible = "gpio-control-nand" },
> > +	{}
> > +};
> > +MODULE_DEVICE_TABLE(of, gpio_nand_id_table);
> ...
> > +#else /* CONFIG_OF */
> ...
> > +#endif /* CONFIG_OF */
> 
> I wonder, why it is either OF of platform data? What if I want my kernel
> to fall-back to platform data if device tree data is absent? What is the
> general policy? Sorry, I am not very well aware of the DT stuff. But off

I think the general policy is that for device tree everything should be 
in the device tree.  There is a mechanism for device tree platforms to 
pass platform data too, but I believe this is more as a tool for 
migrating existing platforms to device tree.

Also, the device tree binding should be well documented - if the device 
is present in the tree it should have all of the required properties.  
If the device isn't there at all then it won't get registered.

> the top of my head, it is logical when things go like this: I have a
> kernel with working platform data, but I can change that dynamically by
> feeding it a device tree configuration. Hmm?

I think in general platform data and device tree should be mutually 
exclusive.

Jamie

WARNING: multiple messages have this Message-ID (diff)
From: Jamie Iles <jamie@jamieiles.com>
To: Artem Bityutskiy <dedekind1@gmail.com>
Cc: devicetree-discuss@lists.ozlabs.org,
	Grant Likely <grant.likely@secretlab.ca>,
	linux-mtd@lists.infradead.org,
	Scott Wood <scottwood@freescale.com>,
	Jamie Iles <jamie@jamieiles.com>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCHv6] mtd: gpio-nand: add device tree bindings
Date: Fri, 14 Oct 2011 15:21:49 +0100	[thread overview]
Message-ID: <20111014142149.GA25079@totoro> (raw)
In-Reply-To: <1318600108.12351.130.camel@sauron>

Hi Artem,

On Fri, Oct 14, 2011 at 04:48:20PM +0300, Artem Bityutskiy wrote:
> On Wed, 2011-10-12 at 00:10 +0100, Jamie Iles wrote:
> > +#ifdef CONFIG_OF
> > +static const struct of_device_id gpio_nand_id_table[] = {
> > +	{ .compatible = "gpio-control-nand" },
> > +	{}
> > +};
> > +MODULE_DEVICE_TABLE(of, gpio_nand_id_table);
> ...
> > +#else /* CONFIG_OF */
> ...
> > +#endif /* CONFIG_OF */
> 
> I wonder, why it is either OF of platform data? What if I want my kernel
> to fall-back to platform data if device tree data is absent? What is the
> general policy? Sorry, I am not very well aware of the DT stuff. But off

I think the general policy is that for device tree everything should be 
in the device tree.  There is a mechanism for device tree platforms to 
pass platform data too, but I believe this is more as a tool for 
migrating existing platforms to device tree.

Also, the device tree binding should be well documented - if the device 
is present in the tree it should have all of the required properties.  
If the device isn't there at all then it won't get registered.

> the top of my head, it is logical when things go like this: I have a
> kernel with working platform data, but I can change that dynamically by
> feeding it a device tree configuration. Hmm?

I think in general platform data and device tree should be mutually 
exclusive.

Jamie

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2011-10-14 14:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-11 23:10 [PATCHv6] mtd: gpio-nand: add device tree bindings Jamie Iles
2011-10-11 23:10 ` Jamie Iles
2011-10-14 13:48 ` Artem Bityutskiy
2011-10-14 13:48   ` Artem Bityutskiy
2011-10-14 14:21   ` Jamie Iles [this message]
2011-10-14 14:21     ` Jamie Iles
2011-10-14 14:25     ` Artem Bityutskiy
2011-10-14 14:25       ` Artem Bityutskiy
2011-10-14 14:43       ` Jamie Iles
2011-10-14 14:43         ` Jamie Iles
2011-10-15  3:04     ` Grant Likely
2011-10-15  3:04       ` Grant Likely
2011-10-15  5:09       ` Jamie Iles
2011-10-15  5:09         ` Jamie Iles

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=20111014142149.GA25079@totoro \
    --to=jamie@jamieiles.com \
    --cc=dedekind1@gmail.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=dwmw2@infradead.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-mtd@lists.infradead.org \
    --cc=scottwood@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.