From: Ayush Singh <ayush@beagleboard.org>
To: CVS <cvs268@gmail.com>
Cc: Simon Glass <sjg@chromium.org>,
d-gole@ti.com, lorforlinux@beagleboard.org,
jkridner@beagleboard.org, robertcnelson@beagleboard.org,
nenad.marinkovic@mikroe.com, Andrew Davis <afd@ti.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Robert Nelson <robertcnelson@gmail.com>,
devicetree-compiler@vger.kernel.org
Subject: Re: [PATCH v2 2/2] tests: Add test for append-property
Date: Tue, 17 Sep 2024 22:53:15 +0530 [thread overview]
Message-ID: <7dbeae7a-c4d6-4d63-b728-d40146ebdfd5@beagleboard.org> (raw)
In-Reply-To: <CAK-9PRC6O5-94FP3_8FoX7NXBXTEyNVLBUihwDjBRh3SzsGusA@mail.gmail.com>
On 9/12/24 16:36, CVS wrote:
> Hmmm... in the above examples, using --annotate on a single source file,
> it is not immediately evident whether the existing annotation logic within dtc
> handles "append-property" across multiple dts(i) files properly.
>
> As you can see, the -T (annotate) and -T -T (detailed annotate)
> options will add inline comments in the final unified device-tree with
> the actual source file:line.
> This is a critical feature in managing complex hierarchies of dtsi
> files being included in a dts.
>
> Until now (without the append-property keyword), IIUC, there can be
> ONLY one source file/line responsible for a line in the final unified
> device-tree. The latest line specifying a property overwrites all
> other specifications of a property before it.
>
> With the introduction of this append-property keyword, now more than
> one file:line can be a source of a line in the final unified
> device-tree. So, i wonder how the annotations will look like in the
> scenario in which more than one source file:line is responsible for
> the content of a single line in the final unified device-tree.
>
> If by any chance there is insufficient annotation containing of all
> the lines responsible for the final "appended list", i worry it will
> be a nightmare to identify the source of the resulting "appended list"
> of values being assigned to a property.
>
> regards
> CVS
So I tried it with 3 files:
base.dtsi
```
/dts-v1/;
/ {
prop = "0";
propa = <0>;
};
```
app1.dtsi
```
/dts-v1/;
/include/ "base.dtsi"
/ {
/append-property/ prop = "1";
};
```
app2.dts
```
/dts-v1/;
/include/ "app1.dtsi"
/ {
/append-property/ prop = "2";
/append-property/ propa = <2>;
};
```
Output:
❯ ../dtc -T -T -o temp.dts app2.dts
❯ cat temp.dts
/dts-v1/;
/ { /* base.dtsi:3:3-7:3, app1.dtsi:5:3-7:3, app2.dts:5:3-8:3 */
prop = "0", "1", "2"; /* app2.dts:6:2-6:31 */
propa = <0x00>, <0x02>; /* app2.dts:7:2-7:32 */
}; /* base.dtsi:3:3-7:3, app1.dtsi:5:3-7:3, app2.dts:5:3-8:3 */
So it seems to only contain info about the last append file. I will fix
it in the next patch. It just needs to have info regarding all files
that appended to it right? We already seem to be doing that for nodes so
I can probably use similar strategy for properties.
Ayush Singh
next prev parent reply other threads:[~2024-09-17 17:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-29 20:03 [PATCH v2 0/2] Add capability to append to property Ayush Singh
2024-08-29 20:03 ` [PATCH v2 1/2] dtc: Add /append-property/ Ayush Singh
2024-08-29 20:03 ` [PATCH v2 2/2] tests: Add test for append-property Ayush Singh
2024-08-30 1:06 ` Simon Glass
2024-08-30 3:28 ` CVS
2024-08-30 8:07 ` Ayush Singh
2024-08-30 8:01 ` Ayush Singh
2024-09-12 11:06 ` CVS
2024-09-17 17:23 ` Ayush Singh [this message]
2024-08-30 8:09 ` [PATCH v2 0/2] Add capability to append to property Geert Uytterhoeven
2024-08-30 15:43 ` Andrew Davis
2024-09-12 3:59 ` David Gibson
2024-10-10 6:31 ` Ayush Singh
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=7dbeae7a-c4d6-4d63-b728-d40146ebdfd5@beagleboard.org \
--to=ayush@beagleboard.org \
--cc=afd@ti.com \
--cc=cvs268@gmail.com \
--cc=d-gole@ti.com \
--cc=devicetree-compiler@vger.kernel.org \
--cc=geert@linux-m68k.org \
--cc=jkridner@beagleboard.org \
--cc=lorforlinux@beagleboard.org \
--cc=nenad.marinkovic@mikroe.com \
--cc=robertcnelson@beagleboard.org \
--cc=robertcnelson@gmail.com \
--cc=sjg@chromium.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).