gen_defines: infer bindings for /zephyr,user
Tell the EDT instance that properties of the /zephyr,user node should be generated based on the binding types inferred from the property content. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
parent
32e6159f01
commit
932532eb0f
2 changed files with 16 additions and 3 deletions
|
@ -39,7 +39,8 @@ def main():
|
|||
# Suppress this warning if it's suppressed in dtc
|
||||
warn_reg_unit_address_mismatch=
|
||||
"-Wno-simple_bus_reg" not in args.dtc_flags,
|
||||
default_prop_types=True)
|
||||
default_prop_types=True,
|
||||
infer_binding_for_paths=["/zephyr,user"])
|
||||
except edtlib.EDTError as e:
|
||||
sys.exit(f"devicetree error: {e}")
|
||||
|
||||
|
@ -178,10 +179,16 @@ Node's generated path identifier: DT_{node.z_path_id}
|
|||
"""
|
||||
|
||||
if node.matching_compat:
|
||||
s += f"""
|
||||
if node.binding_path:
|
||||
s += f"""
|
||||
Binding (compatible = {node.matching_compat}):
|
||||
{relativize(node.binding_path)}
|
||||
"""
|
||||
else:
|
||||
s += f"""
|
||||
Binding (compatible = {node.matching_compat}):
|
||||
No yaml (bindings inferred from properties)
|
||||
"""
|
||||
|
||||
s += f"\nDependency Ordinal: {node.dep_ordinal}\n"
|
||||
|
||||
|
|
|
@ -121,9 +121,15 @@ Devicetree node:
|
|||
{node.path}
|
||||
"""
|
||||
if node.matching_compat:
|
||||
s += f"""
|
||||
if node.binding_path:
|
||||
s += f"""
|
||||
Binding (compatible = {node.matching_compat}):
|
||||
{relativize(node.binding_path)}
|
||||
"""
|
||||
else:
|
||||
s += f"""
|
||||
Binding (compatible = {node.matching_compat}):
|
||||
No yaml (bindings inferred from properties)
|
||||
"""
|
||||
else:
|
||||
s += "\nNo matching binding.\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue