Orphan nodes parsing from an addon dts file is supported.
Add the support for orphan nodes in the dts file generation.
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
---
treesource.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/treesource.c b/treesource.c
index 77ff4fb..bc5d847 100644
--- a/treesource.c
+++ b/treesource.c
@@ -384,6 +384,7 @@ void dt_to_source(FILE *f, struct dt_info *dti)
{
struct reserve_info *re;
struct symbol *importsym;
+ struct node *orphan;
fprintf(f, "/dts-v1/;\n");
if (dti->dtsflags & DTSF_ADDON)
@@ -410,4 +411,9 @@ void dt_to_source(FILE *f, struct dt_info *dti)
}
write_tree_source_node(f, dti->dt, 0);
+
+ for_each_orphan(dti->orphanlist, orphan) {
+ fprintf(f, "\n");
+ write_tree_source_node(f, orphan, 0);
+ }
}
--
2.52.0