Skip to content

Commit bd6a25a

Browse files
erwangocarlescufi
authored andcommitted
doc: porting: shields: Provide guidelines for nodelabel
In order to avoid device definitions conflicts when compiling shields description with boards embedding similar devices, nodelabels of devices in shield's devicetree file should differ from the nodelabels used in board's devicetree file. The form to be used was discussed in #50040 and agreed to be as <device>_<shield_name>. Update shields documentation to make it an explicit rule. Signed-off-by: Erwan Gouriou <[email protected]>
1 parent 656382e commit bd6a25a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

doc/hardware/porting/shields.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,18 @@ These files provides shield configuration as follows:
3737
shield configuration should be done by keeping in mind that features
3838
activation is application responsibility.
3939

40+
Besides, in order to avoid name conflicts with devices that may be defined at
41+
board level, it is advised, specifically for shields devicetree descriptions,
42+
to provide a device nodelabel is the form <device>_<shield>, for instance:
43+
44+
.. code-block:: devicetree
45+
46+
sdhc_myshield: sdhc@1 {
47+
reg = <1>;
48+
...
49+
};
50+
51+
4052
Board compatibility
4153
*******************
4254

0 commit comments

Comments
 (0)