Skip to content

Commit

Permalink
Add description of labels to source format chapter
Browse files Browse the repository at this point in the history
The source format chapter was missing details about the characters that
are valid for labels and what labels are for. Add a paragraph to cover
those details.

Signed-off-by: Grant Likely <[email protected]>
  • Loading branch information
glikely committed Dec 7, 2017
1 parent 2416cb8 commit 1c64f9a
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions source/source-language.rst
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,34 @@ additional files.

/include/ "FILE"

Labels
------

The source format allows labels to be attached to any node or property value in the device tree.
Phandle and path references can be automatically generated by referencing a label instead of
explicitly specifying a phandle value or the full path to a node.
Labels are only used in the devicetree source format and are not encoded into the DTB binary.

A label shall be between 1 to 31 characters in length,
be composed only of the characters in the set :numref:`label-characters`,
and must not start with a number.

Labels are created by appending a colon (':') to the label name.
References are created by prefixing the label name with an ampersand ('&').

.. tabularcolumns:: | c p{8cm} |
.. _label-characters:
.. table:: Valid characters for DTS labels

========= ================
Character Description
========= ================
``0-9`` digit
``a-z`` lowercase letter
``A-Z`` uppercase letter
``_`` underscore
========= ================

Node and property definitions
-----------------------------

Expand Down

0 comments on commit 1c64f9a

Please sign in to comment.