zephyr/scripts/dts
Martí Bolívar 88094ecfb1 edtlib: tweak Property initialization
In the 'normal' case of a property whose definition is taken from a
binding YAML file, a fair number (three at present) of the attributes
available on Property objects are directly taken from the
corresponding PropertySpec object.

Refactor the internals of how a Property gets initialized so that it
has a direct reference to its PropertySpec, and make those attributes
properties which just delegate to the PropertySpec (which in turn just
delegate to the binding). Additionally, expose the PropertySpec
directly.

This will make it easier to extend the Property class with additional
attributes that normally come from the PropertySpec without having to
touch all the locations where Property.__init__ is called.

In the case of the 'default' properties, we handle this by dummying
out some PropertySpec objects. These dummy PropertySpecs in turn
require a dummy Binding.

This change has the advantage that it improves the degree to which
these defaults are checked, e.g. it makes sure that 'status' is one of
the permitted values.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-12-13 19:25:24 -05:00
..
test-bindings
test-bindings-2
dtlib.py
edtlib.py edtlib: tweak Property initialization 2020-12-13 19:25:24 -05:00
gen_defines.py devicetree: make DT_PROP_HAS_IDX expand to 0 or 1 2020-11-15 08:44:56 -06:00
grutils.py
test-multidir.dts
test.dts
testdtlib.py
testedtlib.py