diff mbox series

[02/20] dtoc: Document the return value of scan_structs()

Message ID 20201003173142.3213123-3-sjg@chromium.org
State Accepted
Commit e4fb5faa044ffc66170f8776794386e5e11e13a2
Delegated to: Simon Glass
Headers show
Series dm: Enhance of-platdata to support parent devices | expand

Commit Message

Simon Glass Oct. 3, 2020, 5:31 p.m. UTC
Add documentation to this function as well as generate_structs(), where
the return value is ultimately passed in.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 tools/dtoc/dtb_platdata.py | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

Simon Glass Oct. 27, 2020, 1:01 a.m. UTC | #1
Add documentation to this function as well as generate_structs(), where
the return value is ultimately passed in.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 tools/dtoc/dtb_platdata.py | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Applied to u-boot-dm, thanks!
diff mbox series

Patch

diff --git a/tools/dtoc/dtb_platdata.py b/tools/dtoc/dtb_platdata.py
index 1b52198a943..72725bb6fa1 100644
--- a/tools/dtoc/dtb_platdata.py
+++ b/tools/dtoc/dtb_platdata.py
@@ -466,6 +466,13 @@  class DtbPlatdata(object):
 
         Once the widest property is determined, all other properties are
         updated to match that width.
+
+        Returns:
+            dict containing structures:
+                key (str): Node name, as a C identifier
+                value: dict containing structure fields:
+                    key (str): Field name
+                    value: Prop object with field information
         """
         structs = {}
         for node in self._valid_nodes:
@@ -536,6 +543,14 @@  class DtbPlatdata(object):
         This writes out the body of a header file consisting of structure
         definitions for node in self._valid_nodes. See the documentation in
         doc/driver-model/of-plat.rst for more information.
+
+        Args:
+            structs: dict containing structures:
+                key (str): Node name, as a C identifier
+                value: dict containing structure fields:
+                    key (str): Field name
+                    value: Prop object with field information
+
         """
         self.out_header()
         self.out('#include <stdbool.h>\n')