zephyr/scripts/dts/test-bindings
Ulf Magnusson a0fceff1a2 scripts: dts: Simplify and improve 'compatible' matching
Instead of

    properties:
        compatible:
            constraint: "foo"

, just have

    compatible: "foo"

at the top level of the binding.

For backwards compatibility, the old 'properties: compatible: ...' form
is still accepted for now, and is treated the same as a single-element
'compatible:'.

The old syntax was inspired by dt-schema (though it isn't
dt-schema-compatible), which is in turn a thin wrapper around
json-schema (the idea is to transform .dts files into YAML and then
verify them).

Maybe the idea was to gradually switch the syntax over to dt-schema and
then be able to use unmodified dt-schema bindings, but dt-schema is
really a different kind of tool (a completely standalone linter), and
works very differently from our stuff (see schemas/dt-core.yaml in the
dt-schema repo to get an idea of just how differently).

Better to keep it simple.

This commit also piggybacks some clarifications to the binding template
re. '#cells:'.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-07 10:25:02 -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
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-1-cell.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
sub-node-parent.yaml scripts: dts: Simplify and improve 'compatible' matching 2019-09-07 10:25:02 -05:00