edtlib: infer bindings for dtlib.Type.PATH
We already have support for handling the Zephyr binding "path" type in edtlib.Node._prop_val(), but the binding inference code isn't making use of that. Handle this type as well, as it is just as convenient as Type.PHANDLE and can be more idiomatic depending on the situation. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
parent
6c5254321c
commit
62d8d1a4c6
1 changed files with 2 additions and 0 deletions
|
@ -838,6 +838,8 @@ class Node:
|
||||||
pp["type"] = "phandles"
|
pp["type"] = "phandles"
|
||||||
elif prop.type == Type.PHANDLES_AND_NUMS:
|
elif prop.type == Type.PHANDLES_AND_NUMS:
|
||||||
pp["type"] = "phandle-array"
|
pp["type"] = "phandle-array"
|
||||||
|
elif prop.type == Type.PATH:
|
||||||
|
pp["type"] = "path"
|
||||||
else:
|
else:
|
||||||
_err(f"cannot infer binding from property: {prop} "
|
_err(f"cannot infer binding from property: {prop} "
|
||||||
f"with type {prop.type!r}")
|
f"with type {prop.type!r}")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue