aboutsummaryrefslogtreecommitdiff
path: root/tools/dtoc/src_scan.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-02-03 06:01:00 -0700
committerSimon Glass <sjg@chromium.org>2021-03-22 19:23:27 +1300
commitfd471e2ce14342e7186cf9f95a82ce55a9bea6e4 (patch)
treebdd34f8e442ea6467b25ce9bb86969a3f9b7f8a7 /tools/dtoc/src_scan.py
parente525fea211d18a84bc33c6f5842f14153924cf50 (diff)
dtoc: Process nodes to set up required properties
Add logic to assign property values to nodes as required by dtoc. The references allow nodes to refer to each other in C code. The macros used by dtoc are not yet defined in driver model. They will be added along with the actual driver model implementation. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/dtoc/src_scan.py')
-rw-r--r--tools/dtoc/src_scan.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/dtoc/src_scan.py b/tools/dtoc/src_scan.py
index bf3e5de9b1..504dac008d 100644
--- a/tools/dtoc/src_scan.py
+++ b/tools/dtoc/src_scan.py
@@ -188,6 +188,17 @@ class Scanner:
self._uclass = {}
self._structs = {}
+ def get_driver(self, name):
+ """Get a driver given its name
+
+ Args:
+ name (str): Driver name
+
+ Returns:
+ Driver: Driver or None if not found
+ """
+ return self._drivers.get(name)
+
def get_normalized_compat_name(self, node):
"""Get a node's normalized compat name