Skip to content

Commit

Permalink
doc: build: dts: Fix incorrect foreach documentation
Browse files Browse the repository at this point in the history
Replaced incorrect rst link references in the description
of traversing ancestor nodes, along with some conflicting
descriptions.

Signed-off-by: James Roy <[email protected]>
  • Loading branch information
rruuaanng authored and kartben committed Jan 7, 2025
1 parent 2871f1a commit 1996359
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions doc/build/dts/api/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,10 @@ does not apply to macros which take cell names as arguments.
For-each macros
===============

The :c:macro:`DT_FOREACH_CHILD` macro allows iterating over the ancestor node
The :c:macro:`DT_FOREACH_ANCESTOR` macro allows iterating over the ancestor node
of a devicetree node.

There is currently only one "generic" for-each macro,
:c:macro:`DT_FOREACH_CHILD`, which allows iterating over the children of a
devicetree node.
Additionally, the :c:macro:`DT_FOREACH_CHILD` macro allows iterating over the
children of a devicetree node.

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

0 comments on commit 1996359

Please sign in to comment.