Skip to content

Commit

Permalink
doc: build: dts: Fix incorrect rst tag
Browse files Browse the repository at this point in the history
Replaced incorrect ':c:func:' tag for devicetree macro
with ':c:macro' tag.

Signed-off-by: James Roy <rruuaanng@outlook.com>
  • Loading branch information
rruuaanng committed Nov 15, 2024
1 parent 2f23313 commit ece27b9
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions doc/build/dts/api/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ devicetree data in C rvalue form using, for example, the
:ref:`devicetree-property-access` API.

The root node ``/`` has node identifier ``DT_ROOT``. You can create node
identifiers for other devicetree nodes using :c:func:`DT_PATH`,
:c:func:`DT_NODELABEL`, :c:func:`DT_ALIAS`, and :c:func:`DT_INST`.
identifiers for other devicetree nodes using :c:macro`DT_PATH`,

Check failure on line 36 in doc/build/dts/api/api.rst

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

SphinxLint

doc/build/dts/api/api.rst:36 role missing colon before first backtick ( :c:macro`). (missing-colon-in-role)
:c:macro`DT_NODELABEL`, :c:macro`DT_ALIAS`, and :c:macro`DT_INST`.

Check failure on line 37 in doc/build/dts/api/api.rst

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

SphinxLint

doc/build/dts/api/api.rst:37 role missing colon before first backtick (:c:macro`). (missing-colon-in-role)

There are also :c:func:`DT_PARENT` and :c:func:`DT_CHILD` macros which can be
There are also :c:macro`DT_PARENT` and :c:macro`DT_CHILD` macros which can be

Check failure on line 39 in doc/build/dts/api/api.rst

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

SphinxLint

doc/build/dts/api/api.rst:39 role missing colon before first backtick ( :c:macro`). (missing-colon-in-role)
used to create node identifiers for a given node's parent node or a particular
child node, respectively.

Expand Down Expand Up @@ -105,11 +105,11 @@ For-each macros
===============

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

Check failure on line 108 in doc/build/dts/api/api.rst

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

SphinxLint

doc/build/dts/api/api.rst:108 role missing colon before first backtick (:c:macro`). (missing-colon-in-role)
devicetree node.

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

Check failure on line 112 in doc/build/dts/api/api.rst

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

SphinxLint

doc/build/dts/api/api.rst:112 role missing colon before first backtick (:c:macro`). (missing-colon-in-role)
be defined before use.

.. doxygengroup:: devicetree-generic-foreach
Expand All @@ -120,7 +120,7 @@ Existence checks
This section documents miscellaneous macros that can be used to test if a node
exists, how many nodes of a certain type exist, whether a node has certain
properties, etc. Some macros used for special purposes (such as
:c:func:`DT_IRQ_HAS_IDX` and all macros which require ``DT_DRV_COMPAT``) are
:c:macro`DT_IRQ_HAS_IDX` and all macros which require ``DT_DRV_COMPAT``) are

Check failure on line 123 in doc/build/dts/api/api.rst

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

SphinxLint

doc/build/dts/api/api.rst:123 role missing colon before first backtick (:c:macro`). (missing-colon-in-role)
documented elsewhere on this page.

.. doxygengroup:: devicetree-generic-exist
Expand Down Expand Up @@ -159,7 +159,7 @@ chosen is an implementation detail, but cyclic dependencies are detected and
cause errors, so it's safe to assume there are none when using these macros.

There are instance number-based conveniences as well; see
:c:func:`DT_INST_DEP_ORD` and subsequent documentation.
:c:macro`DT_INST_DEP_ORD` and subsequent documentation.

Check failure on line 162 in doc/build/dts/api/api.rst

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

SphinxLint

doc/build/dts/api/api.rst:162 role missing colon before first backtick (:c:macro`). (missing-colon-in-role)

.. doxygengroup:: devicetree-dep-ord

Expand Down Expand Up @@ -201,7 +201,7 @@ with compatible ``vnd,serial``:
.. warning::

Be careful making assumptions about instance numbers. See :c:func:`DT_INST`
Be careful making assumptions about instance numbers. See :c:macro`DT_INST`

Check failure on line 204 in doc/build/dts/api/api.rst

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

SphinxLint

doc/build/dts/api/api.rst:204 role missing colon before first backtick ( :c:macro`). (missing-colon-in-role)
for the API guarantees.

As shown above, the ``DT_INST_*`` APIs are conveniences for addressing nodes by
Expand All @@ -210,8 +210,8 @@ instance number. They are almost all defined in terms of one of the
removing ``INST_`` from the macro name. For example, ``DT_INST_PROP(inst,
prop)`` is equivalent to ``DT_PROP(DT_DRV_INST(inst), prop)``. Similarly,
``DT_INST_REG_ADDR(inst)`` is equivalent to ``DT_REG_ADDR(DT_DRV_INST(inst))``,
and so on. There are some exceptions: :c:func:`DT_ANY_INST_ON_BUS_STATUS_OKAY`
and :c:func:`DT_INST_FOREACH_STATUS_OKAY` are special-purpose helpers without
and so on. There are some exceptions: :c:macro`DT_ANY_INST_ON_BUS_STATUS_OKAY`

Check failure on line 213 in doc/build/dts/api/api.rst

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

SphinxLint

doc/build/dts/api/api.rst:213 role missing colon before first backtick ( :c:macro`). (missing-colon-in-role)
and :c:macro`DT_INST_FOREACH_STATUS_OKAY` are special-purpose helpers without

Check failure on line 214 in doc/build/dts/api/api.rst

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

SphinxLint

doc/build/dts/api/api.rst:214 role missing colon before first backtick ( :c:macro`). (missing-colon-in-role)
straightforward generic equivalents.

Since ``DT_DRV_INST()`` requires ``DT_DRV_COMPAT`` to be defined, it's an error
Expand Down Expand Up @@ -355,7 +355,7 @@ Chosen nodes
************

The special ``/chosen`` node contains properties whose values describe
system-wide settings. The :c:func:`DT_CHOSEN()` macro can be used to get a node
system-wide settings. The :c:macro`DT_CHOSEN()` macro can be used to get a node
identifier for a chosen node.

.. doxygengroup:: devicetree-generic-chosen
Expand Down

0 comments on commit ece27b9

Please sign in to comment.