mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zhang Bo <zbsdta@gmail.com>
To: Rob Herring <robh+dt@kernel.org>, Frank Rowand <frowand.list@gmail.com>
Cc: devicetree@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: How delete node or property in overlayd dts?
Date: Sat, 18 Aug 2018 18:38:44 +0800	[thread overview]
Message-ID: <78f06f2d-7561-dde9-c155-9f1612f9067a@gmail.com> (raw)
In-Reply-To: <CAL_JsqLV5d5cL3o3Dx=--zGD37c5O09rL9AXyRFmceTfBHt3Zg@mail.gmail.com>


在 2018/8/18 1:47, Rob Herring 写道:
> On Tue, Aug 14, 2018 at 7:26 PM Frank Rowand <frowand.list@gmail.com> wrote:
>> On 08/14/18 07:46, 张波 wrote:
>>> /delete-node/ /delete-prop/ could be used in dtsi files without device
>>> tree overlay.
>>>
>>> but with device tree overlay,  /delete-node/ and  /delete-prop/ are not work.
>>> How to delete property and node in overlay dts?
>>>
>>> for example,
>>> in basel.dts have following node
>>> node1 {
>>>      property1;
>>>      property3;
>>>      node2 {
>>>          property2;
>>>      }
>>> }
>>>
>>> in overlay.dts as following
>>>   node1 {
>>>      /delete-property/ property1;
>>>      /delete-node/ node2;
>>> }
>>>
>>> after overlay, property1 and node2 is not deleted.
>>>
>> The /delete-node/ and /delete-prop/ directives are only used by the
>> dtc compiler within a single compilation.
>>
>> There is nothing in the format of a devicetree blob to represent the
>> notion of deleting a property or a node.
>>
>> You can not delete a property or a node in an overlay dtb.
> Though you can add/override 'status' with 'status = "disabled";' which
> should be treated very similar to a node not being present. I say
> similar because it's a source of bugs for the OS to fail to pay
> attention to status property.

there is document in 
https://android.googlesource.com/kernel/msm/+/android-7.0.0_r0.11/Documentation/devicetree/overlay-notes.txt,

In above document, remove node or property by adding - operator before 
node or property. but I didn't find it in released kernel source code, 
Is there any update plan about this problem?

{

     property-a;       /* add property-a to the target */

     -proptery-b;     /* remove property-b from the target */

     -node-b {          /* remove an exiting node-b */

         ...

     }

}


  reply	other threads:[~2018-08-18 10:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-14 14:46 张波
2018-08-15  1:26 ` Frank Rowand
2018-08-17 17:47   ` Rob Herring
2018-08-18 10:38     ` Zhang Bo [this message]
2018-08-19  6:12       ` Frank Rowand

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=78f06f2d-7561-dde9-c155-9f1612f9067a@gmail.com \
    --to=zbsdta@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.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

all inboxes | Powered by JetHome®