From bd6a25a661a0a9a23f54309f0eca8ec248f70b42 Mon Sep 17 00:00:00 2001 From: Erwan Gouriou Date: Thu, 8 Sep 2022 13:55:29 +0200 Subject: [PATCH] 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 _. Update shields documentation to make it an explicit rule. Signed-off-by: Erwan Gouriou --- doc/hardware/porting/shields.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/hardware/porting/shields.rst b/doc/hardware/porting/shields.rst index 783a6c8241f..0f6c1a9a7a4 100644 --- a/doc/hardware/porting/shields.rst +++ b/doc/hardware/porting/shields.rst @@ -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 _, for instance: + +.. code-block:: devicetree + + sdhc_myshield: sdhc@1 { + reg = <1>; + ... + }; + + Board compatibility *******************