From 3977444c10c36487d7e38151899572b7b16b2ce1 Mon Sep 17 00:00:00 2001 From: TOKITA Hiroshi Date: Sun, 5 Oct 2025 05:08:26 +0900 Subject: [PATCH 1/2] doc: update macros BNF for child index macros --- doc/build/dts/macros.bnf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/build/dts/macros.bnf b/doc/build/dts/macros.bnf index 034b11142ae16..0ff93f77d70b5 100644 --- a/doc/build/dts/macros.bnf +++ b/doc/build/dts/macros.bnf @@ -103,8 +103,8 @@ node-macro =/ %s"DT_N" path-id %s"_FOREACH_CHILD_STATUS_OKAY_SEP_VARGS" node-macro =/ %s"DT_N" path-id %s"_FOREACH_NODELABEL" [ %s"_VARGS" ] ; These are used internally by DT_NUM_NODELABELS node-macro =/ %s"DT_N" path-id %s"_NODELABEL_NUM" -; The node's zero-based index in the list of it's parent's child nodes. -node-macro =/ %s"DT_N" path-id %s"_CHILD_IDX" +; Macros which expand to the node identifiers for each child by index. +node-macro =/ %s"DT_N" path-id %s"_CHILD_IDX_" DIGIT ; The node's status macro; dt-name in this case is something like "okay" ; or "disabled". node-macro =/ %s"DT_N" path-id %s"_STATUS_" dt-name From 7fe6a15998e1f3c9cb84a03d165b309f134f148f Mon Sep 17 00:00:00 2001 From: TOKITA Hiroshi Date: Sun, 5 Oct 2025 05:18:27 +0900 Subject: [PATCH 2/2] Allow child index macros beyond single digits --- doc/build/dts/macros.bnf | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/build/dts/macros.bnf b/doc/build/dts/macros.bnf index 0ff93f77d70b5..2f4d7d6875785 100644 --- a/doc/build/dts/macros.bnf +++ b/doc/build/dts/macros.bnf @@ -105,6 +105,7 @@ node-macro =/ %s"DT_N" path-id %s"_FOREACH_NODELABEL" [ %s"_VARGS" ] node-macro =/ %s"DT_N" path-id %s"_NODELABEL_NUM" ; Macros which expand to the node identifiers for each child by index. node-macro =/ %s"DT_N" path-id %s"_CHILD_IDX_" DIGIT +node-macro =/ %s"DT_N" path-id %s"_CHILD_IDX_" 2*DIGIT ; The node's status macro; dt-name in this case is something like "okay" ; or "disabled". node-macro =/ %s"DT_N" path-id %s"_STATUS_" dt-name