Devicetree
 help / color / mirror / Atom feed
From: John Bonesio <bones-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: Re: [PATCH] Implements new features for updating existing device tree nodes.
Date: Sat, 16 Oct 2010 06:45:47 -0700	[thread overview]
Message-ID: <1287236747.4535.1424.camel@riker> (raw)
In-Reply-To: <20101016081012.GH653-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>

On Sat, 2010-10-16 at 02:10 -0600, Grant Likely wrote:
> On Sat, Oct 16, 2010 at 05:47:44PM +1100, David Gibson wrote:
> > On Fri, Oct 15, 2010 at 08:21:17PM -0700, John Bonesio wrote:
> > > On Fri, 2010-10-15 at 20:35 -0600, Grant Likely wrote:
> > [snip]
> > > > > +       | devicetree DT_REMOVENODE DT_REF ';'
> > > > > +               {
> > > > > +                       struct node *target;
> > > > > +
> > > > > +                       target = get_node_by_label($1, $3);
> > > > > +                       if (target)
> > > > > +                               remove_nodes(target);
> > > > > +                       else
> > > > > +                               yyerror("label, '%s' does not exist in"
> > > > > +                                       " node removal", $3);
> > > > >        ;
> > > > 
> > > > This handles the syntax at the top level, but doesn't deal with the
> > > > /*-node/ keywords when they are within the overlay tree.
> > > > 
> > > > Also, I don't know if you'll be able to handle it in the same way when
> > > > it comes to handling the new tokens embedded within an overlay tree
> > > > because it isn't so easy to resolve the node to be removed.  In order
> > > > to handle both cases in the same way, it might be better to set a
> > > > 'replace' flag in struct node that defers the actual remove of the
> > > > original node until merge_nodes() time.
> > > 
> > > Ok, so maybe I misunderstood. I thought we had decided that node
> > > modifications would only happen at the top level, but now that I'm
> > > looking back through your examples earlier today, and I see this isn't
> > > true.
> > 
> > Um.. that part of the discussion got confusing.  I think only allowing
> > the operations (and I still don't think the set implemented here are
> > quite right, though they're close) at the top-level is a better idea.
> > 
> > Grant, is there a reason you think we need to have replacement as an
> > option within each tree, rather than a "per-overlay-sheet" option.
> 
> Yes, because I need the ability to remove/replace a child of a
> labelled node.  Not every node that needs to be manipulated will
> necessarily have a label.
> 
> For example; I could have a labelled spi bus node with child nodes for
> each of the spi devices.  I want to be able to remove/replace the
> child nodes without having to label them first.
> 
> g.
> 

Why not just add the label to the node you need first?

- John

  parent reply	other threads:[~2010-10-16 13:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-16  1:07 [PATCH] Implements new features for updating existing device tree nodes John Bonesio
2010-10-16  2:35 ` Grant Likely
     [not found]   ` <AANLkTimx4z-YkH+PXcnKYJpq3MEd3oJZ+ow7mWJzn1BN-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-10-16  3:21     ` John Bonesio
2010-10-16  6:47       ` David Gibson
2010-10-16  8:10         ` Grant Likely
     [not found]           ` <20101016081012.GH653-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
2010-10-16  9:05             ` David Gibson
2010-10-16 13:45             ` John Bonesio [this message]
2010-10-16 18:32               ` Grant Likely
     [not found]                 ` <20101016183217.GA3774-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
2010-10-18  0:11                   ` David Gibson
2010-10-18 16:01                     ` Grant Likely
     [not found]                       ` <20101018160115.GN19399-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
2010-10-18 17:42                         ` Scott Wood
     [not found]                           ` <20101018124220.50a4c097-N/eSCTBpGwP7j4BuCOFQISmX4OfbXNuMKnGXBo5VDl8@public.gmane.org>
2010-10-18 19:56                             ` Grant Likely
     [not found]                               ` <20101018195629.GB2259-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
2010-10-19  1:02                                 ` David Gibson
2010-10-19  3:42                                   ` Grant Likely
2010-10-19  0:54                         ` David Gibson
2010-10-19  1:06                         ` David Gibson
2010-10-19  3:41                           ` Grant Likely
2010-10-18  0:51     ` David Gibson
2010-10-18  0:27 ` David Gibson

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=1287236747.4535.1424.camel@riker \
    --to=bones-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@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