zephyr/scripts/dts
Ulf Magnusson c42873fbe7 dts: dtlib/edtlib: Add phandle and phandle+nums array types
Add two new type-checked property types 'phandles' and 'phandle-array'
to edtlib.

'phandles' is for pure lists of phandles, with no other data, like

    foo = < &bar &baz ... >

'phandle-array' is for lists of phandles and (possibly) numbers, like

    foo = < &bar 1 2 &baz 3 4 ... >

dt-schema also has the 'phandle-array' type.

Property.val (in edtlib) is set to an array of Device objects for the
'phandles' type.

For the 'phandle-array' type, no Property object is created. This type
is only used for type checking.

Also refactor how types that do not create a Property object
('phandle-array' and 'compound') are handled. Have _prop_val() return
None for them.

The new types are implemented with two new TYPE_PHANDLES and
TYPE_PHANDLES_AND_NUMS types at the dtlib level. There is also a new
Property.to_nodes() functions for fetching the Nodes for an array of
phandles, with type checking.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 10:25:02 -05:00
..
extract scripts/dts/gen_defines.py: Ignore varions base properties 2019-09-07 10:25:02 -05:00
test-bindings dts: dtlib/edtlib: Add phandle and phandle+nums array types 2019-09-07 10:25:02 -05:00
test-bindings-2 scripts: dts: Add test for multiple binding directories 2019-08-03 14:17:49 -04:00
devicetree.py scripts: dts: Consistently open text files with utf-8. 2019-08-05 17:47:57 -04:00
dtlib.py dts: dtlib/edtlib: Add phandle and phandle+nums array types 2019-09-07 10:25:02 -05:00
edtlib.py dts: dtlib/edtlib: Add phandle and phandle+nums array types 2019-09-07 10:25:02 -05:00
extract_dts_includes.py scripts/dts: Fix detection of a GPIO specifier 2019-08-07 13:15:51 -04:00
gen_defines.py scripts/dts/gen_defines.py: Ignore varions base properties 2019-09-07 10:25:02 -05:00
test-multidir.dts scripts: dts: Add test for multiple binding directories 2019-08-03 14:17:49 -04:00
test.dts dts: dtlib/edtlib: Add phandle and phandle+nums array types 2019-09-07 10:25:02 -05:00
testdtlib.py dts: dtlib/edtlib: Add phandle and phandle+nums array types 2019-09-07 10:25:02 -05:00
testedtlib.py dts: dtlib/edtlib: Add phandle and phandle+nums array types 2019-09-07 10:25:02 -05:00