Skip to content
Commit ff1f7529 authored by Ulf Magnusson's avatar Ulf Magnusson Committed by Kumar Gala
Browse files

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: default avatarUlf Magnusson <Ulf.Magnusson@nordicsemi.no>
parent c333e8e8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment