From b5e8f28246de4763797d20bbcf959fbcf9089cbf Mon Sep 17 00:00:00 2001 From: Christophe Dufaza Date: Mon, 30 Dec 2024 16:39:22 +0100 Subject: [PATCH 1/2] edtlib: amend PropertySpec.path API documentation PropertySpec.path does NOT tell "the file where the property was last modified", but instead the binding file specifying the devicetree node of which this is a property. See: #65135 Signed-off-by: Christophe Dufaza --- scripts/dts/python-devicetree/src/devicetree/edtlib.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/dts/python-devicetree/src/devicetree/edtlib.py b/scripts/dts/python-devicetree/src/devicetree/edtlib.py index 30c936b373360..47ba33687d3dc 100644 --- a/scripts/dts/python-devicetree/src/devicetree/edtlib.py +++ b/scripts/dts/python-devicetree/src/devicetree/edtlib.py @@ -485,7 +485,9 @@ class PropertySpec: path: The file where this property was defined. In case a binding includes - other bindings, this is the file where the property was last modified. + other bindings, this is the including binding file. + Generally this means that this will be the binding file specifying + the devicetree node of which this is a property. type: The type of the property as a string, as given in the binding. From c6ad37861b8312dee4c3e9dedd66d24c1b56c1a6 Mon Sep 17 00:00:00 2001 From: Christophe Dufaza Date: Mon, 30 Dec 2024 17:23:37 +0100 Subject: [PATCH 2/2] edtlib: amend Node.props API documentation Node properties are not created for all properties defined by the node's binding (Binding.prop2specs), only for those that actually have a value. Signed-off-by: Christophe Dufaza --- scripts/dts/python-devicetree/src/devicetree/edtlib.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/dts/python-devicetree/src/devicetree/edtlib.py b/scripts/dts/python-devicetree/src/devicetree/edtlib.py index 47ba33687d3dc..42a488847fb7a 100644 --- a/scripts/dts/python-devicetree/src/devicetree/edtlib.py +++ b/scripts/dts/python-devicetree/src/devicetree/edtlib.py @@ -948,8 +948,9 @@ class Node: props: A dict that maps property names to Property objects. - Property objects are created for all devicetree properties on the node - that are mentioned in 'properties:' in the binding. + Property objects are created for the devicetree properties + defined by the node's binding and that have a default value + or for which a value is set in the DTS. aliases: A list of aliases for the node. This is fetched from the /aliases node.