dts: Rename DT_HAS_NODE macro to DT_HAS_NODE_STATUS_OKAY
Rename DT_HAS_NODE to DT_HAS_NODE_STATUS_OKAY so the semantics are clear. As going forward DT_HAS_NODE will report if a NODE exists regardless of its status. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
93c5e253a4
commit
fdd85d5ad7
166 changed files with 883 additions and 872 deletions
|
@ -8,7 +8,7 @@
|
|||
#include <fsl_iomuxc.h>
|
||||
#include <fsl_gpio.h>
|
||||
|
||||
#if DT_HAS_NODE(DT_NODELABEL(enet))
|
||||
#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(enet))
|
||||
static gpio_pin_config_t enet_gpio_config = {
|
||||
.direction = kGPIO_DigitalOutput,
|
||||
.outputLogic = 0,
|
||||
|
@ -34,7 +34,7 @@ static int mimxrt1020_evk_init(struct device *dev)
|
|||
/* SW0 */
|
||||
IOMUXC_SetPinMux(IOMUXC_SNVS_WAKEUP_GPIO5_IO00, 0);
|
||||
|
||||
#if DT_HAS_NODE(DT_NODELABEL(lpuart1))
|
||||
#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart1))
|
||||
/* LPUART1 TX/RX */
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_06_LPUART1_TX, 0);
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_07_LPUART1_RX, 0);
|
||||
|
@ -50,7 +50,7 @@ static int mimxrt1020_evk_init(struct device *dev)
|
|||
IOMUXC_SW_PAD_CTL_PAD_DSE(6));
|
||||
#endif
|
||||
|
||||
#if DT_HAS_NODE(DT_NODELABEL(lpuart2))
|
||||
#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpuart2))
|
||||
/* LPUART2 TX/RX */
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_08_LPUART2_TX, 0);
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_09_LPUART2_RX, 0);
|
||||
|
@ -66,7 +66,7 @@ static int mimxrt1020_evk_init(struct device *dev)
|
|||
IOMUXC_SW_PAD_CTL_PAD_DSE(6));
|
||||
#endif
|
||||
|
||||
#if DT_HAS_NODE(DT_NODELABEL(lpi2c1))
|
||||
#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpi2c1))
|
||||
/* LPI2C1 SCL, SDA */
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_14_LPI2C1_SCL, 1);
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_15_LPI2C1_SDA, 1);
|
||||
|
@ -86,7 +86,7 @@ static int mimxrt1020_evk_init(struct device *dev)
|
|||
IOMUXC_SW_PAD_CTL_PAD_DSE(6));
|
||||
#endif
|
||||
|
||||
#if DT_HAS_NODE(DT_NODELABEL(lpi2c4))
|
||||
#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(lpi2c4))
|
||||
/* LPI2C4 SCL, SDA */
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_02_LPI2C4_SCL, 1);
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B1_03_LPI2C4_SDA, 1);
|
||||
|
@ -106,7 +106,7 @@ static int mimxrt1020_evk_init(struct device *dev)
|
|||
IOMUXC_SW_PAD_CTL_PAD_DSE(6));
|
||||
#endif
|
||||
|
||||
#if DT_HAS_NODE(DT_NODELABEL(enet))
|
||||
#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(enet))
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_04_GPIO1_IO04, 0U);
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_06_GPIO1_IO22, 0U);
|
||||
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_10_ENET_RDATA00, 0);
|
||||
|
@ -147,7 +147,7 @@ static int mimxrt1020_evk_init(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if DT_HAS_NODE(DT_NODELABEL(enet))
|
||||
#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(enet))
|
||||
static int mimxrt1020_evk_phy_reset(struct device *dev)
|
||||
{
|
||||
/* RESET PHY chip. */
|
||||
|
@ -159,6 +159,6 @@ static int mimxrt1020_evk_phy_reset(struct device *dev)
|
|||
#endif
|
||||
|
||||
SYS_INIT(mimxrt1020_evk_init, PRE_KERNEL_1, 0);
|
||||
#if DT_HAS_NODE(DT_NODELABEL(enet))
|
||||
#if DT_HAS_NODE_STATUS_OKAY(DT_NODELABEL(enet))
|
||||
SYS_INIT(mimxrt1020_evk_phy_reset, PRE_KERNEL_2, 0);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue