In Zephyr’s devicetree, there are two separate concepts when it comes to naming a node with a unique name: label property and node label. Is there a design reason why these two have been kept separate or is it just historic?
It seems to me it would be more convenient to leverage devicetree’s node label feature to provide each node that needs to be accessed the string version of that label for use as DT_LABEL is used. I understand that while label properties don’t need to be unique (ie, not enforced by devicetree to be unique unlike node label), for how they are typically used (device_get_binding), they do need to be unique (which devicetree can enforce if node label were used instead). In a project I am working on, theres many new devicetree nodes which would be nice to have a nicer name for debugging available in C than the full path (the node name isnt unique due to the structure of the device tree, a lot of the nodes are something like nodelabel1: generic_name@0, nodelabel2: generic_name@1) and it would be nice if we could just leverage the node label we are adding to the devicetree rather than also adding an additional label property (I have been thinking of making a patch to access node label as a string from the node id and wondered if I should do it with the intention of replacing the label property in Zephyr entirely or not).
Michael R Rosen
Emerging Growth Incubation
Santa Clara, CA | 95054