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>
Loading
Please sign in to comment