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 <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2022-09-08 13:55:29 +02:00 committed by Carles Cufí
commit bd6a25a661

View file

@ -37,6 +37,18 @@ These files provides shield configuration as follows:
shield configuration should be done by keeping in mind that features
activation is application responsibility.
Besides, in order to avoid name conflicts with devices that may be defined at
board level, it is advised, specifically for shields devicetree descriptions,
to provide a device nodelabel is the form <device>_<shield>, for instance:
.. code-block:: devicetree
sdhc_myshield: sdhc@1 {
reg = <1>;
...
};
Board compatibility
*******************