zephyr/scripts/dts/test-bindings
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
..
child.yaml scripts: edtlib: Add backwards compatibility for 'category:' 2019-09-07 10:25:02 -05:00
clock-1-cell.yaml scripts: dts: Simplify and improve 'compatible' matching 2019-09-07 10:25:02 -05:00
clock-2-cell.yaml scripts: dts: Simplify and improve 'compatible' matching 2019-09-07 10:25:02 -05:00
defaults.yaml dts: edtlib: Support giving missing properties a default value 2019-09-09 08:47:49 -05:00
deprecated-include.yaml scripts: edtlib: Add backwards compatibility for 'category:' 2019-09-07 10:25:02 -05:00
deprecated.yaml scripts: dts: Simplify and improve 'compatible' matching 2019-09-07 10:25:02 -05:00
false-positive.yaml dts: edtlib: Improve how we get the compatible string from bindings 2019-09-07 10:25:02 -05:00
fixed-clock.yaml scripts: dts: Simplify and improve 'compatible' matching 2019-09-07 10:25:02 -05:00
gpio-1-cell.yaml scripts: dts: Simplify and improve 'compatible' matching 2019-09-07 10:25:02 -05:00
gpio-2-cell.yaml scripts: dts: Simplify and improve 'compatible' matching 2019-09-07 10:25:02 -05:00
grandchild-1.yaml scripts: dts: Improve syntax and code for including binding files 2019-09-07 10:25:02 -05:00
grandchild-2.yaml scripts: dts: Improve syntax and code for including binding files 2019-09-07 10:25:02 -05:00
interrupt-1-cell.yaml scripts: dts: Simplify and improve 'compatible' matching 2019-09-07 10:25:02 -05:00
interrupt-2-cell.yaml scripts: dts: Simplify and improve 'compatible' matching 2019-09-07 10:25:02 -05:00
interrupt-3-cell.yaml scripts: dts: Simplify and improve 'compatible' matching 2019-09-07 10:25:02 -05:00
io-channel.yaml scripts: dts: Simplify and improve 'compatible' matching 2019-09-07 10:25:02 -05:00
multidir.yaml scripts: dts: Simplify and improve 'compatible' matching 2019-09-07 10:25:02 -05:00
parent.yaml scripts: dts: Simplify and improve 'compatible' matching 2019-09-07 10:25:02 -05:00
props.yaml scripts: dts: Simplify and improve 'compatible' matching 2019-09-07 10:25:02 -05:00
pwm-0-cell.yaml scripts: dts: Simplify and improve 'compatible' matching 2019-09-07 10:25:02 -05:00
pwm-1-cell.yaml scripts: dts: Simplify and improve 'compatible' matching 2019-09-07 10:25:02 -05:00
sub-node-parent.yaml scripts: dts: Simplify and improve 'compatible' matching 2019-09-07 10:25:02 -05:00