modules: hal_nordic: nrfx: use dt_nodelabel_exists #86159
Draft
+226
−216
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As of today, nrfx components are selectable depending if devicetree has
a certain compatible or not, and in case of IP that can operate in
multiple modes, nodelabel+compatible. An example of the later is:
These symbols are later selected by e.g. SPI driver if
spi0
node isenabled. While this works in the Zephyr context, it can be a problem in
applications using nrfx directly in the application layer, unless they
tweak devicetree. For example, if devicetree
spi0
node defaults tocompatible = "nordic,nrf-spim"
, NRFX_SPI0 or NRFX_SPIS0 won't beselectable, but an application using nrfx directly doesn't really care
about what is defined in devicetree as it is effectively bypassing it.
It just wants to select e.g.
CONFIG_NRFX_SPI0=y
and forget about therest.
This patch fixes this problem by just checking for the existence of
certain nodelabels.