You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
soc: nxp: Introduce Kconfig.peripherals for NXP devices
Introduce Kconfig.peripherals for NXP devices.
In this file, we defined kconfig options like
MCUX_HW_HAS_xxx, these kconfig option is set to
true or false depending on whether the peripheral
instance node in DT is enabled or not.
why we need MCUX_HW_HAS_xxx?
For example, the konfig option
'COUNTER_MCUX_LPTMR_WAKEUP_SOURCE_INDEX' only sets
its value when LPTMR is used as a wakeup source.
Therefore, we need to use the predefined kconfig
function 'dt_nodelabel_bool_prop' in kconfig to
determine whether LPTMR enabled the wakeup-source property.
To do this, we need to iterate over all LPTMR nodes
in the DT, such as lptmr0, lptmr1, and so on, to
see if they enabled the wakeup-source property.
How can we iterate over all LPTMR nodes?
We need to pass in the currently iterated LPTMR instance.
How do we know which instance we are currently iterating
over?
We need to determine whether MCUX_HW_HAS_LPTMRn
is true and then define the current mcux_hw_lptmr_index
to n. This will determine the instance.
This is why we need MCUX_HW_HAS_xxx and Kconfig.peripherals
Signed-off-by: Zhaoxiang Jin <[email protected]>
0 commit comments