dm: core: Support sorting devices with dm tree
Add a -s flag to sort the top-level devices in order of uclass ID.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/include/dm/util.h b/include/dm/util.h
index e10c606..4bb49e9 100644
--- a/include/dm/util.h
+++ b/include/dm/util.h
@@ -26,8 +26,12 @@
*/
int list_count_items(struct list_head *head);
-/* Dump out a tree of all devices */
-void dm_dump_tree(void);
+/**
+ * Dump out a tree of all devices
+ *
+ * @sort: Sort by uclass name
+ */
+void dm_dump_tree(bool sort);
/* Dump out a list of uclasses and their devices */
void dm_dump_uclass(void);