Thread (1 message) 1 message, 1 author, 2013-10-30
DORMANTno replies

[PATCH v3 2/3] Add documentation for fdtget/put

From: Simon Glass <hidden>
Date: 2013-10-30 20:15:52
Subsystem: documentation, the rest · Maintainers: Jonathan Corbet, Linus Torvalds

The other tools have documentation so it seems reasonable to add something
here.

Signed-off-by: Simon Glass <redacted>
---
Changes in v3: None
Changes in v2: None

 Documentation/manual.txt | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
diff --git a/Documentation/manual.txt b/Documentation/manual.txt
index 65c8540..5f02426 100644
--- a/Documentation/manual.txt
+++ b/Documentation/manual.txt
@@ -658,3 +658,41 @@ The fdtdump program prints a readable version of a flat device tree file.
 The syntax of the fdtdump command line is:
 
     fdtdump <DTB-file-name>
+
+
+3) fdtget -- Get individual properties and lists from a Device Tree
+
+Ths fdtget program allows you to extract properties from nodes, and also
+list nodes and properties.
+
+The syntax of the fdtget commandline is described in the help (fdtget -h).
+Common uses are:
+
+    fdtget -ts <DTB-file-name> /node compatible
+        - Read the compatible string of a node. The -ts is optional since
+          fdtget will normally guess the type correctly.
+
+    fdtget -bx <DTB-file-name> /node bytes
+        - Read the bytes in a property and output in hex. The 'b' prefix
+          forces byte output, since otherwise fdtget will output in 32-bit
+          or 16-bit words if the property length is so-aligned.
+
+    fdtget -p <DTB-file-name> /node
+        - List the properties in a node
+
+    fdtget -l <DTB-file-name> /
+        - List the subnodes for a node (here, the root node)
+
+You can use -d to provide a default value for when the property does not
+exist.
+
+
+4) fdtput -- Write individual properties to a Device Tree
+
+Ths fdtput program allows you to write properties to nodes.
+
+The syntax of the fdtput commandline is described in the help (fdtput -h) and
+the type options are the same as fdtget. You can use -c to create a node if
+it does not exist already, and -p to create all required nodes (like
+'mkdir -p' does with directories). Unfortunately fdtput does not support
+deleting nodes or properties.
-- 
1.8.4.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help