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:
Martí Bolívar 2021-04-13 14:08:30 -07:00 committed by Carles Cufí
commit 62d8d1a4c6

View file

@ -838,6 +838,8 @@ class Node:
pp["type"] = "phandles"
elif prop.type == Type.PHANDLES_AND_NUMS:
pp["type"] = "phandle-array"
elif prop.type == Type.PATH:
pp["type"] = "path"
else:
_err(f"cannot infer binding from property: {prop} "
f"with type {prop.type!r}")