From 19963594b0f88c3c08f5f168b3332685728e4276 Mon Sep 17 00:00:00 2001 From: James Roy Date: Mon, 30 Dec 2024 16:14:14 +0800 Subject: [PATCH] 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 --- doc/build/dts/api/api.rst | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/doc/build/dts/api/api.rst b/doc/build/dts/api/api.rst index 17e0a83904de4a..f604f29d9e077a 100644 --- a/doc/build/dts/api/api.rst +++ b/doc/build/dts/api/api.rst @@ -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