Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: dt: writing-schema: Describe defining properties in top-level

Document established Devicetree bindings maintainers review practice:
Properties having differences per each device in the binding, e.g.
different constraints for lists or different allowed values, should
still be defined in top-level 'properties' section and only customized
in 'if:then:'.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20250904142400.179955-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Rob Herring (Arm)
3ef9c995 bc3f7d03

+8
+8
Documentation/devicetree/bindings/writing-schema.rst
··· 165 165 values a matrix (in order to define groupings) even when only a single value 166 166 is present. Single entries in schemas are fixed up to match this encoding. 167 167 168 + When bindings cover multiple similar devices that differ in some properties, 169 + those properties should be constrained for each device. This usually means: 170 + 171 + * In top level 'properties' define the property with the broadest constraints. 172 + * In 'if:then:' blocks, further narrow the constraints for those properties. 173 + * Do not define the properties within an 'if:then:' block (note that 174 + 'additionalItems' also won't allow that). 175 + 168 176 Coding style 169 177 ------------ 170 178