devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mitch Bradley <wmb-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
To: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: Devicetree Discuss
	<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>
Subject: Re: [PATCH v2 REPOST] dtc: Add support for named integer constants
Date: Wed, 11 Jan 2012 14:05:28 -1000	[thread overview]
Message-ID: <4F0E23C8.8030009@firmworks.com> (raw)
In-Reply-To: <74CDBE0F657A3D45AFBB94109FB122FF177EE3A7A5-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>

I find it ironic that the very first device tree implementation, dating 
back to 1989, was built around a Turing complete language.

On 1/11/2012 11:36 AM, Stephen Warren wrote:
> Jon Loeliger wrote at Wednesday, January 11, 2012 7:38 AM:
>>> On Tue, Jan 10, 2012 at 01:54:30PM -0800, Stephen Warren wrote:
>>>> John, David,
>>>>
>>>> What can we do to reach consensus on expanding dtc to handle named
>>>> constants, or in general any future direction to extend the syntax with
>>>> expressions etc.?
>>>
>>> Hrm, so, I'm not at all keen to add a named constant syntax without at
>>> least having an outline of what a future macro/function syntax would
>>> look like.
>>
>> Which is where I thought it was left earlier...? :-)
>> And it's not just what the macro/function syntax will look like,
>> but also how these will play into a more generalized expression
>> handling mechanism.  Defining something one-off now that doesn't
>> fit well into a long term plan is less than ideal.
>>
>> Yes, I know that is tantamount to requiring the whole, larger
>> picture be solved first.  But Dave is right -- at least an outline
>> of the direction.  Seriously, the lexical problems can form some
>> of the nastiest gotchas if we're not careful from the onset.
>
> So that all makes sense.
>
> My question is: How can we get consensus on what we want that complete
> future syntax to be? IIRC, Jon has a branch that implements a proposal,
> and David at least posted a different proposal if not actual code that
> implemented it. We're not missing proposals, but rather a mechanism to
> decide between them?
>
> For what it's worth, I'd tend towards a simple expression-based syntax
> where property values can be calculated with C-style expressions. Basic
> math stuff like ( ) + - * /&  | ~<<  >>  and some basic string handling
> operations (str(int) and concatenation). I think that'd cover the vast
> majority of use-cases wouldn't it? For more advanced stuff like loops
> to synthesize multiple nodes, it seems like writing a custom script to
> generate the .dts file and then passing the result to dtc would be more
> modular, and not require us to create a whole new Turing-complete
> language in dtc?
>

  parent reply	other threads:[~2012-01-12  0:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-12 20:04 [PATCH v2 REPOST] dtc: Add support for named integer constants Stephen Warren
     [not found] ` <1323720257-23847-1-git-send-email-swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-12-12 20:19   ` Simon Glass
     [not found]     ` <CAPnjgZ3Rnbu6qZponnbQ8bRgABb-58HG-yYSxRu2FZfvwPnMJw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-12-12 20:23       ` Stephen Warren
     [not found]         ` <74CDBE0F657A3D45AFBB94109FB122FF1751860874-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2012-01-04  0:46           ` Simon Glass
     [not found]             ` <CAPnjgZ19s-O2m3CnrfSNLhg4hA61kKiwFym7pOTZ=C7kG+SVbA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-01-05 21:27               ` Stephen Warren
     [not found]                 ` <74CDBE0F657A3D45AFBB94109FB122FF17761F17D5-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2012-01-10 21:54                   ` Stephen Warren
     [not found]                     ` <74CDBE0F657A3D45AFBB94109FB122FF177EE3A52D-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2012-01-11 13:00                       ` David Gibson
     [not found]                         ` <20120111130056.GK4935-MK4v0fQdeXQXU02nzanrWNbf9cGiqdzd@public.gmane.org>
2012-01-11 14:38                           ` Jon Loeliger
     [not found]                             ` <E1RkzJs-000590-4s-CYoMK+44s/E@public.gmane.org>
2012-01-11 21:36                               ` Stephen Warren
     [not found]                                 ` <74CDBE0F657A3D45AFBB94109FB122FF177EE3A7A5-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2012-01-12  0:05                                   ` Mitch Bradley [this message]
     [not found]                                     ` <4F0E23C8.8030009-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
2012-01-12 14:11                                       ` Jon Loeliger
2012-01-16  1:54                                   ` David Gibson
     [not found]                                     ` <20120116015421.GC4512-MK4v0fQdeXQXU02nzanrWNbf9cGiqdzd@public.gmane.org>
2012-01-16 14:41                                       ` Jon Loeliger
     [not found]                                         ` <E1RmnkQ-0006W9-OT-CYoMK+44s/E@public.gmane.org>
2012-01-21 21:56                                           ` David Gibson
2012-01-11 22:10                               ` David VomLehn (dvomlehn)
     [not found]                                 ` <7A9214B0DEB2074FBCA688B30B04400D03AD6CD4-2KNrN6/GZtCQwNoRDPPJJaBKnGwkPULj@public.gmane.org>
2012-01-13  7:00                                   ` Shawn Guo

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=4F0E23C8.8030009@firmworks.com \
    --to=wmb-d5eqfidgl7eakbo8gow8eq@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    /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).