devicetree-spec.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Add description of labels to source format chapter
@ 2017-11-27 16:14 Grant Likely
       [not found] ` <20171127161401.20586-1-grant.likely-5wv7dgnIgG8@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Grant Likely @ 2017-11-27 16:14 UTC (permalink / raw)
  To: devicetree-spec-u79uwXL29TY76Z2rM5mHXA; +Cc: Grant Likely

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 <grant.likely-5wv7dgnIgG8@public.gmane.org>
---
 source/source-language.rst | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 mode change 100644 => 100755 source/source-language.rst

diff --git a/source/source-language.rst b/source/source-language.rst
old mode 100644
new mode 100755
index cefbbd8..c17aab0
--- a/source/source-language.rst
+++ b/source/source-language.rst
@@ -22,6 +22,33 @@ additional files.
 
     /include/ "FILE"
 
+Labels
+------
+The source format support attaching labels to any node or property data in the device tree.
+Phandle and path references can be automatically generated by referencing the label instead of
+explicitly specifying the phandle value or the full path to a node.
+Labels are only used in the devicetree source format and are not encoded into the binary format.
+
+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 adding an ampersand ('&') suffix to the label name.
+
+.. 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
 -----------------------------
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-11-27 23:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-27 16:14 [PATCH] Add description of labels to source format chapter Grant Likely
     [not found] ` <20171127161401.20586-1-grant.likely-5wv7dgnIgG8@public.gmane.org>
2017-11-27 16:19   ` Grant Likely
2017-11-27 18:44   ` Rob Herring
     [not found]     ` <CAL_Jsq+eZ-=PoyWwpvTk+Urc4eYHfRyUiRQZ9_V6Z6UfLOfPNQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-27 20:12       ` Grant Likely
2017-11-27 23:54       ` David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).