Skip to content

Commit 1996359

Browse files
rruuaanngkartben
authored andcommitted
doc: build: dts: Fix incorrect foreach documentation
Replaced incorrect rst link references in the description of traversing ancestor nodes, along with some conflicting descriptions. Signed-off-by: James Roy <[email protected]>
1 parent 2871f1a commit 1996359

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

doc/build/dts/api/api.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,10 @@ does not apply to macros which take cell names as arguments.
104104
For-each macros
105105
===============
106106

107-
The :c:macro:`DT_FOREACH_CHILD` macro allows iterating over the ancestor node
107+
The :c:macro:`DT_FOREACH_ANCESTOR` macro allows iterating over the ancestor node
108108
of a devicetree node.
109-
110-
There is currently only one "generic" for-each macro,
111-
:c:macro:`DT_FOREACH_CHILD`, which allows iterating over the children of a
112-
devicetree node.
109+
Additionally, the :c:macro:`DT_FOREACH_CHILD` macro allows iterating over the
110+
children of a devicetree node.
113111

114112
There are special-purpose for-each macros, like
115113
:c:macro:`DT_INST_FOREACH_STATUS_OKAY`, but these require ``DT_DRV_COMPAT`` to

0 commit comments

Comments
 (0)