zephyr/scripts/dts
Ulf Magnusson ff1f75293e dts: edtlib: Support giving missing properties a default value
For missing optional properties, it can be handy to generate a default
value instead of no value, to cut down on #ifdefs.

Allow a default value to be specified in the binding, via a new
'default: <default value>' setting for properties in bindings.
Defaults are supported for both scalar and array types. YAML arrays are
used to specify the value for array types.

'default:' also appears in json-schema, with the same meaning.

Include misc. sanity checks, like the 'default' value matching 'type'.

The documentation changes in binding-template.yaml explain the syntax.

Suggested by Peter A. Bigot in
https://github.com/zephyrproject-rtos/zephyr/issues/17829.

Fixes: #17829
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-09 08:47:49 -05:00
..
extract scripts: dts: Replace bare 'except's in old scripts 2019-09-07 10:25:02 -05:00
test-bindings dts: edtlib: Support giving missing properties a default value 2019-09-09 08:47:49 -05:00
test-bindings-2 scripts: dts: Simplify and improve 'compatible' matching 2019-09-07 10:25:02 -05:00
devicetree.py scripts: dts: devicetree.py: Fix pylint warning for iffy \w escape 2019-09-07 10:25:02 -05:00
dtlib.py scripts: dtlib: Suppress _init_tokens() pylint warning 2019-09-07 10:25:02 -05:00
edtlib.py dts: edtlib: Support giving missing properties a default value 2019-09-09 08:47:49 -05:00
extract_dts_includes.py scripts: dts: Simplify and improve 'compatible' matching 2019-09-07 10:25:02 -05:00
gen_defines.py dts: gen_defines: Remove lots of code duplication for phandle/val lists 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: edtlib: Support giving missing properties a default value 2019-09-09 08:47:49 -05:00
testdtlib.py scripts: dtlib: Add test for untested /memreserve/ error 2019-09-07 10:25:02 -05:00
testedtlib.py dts: edtlib: Support giving missing properties a default value 2019-09-09 08:47:49 -05:00