zephyr/scripts/dts
Ulf Magnusson 95deec1d24 scripts: edtlib: Reduce code duplication in phandle/value list parsing
Most of the logic for initializing 'clocks' and 'pwms' is the same and
can be shared. Add an EDT._simple_phandle_val_list() helper function for
initializing 'clocks', 'pwms', and any other properties on the form

    <foo>s = <phandle value phandle value ...>

where the nodes pointed at by the phandles are expected to have a
'#<foo>-cells' property.

This should make it easier to add similar properties.

There's still some code duplication in the classes (PWM, Clock, etc.),
but also some differences, so I'm wondering if requiring a class for
each might be okay. Maybe some more class-related stuff could be
factored out later.

Piggyback some related cleanup:

 - Have _phandle_val_list() take the name of the #foo-cells property
   instead of a function for fetching the value. The pattern is always
   the same.

 - Have _add_names() just take the "foo" part of "foo-names". Same
   pattern everywhere.

 - Clean up some redundant comments for stuff that's already documented
   in docstrings

 - Fix error messages printed by _named_cells() ("GPIOS controller" ->
   "GPIO controller", etc.)

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-08-07 11:48:53 -04:00
..
extract dts: riscv: Add sifive,plic-1.0.0 binding and fix riscv,ndev values 2019-08-02 11:44:09 +02:00
test-bindings scripts: dts: Add test for multiple binding directories 2019-08-03 14:17:49 -04: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 scripts: dts: Consistently open text files with utf-8. 2019-08-05 17:47:57 -04:00
edtlib.py scripts: edtlib: Reduce code duplication in phandle/value list parsing 2019-08-07 11:48:53 -04:00
extract_dts_includes.py
gen_defines.py scripts: dts: support multiple binding dirs in new scripts 2019-08-03 14:17:49 -04:00
test-multidir.dts scripts: dts: Add test for multiple binding directories 2019-08-03 14:17:49 -04:00
test.dts
testdtlib.py
testedtlib.py scripts: dts: Add test for multiple binding directories 2019-08-03 14:17:49 -04:00