Skip to content

devicetree: add DT_HAS_ALIAS() #24495

@sslupsky

Description

@sslupsky

It would be useful to have a DT_HAS_ALIAS() macro in devicetree.h similar to DT_HAS_NODE() for the situation where you use an alias to select the item from the device tree.

My example use case is debug pins where the pins are not dedicated for debug but are transient. So, the debug pins overlap existing GPIOs in the devicetree. I would like to use an alias for the debug pins and alias them to the existing GPIO pins. When I need to use them, I enable the alias in the devicetree overlay. When I no longer want to use them, I remove them from the overlay.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions