zephyr/scripts/dts/test-bindings
Ulf Magnusson 0b1ab4ab09 scripts: dts: Replace 'sub-node:' with more general 'child-binding:'
Deprecate 'sub-node:' and add a more general 'child-binding:' mechanism
to bindings. Keep supporting 'sub-node:', but print a deprecation
warning when it's used.

Like 'sub-node:', 'child-binding:' gives a binding to child nodes, but
the binding is required to be a complete binding, and is treated (and
checked) like a normal binding.

'child-binding:' can in turn contain another 'child-binding:', up to any
number of levels. This is automatic from treating it like a normal
binding, and from the code initializing parent Devices before child
Devices.

This lets nodes give bindings to grandchildren.

For example, take this devicetree fragment:

    parent {
            compatible = "foo";
            child-1 {
                    grandchild-1 {
                            ...
                    };
                    grandchild-2 {
                            ...
                    };
            };
            child-2 {
                    grandchild-3 {
                            ...
                    };
            };
    };

The binding for 'foo' could provide bindings for grandchild-1/2/3 like
this:

    compatible: "foo"

    # Binding for children
    child-binding:
        title: ...
        description: ...

        ...

        # Binding for grandchildren
        child-binding:
            title: ...
            description: ...

            properties:
                ...

Due to implementation issues with the old devicetree scripts, only two
levels of 'child-binding:' is supported for now. This limitation will go
away in Zephyr 2.2.

Piggyback shortening 'description:' and 'title:' in some bindings that
provide child bindings. This makes the generated header a bit neater.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-19 08:39:22 -05:00
..
bar-bus.yaml scripts: dts: Change 'child/parent: bus: ...' to 'child/parent-bus:' 2019-09-17 14:37:43 -05:00
child-binding.yaml scripts: dts: Replace 'sub-node:' with more general 'child-binding:' 2019-09-19 08:39:22 -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: Replace 'sub-node:' with more general 'child-binding:' 2019-09-19 08:39:22 -05:00
device-on-bar-bus.yaml scripts: dts: Change 'child/parent: bus: ...' to 'child/parent-bus:' 2019-09-17 14:37:43 -05:00
device-on-foo-bus.yaml scripts: dts: Change 'child/parent: bus: ...' to 'child/parent-bus:' 2019-09-17 14:37:43 -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
foo-bus.yaml scripts: dts: Change 'child/parent: bus: ...' to 'child/parent-bus:' 2019-09-17 14:37:43 -05:00
foo-optional.yaml scripts: edtlib: Make order irrelevant when including multiple files 2019-09-11 07:50:30 -05:00
foo-required.yaml scripts: edtlib: Make order irrelevant when including multiple files 2019-09-11 07:50:30 -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
grandchild-3.yaml scripts: dts: Change 'child/parent: bus: ...' to 'child/parent-bus:' 2019-09-17 14:37:43 -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
order-1.yaml scripts: edtlib: Make order irrelevant when including multiple files 2019-09-11 07:50:30 -05:00
order-2.yaml scripts: edtlib: Make order irrelevant when including multiple files 2019-09-11 07:50:30 -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