Skip to content

Commit 6a57cf2

Browse files
krzkrobherring
authored andcommitted
docs: dt: writing-bindings: Document discouraged instance IDs
Document established Devicetree bindings maintainers review practice: instance indexes, either as properties or as custom new OF alias, are not accepted. Recommended way is to use, depending on the situation/hardware: different compatible, cell arguments or syscon phandle arguments. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring (Arm) <[email protected]>
1 parent a1d87a3 commit 6a57cf2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Documentation/devicetree/bindings/writing-bindings.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ Typical cases and caveats
105105
- "syscon" is not a generic property. Use vendor and type, e.g.
106106
"vendor,power-manager-syscon".
107107

108+
- Do not add instance index (IDs) properties or custom OF aliases. If the
109+
devices have different programming model, they might need different
110+
compatibles. If such devices use some other device in a different way, e.g.
111+
they program the phy differently, use cell/phandle arguments.
112+
108113
- Bindings files should be named like compatible: vendor,device.yaml. In case
109114
of multiple compatibles in the binding, use one of the fallbacks or a more
110115
generic name, yet still matching compatible style.

0 commit comments

Comments
 (0)