diff --git a/arch/arm/core/cortex_m/fault.c b/arch/arm/core/cortex_m/fault.c index 4cc01f87129..4e604ba8033 100644 --- a/arch/arm/core/cortex_m/fault.c +++ b/arch/arm/core/cortex_m/fault.c @@ -743,7 +743,7 @@ static inline bool z_arm_is_pc_valid(uintptr_t pc) return true; } -#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_itcm), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_itcm)) /* Is it in the ITCM */ if ((((uintptr_t)&__itcm_start) <= pc) && (pc < ((uintptr_t)&__itcm_end))) { return true; diff --git a/boards/arm/v2m_musca_b1/pinmux.c b/boards/arm/v2m_musca_b1/pinmux.c index 443d462eb21..2a2c44d62b9 100644 --- a/boards/arm/v2m_musca_b1/pinmux.c +++ b/boards/arm/v2m_musca_b1/pinmux.c @@ -40,7 +40,7 @@ static void arm_musca_b1_pinmux_defaults(void) scc[IOMUX_ALTF1_OUTSEL] = 0xffff; scc[IOMUX_ALTF1_OENSEL] = 0xffff; -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart0)) /* clear bit 0/1 for GPIO0/1 to steer from ALTF1 */ scc[IOMUX_MAIN_INSEL] &= ~(BIT(0) | BIT(1)); scc[IOMUX_MAIN_OUTSEL] &= ~(BIT(0) | BIT(1)); diff --git a/boards/arm/v2m_musca_s1/pinmux.c b/boards/arm/v2m_musca_s1/pinmux.c index a1a1a4ad252..3affa53dadf 100644 --- a/boards/arm/v2m_musca_s1/pinmux.c +++ b/boards/arm/v2m_musca_s1/pinmux.c @@ -40,7 +40,7 @@ static void arm_musca_s1_pinmux_defaults(void) scc[IOMUX_ALTF1_OUTSEL] = 0xffff; scc[IOMUX_ALTF1_OENSEL] = 0xffff; -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart0)) /* clear bit 0/1 for GPIO0/1 to steer from ALTF1 */ scc[IOMUX_MAIN_INSEL] &= ~(BIT(0) | BIT(1)); scc[IOMUX_MAIN_OUTSEL] &= ~(BIT(0) | BIT(1)); diff --git a/boards/digilent/arty_a7/board.c b/boards/digilent/arty_a7/board.c index 984cd34ab43..0e087c212b4 100644 --- a/boards/digilent/arty_a7/board.c +++ b/boards/digilent/arty_a7/board.c @@ -16,7 +16,7 @@ LOG_MODULE_REGISTER(board, CONFIG_LOG_DEFAULT_LEVEL); #define DAPLINK_QSPI_MUX_NODE DT_NODELABEL(daplink_qspi_mux) -#if DT_NODE_HAS_STATUS(DAPLINK_QSPI_MUX_NODE, okay) +#if DT_NODE_HAS_STATUS_OKAY(DAPLINK_QSPI_MUX_NODE) int board_daplink_qspi_mux_select(enum board_daplink_qspi_mux_mode mode) { struct gpio_dt_spec mux = GPIO_DT_SPEC_GET(DAPLINK_QSPI_MUX_NODE, mux_gpios); @@ -77,4 +77,4 @@ static int board_init(void) } SYS_INIT(board_init, POST_KERNEL, CONFIG_BOARD_INIT_PRIORITY); -#endif /* DT_NODE_HAS_STATUS(DAPLINK_QSPI_MUX_NODE, okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DAPLINK_QSPI_MUX_NODE) */ diff --git a/boards/nordic/nrf9160dk/board.c b/boards/nordic/nrf9160dk/board.c index adf137df196..c8e680c4539 100644 --- a/boards/nordic/nrf9160dk/board.c +++ b/boards/nordic/nrf9160dk/board.c @@ -32,7 +32,7 @@ LOG_MODULE_REGISTER(board_control, CONFIG_BOARD_NRF9160DK_LOG_LEVEL); GET_PORT(reset_input, gpios, 0) == 0 && \ GET_PIN(reset_input, gpios, 0) == 18) #define USE_RESET_GPIO \ - (DT_NODE_HAS_STATUS(DT_NODELABEL(reset_input), okay) && \ + (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(reset_input)) && \ !RESET_INPUT_IS_PINRESET) struct switch_cfg { @@ -47,7 +47,7 @@ struct switch_cfg { #endif }; -#define ROUTING_ENABLED(_name) DT_NODE_HAS_STATUS(DT_NODELABEL(_name), okay) +#define ROUTING_ENABLED(_name) DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(_name)) #define SWITCH_CFG(_name, _idx) \ { \ .gpio = GET_DEV(_name, control_gpios, _idx), \ diff --git a/boards/nordic/nrf9160dk/nrf52840_reset.c b/boards/nordic/nrf9160dk/nrf52840_reset.c index e639b5765b7..aa9f9d4b620 100644 --- a/boards/nordic/nrf9160dk/nrf52840_reset.c +++ b/boards/nordic/nrf9160dk/nrf52840_reset.c @@ -12,7 +12,7 @@ #define RESET_NODE DT_NODELABEL(nrf52840_reset) -#if DT_NODE_HAS_STATUS(RESET_NODE, okay) +#if DT_NODE_HAS_STATUS_OKAY(RESET_NODE) #define RESET_GPIO_CTRL DT_GPIO_CTLR(RESET_NODE, gpios) #define RESET_GPIO_PIN DT_GPIO_PIN(RESET_NODE, gpios) @@ -65,4 +65,4 @@ int bt_hci_transport_setup(const struct device *h4) return 0; } -#endif /* DT_NODE_HAS_STATUS(RESET_NODE, okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(RESET_NODE) */ diff --git a/boards/nxp/frdm_mcxa156/board.c b/boards/nxp/frdm_mcxa156/board.c index 98801c47a1a..84347c4715c 100644 --- a/boards/nxp/frdm_mcxa156/board.c +++ b/boards/nxp/frdm_mcxa156/board.c @@ -66,52 +66,52 @@ static int frdm_mcxa156_init(void) CLOCK_SetClockDiv(kCLOCK_DivAHBCLK, 1U); /* !< Set AHBCLKDIV divider to value 1 */ CLOCK_SetClockDiv(kCLOCK_DivFRO_HF_DIV, 1U); /* !< Set FROHFDIV divider to value 1 */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(porta), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(porta)) RESET_ReleasePeripheralReset(kPORT0_RST_SHIFT_RSTn); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(portb), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(portb)) RESET_ReleasePeripheralReset(kPORT1_RST_SHIFT_RSTn); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(portc), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(portc)) RESET_ReleasePeripheralReset(kPORT2_RST_SHIFT_RSTn); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(portd), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(portd)) RESET_ReleasePeripheralReset(kPORT3_RST_SHIFT_RSTn); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(porte), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(porte)) RESET_ReleasePeripheralReset(kPORT4_RST_SHIFT_RSTn); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio0)) RESET_ReleasePeripheralReset(kGPIO0_RST_SHIFT_RSTn); CLOCK_EnableClock(kCLOCK_GateGPIO0); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1)) RESET_ReleasePeripheralReset(kGPIO1_RST_SHIFT_RSTn); CLOCK_EnableClock(kCLOCK_GateGPIO1); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio2)) RESET_ReleasePeripheralReset(kGPIO2_RST_SHIFT_RSTn); CLOCK_EnableClock(kCLOCK_GateGPIO2); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio3)) RESET_ReleasePeripheralReset(kGPIO3_RST_SHIFT_RSTn); CLOCK_EnableClock(kCLOCK_GateGPIO3); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio4)) RESET_ReleasePeripheralReset(kGPIO4_RST_SHIFT_RSTn); CLOCK_EnableClock(kCLOCK_GateGPIO4); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpuart0)) CLOCK_SetClockDiv(kCLOCK_DivLPUART0, 1u); CLOCK_AttachClk(kFRO12M_to_LPUART0); #endif diff --git a/boards/nxp/frdm_mcxn236/board.c b/boards/nxp/frdm_mcxn236/board.c index 8f0d1fd7976..fbaf20ccd65 100644 --- a/boards/nxp/frdm_mcxn236/board.c +++ b/boards/nxp/frdm_mcxn236/board.c @@ -88,84 +88,84 @@ static int frdm_mcxn236_init(void) /* Set AHBCLKDIV divider to value 1 */ CLOCK_SetClkDiv(kCLOCK_DivAhbClk, 1U); -#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexcomm1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcomm1)) CLOCK_SetClkDiv(kCLOCK_DivFlexcom1Clk, 1u); CLOCK_AttachClk(kFRO12M_to_FLEXCOMM1); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexcomm2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcomm2)) CLOCK_SetClkDiv(kCLOCK_DivFlexcom2Clk, 1u); CLOCK_AttachClk(kFRO12M_to_FLEXCOMM2); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexcomm3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcomm3)) CLOCK_SetClkDiv(kCLOCK_DivFlexcom3Clk, 1u); CLOCK_AttachClk(kFRO12M_to_FLEXCOMM3); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexcomm4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcomm4)) CLOCK_SetClkDiv(kCLOCK_DivFlexcom4Clk, 1u); CLOCK_AttachClk(kFRO12M_to_FLEXCOMM4); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexcomm5), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcomm5)) CLOCK_SetClkDiv(kCLOCK_DivFlexcom5Clk, 1u); CLOCK_AttachClk(kFRO12M_to_FLEXCOMM5); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(os_timer), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(os_timer)) CLOCK_AttachClk(kCLK_1M_to_OSTIMER); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio0)) CLOCK_EnableClock(kCLOCK_Gpio0); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1)) CLOCK_EnableClock(kCLOCK_Gpio1); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio2)) CLOCK_EnableClock(kCLOCK_Gpio2); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio3)) CLOCK_EnableClock(kCLOCK_Gpio3); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio4)) CLOCK_EnableClock(kCLOCK_Gpio4); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio5), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio5)) CLOCK_EnableClock(kCLOCK_Gpio5); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(wwdt0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(wwdt0)) CLOCK_SetClkDiv(kCLOCK_DivWdt0Clk, 1u); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ctimer0)) CLOCK_SetClkDiv(kCLOCK_DivCtimer0Clk, 1U); CLOCK_AttachClk(kPLL0_to_CTIMER0); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ctimer1)) CLOCK_SetClkDiv(kCLOCK_DivCtimer1Clk, 1U); CLOCK_AttachClk(kPLL0_to_CTIMER1); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ctimer2)) CLOCK_SetClkDiv(kCLOCK_DivCtimer2Clk, 1U); CLOCK_AttachClk(kPLL0_to_CTIMER2); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ctimer3)) CLOCK_SetClkDiv(kCLOCK_DivCtimer3Clk, 1U); CLOCK_AttachClk(kPLL0_to_CTIMER3); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ctimer4)) CLOCK_SetClkDiv(kCLOCK_DivCtimer4Clk, 1U); CLOCK_AttachClk(kPLL0_to_CTIMER4); #endif diff --git a/boards/nxp/frdm_mcxn947/board.c b/boards/nxp/frdm_mcxn947/board.c index 37ec5f4dd6d..db21a4ae194 100644 --- a/boards/nxp/frdm_mcxn947/board.c +++ b/boards/nxp/frdm_mcxn947/board.c @@ -127,7 +127,7 @@ static int frdm_mcxn947_init(void) CLOCK_SetupExtClocking(BOARD_XTAL0_CLK_HZ); -#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexcan0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcan0)) /* Set up PLL1 for 80 MHz FlexCAN clock */ const pll_setup_t pll1Setup = { .pllctrl = SCG_SPLLCTRL_SOURCE(1U) | SCG_SPLLCTRL_SELI(27U) | @@ -146,50 +146,50 @@ static int frdm_mcxn947_init(void) CLOCK_SetClkDiv(kCLOCK_DivPLL1Clk0, 1U); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexcomm1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcomm1)) CLOCK_SetClkDiv(kCLOCK_DivFlexcom1Clk, 1u); CLOCK_AttachClk(kFRO12M_to_FLEXCOMM1); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexcomm2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcomm2)) CLOCK_SetClkDiv(kCLOCK_DivFlexcom2Clk, 1u); CLOCK_AttachClk(kFRO12M_to_FLEXCOMM2); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexcomm4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcomm4)) CLOCK_SetClkDiv(kCLOCK_DivFlexcom4Clk, 1u); CLOCK_AttachClk(kFRO12M_to_FLEXCOMM4); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(os_timer), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(os_timer)) CLOCK_AttachClk(kCLK_1M_to_OSTIMER); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio0)) CLOCK_EnableClock(kCLOCK_Gpio0); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1)) CLOCK_EnableClock(kCLOCK_Gpio1); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio2)) CLOCK_EnableClock(kCLOCK_Gpio2); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio3)) CLOCK_EnableClock(kCLOCK_Gpio3); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio4)) CLOCK_EnableClock(kCLOCK_Gpio4); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio5), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio5)) CLOCK_EnableClock(kCLOCK_Gpio5); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(dac0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dac0)) SPC_EnableActiveModeAnalogModules(SPC0, kSPC_controlDac0); CLOCK_SetClkDiv(kCLOCK_DivDac0Clk, 1u); CLOCK_AttachClk(kFRO_HF_to_DAC0); @@ -197,7 +197,7 @@ static int frdm_mcxn947_init(void) CLOCK_EnableClock(kCLOCK_Dac0); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(dac1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dac1)) SPC_EnableActiveModeAnalogModules(SPC0, kSPC_controlDac1); CLOCK_SetClkDiv(kCLOCK_DivDac1Clk, 1u); CLOCK_AttachClk(kFRO_HF_to_DAC1); @@ -205,7 +205,7 @@ static int frdm_mcxn947_init(void) CLOCK_EnableClock(kCLOCK_Dac1); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(enet)) CLOCK_AttachClk(kNONE_to_ENETRMII); CLOCK_EnableClock(kCLOCK_Enet); SYSCON0->PRESETCTRL2 = SYSCON_PRESETCTRL2_ENET_RST_MASK; @@ -214,41 +214,41 @@ static int frdm_mcxn947_init(void) SYSCON->ENET_PHY_INTF_SEL = SYSCON_ENET_PHY_INTF_SEL_PHY_SEL(1); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(wwdt0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(wwdt0)) CLOCK_SetClkDiv(kCLOCK_DivWdt0Clk, 1u); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ctimer0)) CLOCK_SetClkDiv(kCLOCK_DivCtimer0Clk, 1U); CLOCK_AttachClk(kPLL0_to_CTIMER0); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ctimer1)) CLOCK_SetClkDiv(kCLOCK_DivCtimer1Clk, 1U); CLOCK_AttachClk(kPLL0_to_CTIMER1); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ctimer2)) CLOCK_SetClkDiv(kCLOCK_DivCtimer2Clk, 1U); CLOCK_AttachClk(kPLL0_to_CTIMER2); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ctimer3)) CLOCK_SetClkDiv(kCLOCK_DivCtimer3Clk, 1U); CLOCK_AttachClk(kPLL0_to_CTIMER3); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ctimer4)) CLOCK_SetClkDiv(kCLOCK_DivCtimer4Clk, 1U); CLOCK_AttachClk(kPLL0_to_CTIMER4); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexcan0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcan0)) CLOCK_SetClkDiv(kCLOCK_DivFlexcan0Clk, 1U); CLOCK_AttachClk(kPLL1_CLK0_to_FLEXCAN0); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usdhc0)) CLOCK_SetClkDiv(kCLOCK_DivUSdhcClk, 1u); CLOCK_AttachClk(kFRO_HF_to_USDHC); #endif @@ -260,17 +260,17 @@ static int frdm_mcxn947_init(void) enable_cache64(); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(vref), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(vref)) CLOCK_EnableClock(kCLOCK_Vref); SPC_EnableActiveModeAnalogModules(SPC0, kSPC_controlVref); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpadc0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpadc0)) CLOCK_SetClkDiv(kCLOCK_DivAdc0Clk, 1U); CLOCK_AttachClk(kFRO_HF_to_ADC0); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(usb1), okay) && CONFIG_USB_DC_NXP_EHCI +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usb1)) && CONFIG_USB_DC_NXP_EHCI usb_phy_config_struct_t usbPhyConfig = { BOARD_USB_PHY_D_CAL, BOARD_USB_PHY_TXCAL45DP, BOARD_USB_PHY_TXCAL45DM, }; @@ -312,13 +312,13 @@ static int frdm_mcxn947_init(void) USB_EhciPhyInit(kUSB_ControllerEhci0, BOARD_XTAL0_CLK_HZ, &usbPhyConfig); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpcmp0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpcmp0)) CLOCK_SetClkDiv(kCLOCK_DivCmp0FClk, 1U); CLOCK_AttachClk(kFRO12M_to_CMP0F); SPC_EnableActiveModeAnalogModules(SPC0, (kSPC_controlCmp0 | kSPC_controlCmp0Dac)); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(lptmr0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lptmr0)) /* * Clock Select Decides what input source the lptmr will clock from @@ -340,9 +340,9 @@ static int frdm_mcxn947_init(void) CLOCK_SetupClockCtrl(kCLOCK_CLKIN_ENA_FM_USBH_LPT); #endif /* DT_PROP(DT_NODELABEL(lptmr0), clk_source) */ -#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(lptmr0), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lptmr0)) */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexio0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexio0)) CLOCK_SetClkDiv(kCLOCK_DivFlexioClk, 1u); CLOCK_AttachClk(kPLL0_to_FLEXIO); #endif diff --git a/boards/silabs/dev_kits/sltb004a/board.c b/boards/silabs/dev_kits/sltb004a/board.c index 43dd2a6b3b2..1b09177ce69 100644 --- a/boards/silabs/dev_kits/sltb004a/board.c +++ b/boards/silabs/dev_kits/sltb004a/board.c @@ -37,7 +37,7 @@ static int efr32mg_sltb004a_init(void) #define CCS811 DT_NODELABEL(ccs811) -#if DT_NODE_HAS_STATUS(CCS811, okay) +#if DT_NODE_HAS_STATUS_OKAY(CCS811) cfg = (struct supply_cfg){ .gpio = DEVICE_DT_GET(DT_GPIO_CTLR(CCS811, supply_gpios)), .pin = DT_GPIO_PIN(CCS811, supply_gpios), diff --git a/drivers/adc/adc_gd32.c b/drivers/adc/adc_gd32.c index 75760de6713..46fbfc783b7 100644 --- a/drivers/adc/adc_gd32.c +++ b/drivers/adc/adc_gd32.c @@ -41,9 +41,9 @@ LOG_MODULE_REGISTER(adc_gd32, CONFIG_ADC_LOG_LEVEL); #define ADC1_NODE DT_NODELABEL(adc1) #define ADC2_NODE DT_NODELABEL(adc2) -#define ADC0_ENABLE DT_NODE_HAS_STATUS(ADC0_NODE, okay) -#define ADC1_ENABLE DT_NODE_HAS_STATUS(ADC1_NODE, okay) -#define ADC2_ENABLE DT_NODE_HAS_STATUS(ADC2_NODE, okay) +#define ADC0_ENABLE DT_NODE_HAS_STATUS_OKAY(ADC0_NODE) +#define ADC1_ENABLE DT_NODE_HAS_STATUS_OKAY(ADC1_NODE) +#define ADC2_ENABLE DT_NODE_HAS_STATUS_OKAY(ADC2_NODE) #ifndef ADC0 /** diff --git a/drivers/audio/dmic_mcux.c b/drivers/audio/dmic_mcux.c index ff357fda9bb..0f032e8368c 100644 --- a/drivers/audio/dmic_mcux.c +++ b/drivers/audio/dmic_mcux.c @@ -686,7 +686,7 @@ static const struct _dmic_ops dmic_ops = { /* Gets pointer for a given PDM channel node */ #define PDM_DMIC_CHAN_GET(pdm_node) \ - COND_CODE_1(DT_NODE_HAS_STATUS(pdm_node, okay), \ + COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(pdm_node), \ (&pdm_channel_##pdm_node), (NULL)), /* Gets array of pointers to PDM channels */ diff --git a/drivers/clock_control/clock_control_gd32.c b/drivers/clock_control/clock_control_gd32.c index 1a20d5e4ab2..52b197e2029 100644 --- a/drivers/clock_control/clock_control_gd32.c +++ b/drivers/clock_control/clock_control_gd32.c @@ -43,7 +43,7 @@ struct clock_control_gd32_config { #if DT_HAS_COMPAT_STATUS_OKAY(gd_gd32_timer) /* timer identifiers */ #define TIMER_ID_OR_NONE(nodelabel) \ - COND_CODE_1(DT_NODE_HAS_STATUS(DT_NODELABEL(nodelabel), okay), \ + COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(nodelabel)), \ (DT_CLOCKS_CELL(DT_NODELABEL(nodelabel), id),), ()) static const uint16_t timer_ids[] = { diff --git a/drivers/clock_control/clock_control_ifx_cat1.c b/drivers/clock_control/clock_control_ifx_cat1.c index 1d89ed0fbe0..606e06c4e46 100644 --- a/drivers/clock_control/clock_control_ifx_cat1.c +++ b/drivers/clock_control/clock_control_ifx_cat1.c @@ -18,111 +18,111 @@ /* Enumeration of enabled in device tree Clock, uses for indexing clock info table */ enum { -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_imo), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_imo)) INFINEON_CAT1_CLOCK_IMO, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_iho), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_iho)) INFINEON_CAT1_CLOCK_IHO, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux0)) INFINEON_CAT1_CLOCK_PATHMUX0, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux1)) INFINEON_CAT1_CLOCK_PATHMUX1, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux2)) INFINEON_CAT1_CLOCK_PATHMUX2, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux3)) INFINEON_CAT1_CLOCK_PATHMUX3, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux4)) INFINEON_CAT1_CLOCK_PATHMUX4, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf0)) INFINEON_CAT1_CLOCK_HF0, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf1)) INFINEON_CAT1_CLOCK_HF1, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf2)) INFINEON_CAT1_CLOCK_HF2, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf3)) INFINEON_CAT1_CLOCK_HF3, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf4)) INFINEON_CAT1_CLOCK_HF4, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf5), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf5)) INFINEON_CAT1_CLOCK_HF5, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf6), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf6)) INFINEON_CAT1_CLOCK_HF6, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf7), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf7)) INFINEON_CAT1_CLOCK_HF7, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf8), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf8)) INFINEON_CAT1_CLOCK_HF8, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf9), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf9)) INFINEON_CAT1_CLOCK_HF9, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf10), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf10)) INFINEON_CAT1_CLOCK_HF10, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf11), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf11)) INFINEON_CAT1_CLOCK_HF11, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf12), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf12)) INFINEON_CAT1_CLOCK_HF12, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf13), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf13)) INFINEON_CAT1_CLOCK_HF13, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_fast), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_fast)) INFINEON_CAT1_CLOCK_FAST, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_slow), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_slow)) INFINEON_CAT1_CLOCK_SLOW, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_peri), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_peri)) INFINEON_CAT1_CLOCK_PERI, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pll0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pll0)) INFINEON_CAT1_CLOCK_PLL0, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pll1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pll1)) INFINEON_CAT1_CLOCK_PLL1, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(fll0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(fll0)) INFINEON_CAT1_CLOCK_FLL0, #endif @@ -142,111 +142,111 @@ struct infineon_cat1_clock_info_t { static struct infineon_cat1_clock_info_t clock_info_table[INFINEON_CAT1_ENABLED_CLOCK_COUNT] = { /* We always have IMO */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_imo), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_imo)) [INFINEON_CAT1_CLOCK_IMO] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_imo)) }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_iho), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_iho)) [INFINEON_CAT1_CLOCK_IHO] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_iho)) }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux0)) [INFINEON_CAT1_CLOCK_PATHMUX0] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(path_mux0)) }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux1)) [INFINEON_CAT1_CLOCK_PATHMUX1] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(path_mux1)) }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux2)) [INFINEON_CAT1_CLOCK_PATHMUX2] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(path_mux2)) }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux3)) [INFINEON_CAT1_CLOCK_PATHMUX3] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(path_mux3)) }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux4)) [INFINEON_CAT1_CLOCK_PATHMUX4] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(path_mux4)) }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf0)) [INFINEON_CAT1_CLOCK_HF0] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf0)) }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf1)) [INFINEON_CAT1_CLOCK_HF1] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf1)) }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf2)) [INFINEON_CAT1_CLOCK_HF2] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf2)) }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf3)) [INFINEON_CAT1_CLOCK_HF3] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf3)) }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf4)) [INFINEON_CAT1_CLOCK_HF4] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf4)) }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf5), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf5)) [INFINEON_CAT1_CLOCK_HF5] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf5)) }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf6), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf6)) [INFINEON_CAT1_CLOCK_HF6] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf6)) }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf7), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf7)) [INFINEON_CAT1_CLOCK_HF7] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf7)) }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf8), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf8)) [INFINEON_CAT1_CLOCK_HF8] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf8)) }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf9), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf9)) [INFINEON_CAT1_CLOCK_HF9] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf9)) }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf10), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf10)) [INFINEON_CAT1_CLOCK_HF10] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf10)) }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf11), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf11)) [INFINEON_CAT1_CLOCK_HF11] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf11)) }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf12), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf12)) [INFINEON_CAT1_CLOCK_HF12] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf12)) }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf13), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf13)) [INFINEON_CAT1_CLOCK_HF13] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_hf13)) }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_fast), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_fast)) [INFINEON_CAT1_CLOCK_FAST] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_fast)) }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_slow), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_slow)) [INFINEON_CAT1_CLOCK_SLOW] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_slow)) }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_peri), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_peri)) [INFINEON_CAT1_CLOCK_PERI] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(clk_peri)) }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pll0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pll0)) [INFINEON_CAT1_CLOCK_PLL0] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(pll0)) }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pll1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pll1)) [INFINEON_CAT1_CLOCK_PLL1] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(pll1)) }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(fll0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(fll0)) [INFINEON_CAT1_CLOCK_FLL0] = { .dt_ord = DT_DEP_ORD(DT_NODELABEL(fll0)) }, #endif }; @@ -326,7 +326,7 @@ static cyhal_clock_t *_get_hal_obj_from_ord(uint32_t dt_ord) return ret_obj; } -#if DT_NODE_HAS_STATUS(DT_NODELABEL(dpll_hp), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dpll_hp)) __WEAK void cycfg_ClockStartupError(uint32_t error) { (void)error; /* Suppress the compiler warning */ @@ -390,25 +390,25 @@ static int clock_control_infineon_cat1_init(const struct device *dev) uint32 clock_div; /* Configure IMO */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_imo), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_imo)) clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_IMO].obj; if (cyhal_clock_get(clock_obj, &CYHAL_CLOCK_RSC_IMO)) { return -EIO; } #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_iho), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_iho)) clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_IHO].obj; if (cyhal_clock_get(clock_obj, &CYHAL_CLOCK_RSC_IHO)) { return -EIO; } #endif -#if !DT_NODE_HAS_STATUS(DT_NODELABEL(clk_imo), okay) && \ - !DT_NODE_HAS_STATUS(DT_NODELABEL(clk_iho), okay) +#if !DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_imo)) && \ + !DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_iho)) #error "IMO clock or IHO clock must be enabled" #endif /* Configure the PathMux[0] to source defined in tree device 'path_mux0' node */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux0)) clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_PATHMUX0].obj; clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(path_mux0)); @@ -418,7 +418,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev) #endif /* Configure the PathMux[1] to source defined in tree device 'path_mux1' node */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux1)) clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_PATHMUX1].obj; clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(path_mux1)); @@ -428,7 +428,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev) #endif /* Configure the PathMux[2] to source defined in tree device 'path_mux2' node */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux2)) clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_PATHMUX2].obj; clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(path_mux2)); @@ -438,7 +438,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev) #endif /* Configure the PathMux[3] to source defined in tree device 'path_mux3' node */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux3)) clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_PATHMUX3].obj; clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(path_mux3)); @@ -448,7 +448,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev) #endif /* Configure the PathMux[4] to source defined in tree device 'path_mux4' node */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(path_mux4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(path_mux4)) clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_PATHMUX4].obj; clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(path_mux4)); @@ -458,7 +458,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev) #endif /* Configure FLL0 */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(fll0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(fll0)) clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_FLL0].obj; frequency = DT_PROP(DT_NODELABEL(fll0), clock_frequency); @@ -470,7 +470,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev) #endif /* Configure PLL0 */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pll0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pll0)) clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_PLL0].obj; frequency = DT_PROP(DT_NODELABEL(pll0), clock_frequency); @@ -483,7 +483,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev) #endif /* Configure PLL1 */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pll1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pll1)) clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_PLL1].obj; frequency = DT_PROP(DT_NODELABEL(pll1), clock_frequency); @@ -495,7 +495,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev) #endif /* Configure the HF[0] to source defined in tree device 'clk_hf0' node */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf0)) clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF0].obj; clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf0)); clock_div = DT_PROP(DT_NODELABEL(clk_hf0), clock_div); @@ -506,7 +506,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev) #endif /* Configure the HF[1] to source defined in tree device 'clk_hf1' node */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf1)) clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF1].obj; clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf1)); clock_div = DT_PROP(DT_NODELABEL(clk_hf1), clock_div); @@ -517,7 +517,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev) #endif /* Configure the HF[2] to source defined in tree device 'clk_hf2' node */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf2)) clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF2].obj; clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf2)); clock_div = DT_PROP(DT_NODELABEL(clk_hf2), clock_div); @@ -528,7 +528,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev) #endif /* Configure the HF[3] to source defined in tree device 'clk_hf3' node */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf3)) clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF3].obj; clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf3)); clock_div = DT_PROP(DT_NODELABEL(clk_hf3), clock_div); @@ -539,7 +539,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev) #endif /* Configure the HF[4] to source defined in tree device 'clk_hf4' node */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf4)) clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF4].obj; clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf4)); clock_div = DT_PROP(DT_NODELABEL(clk_hf4), clock_div); @@ -550,7 +550,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev) #endif /* Configure the HF[5] to source defined in tree device 'clk_hf5' node */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf5), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf5)) clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF5].obj; clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf5)); clock_div = DT_PROP(DT_NODELABEL(clk_hf5), clock_div); @@ -561,7 +561,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev) #endif /* Configure the HF[6] to source defined in tree device 'clk_hf6' node */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf6), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf6)) clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF6].obj; clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf6)); clock_div = DT_PROP(DT_NODELABEL(clk_hf6), clock_div); @@ -572,7 +572,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev) #endif /* Configure the HF[7] to source defined in tree device 'clk_hf7' node */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf7), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf7)) clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF7].obj; clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf7)); clock_div = DT_PROP(DT_NODELABEL(clk_hf7), clock_div); @@ -583,7 +583,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev) #endif /* Configure the HF[8] to source defined in tree device 'clk_hf8' node */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf8), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf8)) clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF8].obj; clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf8)); clock_div = DT_PROP(DT_NODELABEL(clk_hf8), clock_div); @@ -594,7 +594,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev) #endif /* Configure the HF[9] to source defined in tree device 'clk_hf9' node */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf9), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf9)) clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF9].obj; clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf9)); clock_div = DT_PROP(DT_NODELABEL(clk_hf9), clock_div); @@ -605,7 +605,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev) #endif /* Configure the HF[10] to source defined in tree device 'clk_hf10' node */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf10), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf10)) clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF10].obj; clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf10)); clock_div = DT_PROP(DT_NODELABEL(clk_hf10), clock_div); @@ -616,7 +616,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev) #endif /* Configure the HF[11] to source defined in tree device 'clk_hf11' node */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf11), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf11)) clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF11].obj; clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf11)); clock_div = DT_PROP(DT_NODELABEL(clk_hf11), clock_div); @@ -627,7 +627,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev) #endif /* Configure the HF[12] to source defined in tree device 'clk_hf12' node */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf12), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf12)) clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF12].obj; clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf12)); clock_div = DT_PROP(DT_NODELABEL(clk_hf12), clock_div); @@ -638,7 +638,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev) #endif /* Configure the HF[13] to source defined in tree device 'clk_hf13' node */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_hf13), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_hf13)) clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_HF13].obj; clock_source_obj = _get_hal_obj_from_ord(GET_CLK_SOURCE_ORD(clk_hf13)); clock_div = DT_PROP(DT_NODELABEL(clk_hf13), clock_div); @@ -649,7 +649,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev) #endif /* Configure the clock fast to source defined in tree device 'clk_fast' node */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_fast), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_fast)) clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_FAST].obj; clock_div = DT_PROP(DT_NODELABEL(clk_fast), clock_div); @@ -663,7 +663,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev) #endif /* Configure the clock peri to source defined in tree device 'clk_peri' node */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_peri), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_peri)) clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_PERI].obj; clock_div = DT_PROP(DT_NODELABEL(clk_peri), clock_div); @@ -677,7 +677,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev) #endif /* Configure the clock slow to source defined in tree device 'clk_slow' node */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_slow), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_slow)) clock_obj = &clock_info_table[INFINEON_CAT1_CLOCK_SLOW].obj; clock_div = DT_PROP(DT_NODELABEL(clk_slow), clock_div); @@ -690,7 +690,7 @@ static int clock_control_infineon_cat1_init(const struct device *dev) } #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(dpll_hp), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dpll_hp)) Cy_SysClk_Dpll_Hp0_Init(); SystemCoreClockUpdate(); #endif @@ -713,7 +713,7 @@ static const struct clock_control_driver_api clock_control_infineon_cat1_api = { .off = clock_control_infineon_cat_on_off }; -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_imo), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_imo)) DEVICE_DT_DEFINE(DT_NODELABEL(clk_imo), clock_control_infineon_cat1_init, NULL, @@ -723,7 +723,7 @@ DEVICE_DT_DEFINE(DT_NODELABEL(clk_imo), CONFIG_CLOCK_CONTROL_INIT_PRIORITY, &clock_control_infineon_cat1_api); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_iho), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_iho)) DEVICE_DT_DEFINE(DT_NODELABEL(clk_iho), clock_control_infineon_cat1_init, NULL, diff --git a/drivers/clock_control/clock_control_litex.h b/drivers/clock_control/clock_control_litex.h index 14d371c077c..8a1b25de400 100644 --- a/drivers/clock_control/clock_control_litex.h +++ b/drivers/clock_control/clock_control_litex.h @@ -73,7 +73,7 @@ lcko->margin.exp = CLKOUT_MARGIN_EXP(N); /* Devicetree clkout defines */ -#define CLKOUT_EXIST(N) DT_NODE_HAS_STATUS(DT_NODELABEL(clk##N), okay) +#define CLKOUT_EXIST(N) DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk##N)) #define CLKOUT_ID(N) DT_REG_ADDR(DT_NODELABEL(clk##N)) #define CLKOUT_FREQ(N) DT_PROP(DT_NODELABEL(clk##N), \ litex_clock_frequency) diff --git a/drivers/clock_control/clock_control_max32.c b/drivers/clock_control/clock_control_max32.c index 2cbed41bd23..29d7cc2fef4 100644 --- a/drivers/clock_control/clock_control_max32.c +++ b/drivers/clock_control/clock_control_max32.c @@ -106,27 +106,27 @@ static void setup_fixed_clocks(void) MXC_SYS_ClockSourceDisable(ADI_MAX32_CLK_EXTCLK); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_ipo), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_ipo)) MXC_SYS_ClockSourceEnable(ADI_MAX32_CLK_IPO); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_erfo), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_erfo)) MXC_SYS_ClockSourceEnable(ADI_MAX32_CLK_ERFO); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_ibro), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_ibro)) MXC_SYS_ClockSourceEnable(ADI_MAX32_CLK_IBRO); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_iso), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_iso)) MXC_SYS_ClockSourceEnable(ADI_MAX32_CLK_ISO); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_inro), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_inro)) MXC_SYS_ClockSourceEnable(ADI_MAX32_CLK_INRO); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(clk_ertco), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(clk_ertco)) MXC_SYS_ClockSourceEnable(ADI_MAX32_CLK_ERTCO); #endif diff --git a/drivers/clock_control/clock_control_mcux_ccm.c b/drivers/clock_control/clock_control_mcux_ccm.c index 8ff09672352..c3b7f2416c4 100644 --- a/drivers/clock_control/clock_control_mcux_ccm.c +++ b/drivers/clock_control/clock_control_mcux_ccm.c @@ -216,14 +216,14 @@ static int mcux_ccm_get_subsys_rate(const struct device *dev, #endif #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc1), okay) && CONFIG_IMX_USDHC +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usdhc1)) && CONFIG_IMX_USDHC case IMX_CCM_USDHC1_CLK: *rate = CLOCK_GetSysPfdFreq(kCLOCK_Pfd0) / (CLOCK_GetDiv(kCLOCK_Usdhc1Div) + 1U); break; #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc2), okay) && CONFIG_IMX_USDHC +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usdhc2)) && CONFIG_IMX_USDHC case IMX_CCM_USDHC2_CLK: *rate = CLOCK_GetSysPfdFreq(kCLOCK_Pfd0) / (CLOCK_GetDiv(kCLOCK_Usdhc2Div) + 1U); @@ -339,12 +339,12 @@ static int mcux_ccm_get_subsys_rate(const struct device *dev, / (CLOCK_GetDiv(kCLOCK_Sai3Div) + 1); break; #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexspi), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexspi)) case IMX_CCM_FLEXSPI_CLK: *rate = CLOCK_GetClockRootFreq(kCLOCK_FlexspiClkRoot); break; #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexspi2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexspi2)) case IMX_CCM_FLEXSPI2_CLK: *rate = CLOCK_GetClockRootFreq(kCLOCK_Flexspi2ClkRoot); break; @@ -354,7 +354,7 @@ static int mcux_ccm_get_subsys_rate(const struct device *dev, *rate = CLOCK_GetFreq(kCLOCK_PerClk); break; #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexio1), okay) && CONFIG_MCUX_FLEXIO +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexio1)) && CONFIG_MCUX_FLEXIO case IMX_CCM_FLEXIO1_CLK: { uint32_t flexio_mux = CLOCK_GetMux(kCLOCK_Flexio1Mux); @@ -376,8 +376,8 @@ static int mcux_ccm_get_subsys_rate(const struct device *dev, / (CLOCK_GetDiv(kCLOCK_Flexio1Div) + 1); } break; #endif -#if (DT_NODE_HAS_STATUS(DT_NODELABEL(flexio2), okay) \ - || DT_NODE_HAS_STATUS(DT_NODELABEL(flexio3), okay)) && CONFIG_MCUX_FLEXIO +#if (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexio2)) \ + || DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexio3))) && CONFIG_MCUX_FLEXIO case IMX_CCM_FLEXIO2_3_CLK: { uint32_t flexio_mux = CLOCK_GetMux(kCLOCK_Flexio2Mux); diff --git a/drivers/clock_control/clock_control_mcux_scg.c b/drivers/clock_control/clock_control_mcux_scg.c index 5642aabe8dd..684cb8f2aa2 100644 --- a/drivers/clock_control/clock_control_mcux_scg.c +++ b/drivers/clock_control/clock_control_mcux_scg.c @@ -125,7 +125,7 @@ static int mcux_scg_get_rate(const struct device *dev, static int mcux_scg_init(const struct device *dev) { -#if DT_NODE_HAS_STATUS(MCUX_SCG_CLOCK_NODE(clkout_clk), okay) +#if DT_NODE_HAS_STATUS_OKAY(MCUX_SCG_CLOCK_NODE(clkout_clk)) #if DT_SAME_NODE(DT_CLOCKS_CTLR(MCUX_SCG_CLOCK_NODE(clkout_clk)), MCUX_SCG_CLOCK_NODE(slow_clk)) CLOCK_SetClkOutSel(kClockClkoutSelScgSlow); #elif DT_SAME_NODE(DT_CLOCKS_CTLR(MCUX_SCG_CLOCK_NODE(clkout_clk)), MCUX_SCG_CLOCK_NODE(sosc_clk)) @@ -139,7 +139,7 @@ static int mcux_scg_init(const struct device *dev) #else #error Unsupported SCG clkout clock source #endif -#endif /* DT_NODE_HAS_STATUS(MCUX_SCG_CLOCK_NODE(clkout_clk), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(MCUX_SCG_CLOCK_NODE(clkout_clk)) */ return 0; } diff --git a/drivers/clock_control/clock_control_mcux_sim.c b/drivers/clock_control/clock_control_mcux_sim.c index 26c9a3c1c2a..2b16e5d6361 100644 --- a/drivers/clock_control/clock_control_mcux_sim.c +++ b/drivers/clock_control/clock_control_mcux_sim.c @@ -67,7 +67,7 @@ static int mcux_sim_get_subsys_rate(const struct device *dev, return 0; } -#if DT_NODE_HAS_STATUS(DT_INST(0, nxp_kinetis_ke1xf_sim), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nxp_kinetis_ke1xf_sim)) #define NXP_KINETIS_SIM_NODE DT_INST(0, nxp_kinetis_ke1xf_sim) #if DT_NODE_HAS_PROP(DT_INST(0, nxp_kinetis_ke1xf_sim), clkout_source) #define NXP_KINETIS_SIM_CLKOUT_SOURCE \ diff --git a/drivers/clock_control/clock_control_nrf2_fll16m.c b/drivers/clock_control/clock_control_nrf2_fll16m.c index 4fdf9220c27..7462d822f44 100644 --- a/drivers/clock_control/clock_control_nrf2_fll16m.c +++ b/drivers/clock_control/clock_control_nrf2_fll16m.c @@ -26,7 +26,7 @@ BUILD_ASSERT(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT) == 1, #define FLL16M_LFXO_NODE DT_INST_PHANDLE_BY_NAME(0, clocks, lfxo) #define FLL16M_HFXO_NODE DT_INST_PHANDLE_BY_NAME(0, clocks, hfxo) -#define FLL16M_HAS_LFXO DT_NODE_HAS_STATUS(FLL16M_LFXO_NODE, okay) +#define FLL16M_HAS_LFXO DT_NODE_HAS_STATUS_OKAY(FLL16M_LFXO_NODE) #define FLL16M_LFXO_ACCURACY DT_PROP(FLL16M_LFXO_NODE, accuracy_ppm) #define FLL16M_HFXO_ACCURACY DT_PROP(FLL16M_HFXO_NODE, accuracy_ppm) diff --git a/drivers/clock_control/clock_control_nrf2_lfclk.c b/drivers/clock_control/clock_control_nrf2_lfclk.c index 9ce7974570e..36b8e247297 100644 --- a/drivers/clock_control/clock_control_nrf2_lfclk.c +++ b/drivers/clock_control/clock_control_nrf2_lfclk.c @@ -19,7 +19,7 @@ BUILD_ASSERT(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT) == 1, #define LFCLK_LFXO_NODE DT_INST_PHANDLE_BY_NAME(0, clocks, lfxo) #define LFCLK_HFXO_NODE DT_INST_PHANDLE_BY_NAME(0, clocks, hfxo) -#define LFCLK_HAS_LFXO DT_NODE_HAS_STATUS(LFCLK_LFXO_NODE, okay) +#define LFCLK_HAS_LFXO DT_NODE_HAS_STATUS_OKAY(LFCLK_LFXO_NODE) #define LFCLK_LFLPRC_ACCURACY DT_INST_PROP(0, lflprc_accuracy_ppm) #define LFCLK_LFRC_ACCURACY DT_INST_PROP(0, lfrc_accuracy_ppm) diff --git a/drivers/clock_control/clock_control_renesas_ra.c b/drivers/clock_control/clock_control_renesas_ra.c index 0b058633151..3065c94e785 100644 --- a/drivers/clock_control/clock_control_renesas_ra.c +++ b/drivers/clock_control/clock_control_renesas_ra.c @@ -38,7 +38,7 @@ #define CLKSRC_FREQ(clk) DT_PROP(DT_PATH(clocks, clk), clock_frequency) -#define IS_CLKSRC_ENABLED(clk) DT_NODE_HAS_STATUS(DT_PATH(clocks, clk), okay) +#define IS_CLKSRC_ENABLED(clk) DT_NODE_HAS_STATUS_OKAY(DT_PATH(clocks, clk)) #define SCKSCR_INIT_VALUE _CONCAT(CLKSRC_, SYSCLK_SRC) diff --git a/drivers/clock_control/clock_control_renesas_ra_cgc.c b/drivers/clock_control/clock_control_renesas_ra_cgc.c index b03852fc86e..70512905be7 100644 --- a/drivers/clock_control/clock_control_renesas_ra_cgc.c +++ b/drivers/clock_control/clock_control_renesas_ra_cgc.c @@ -12,7 +12,7 @@ #include #include -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pclkblock), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pclkblock)) #define MSTP_REGS_ELEM(node_id, prop, idx) \ [DT_STRING_TOKEN_BY_IDX(node_id, prop, idx)] = \ (volatile uint32_t *)DT_REG_ADDR_BY_IDX(node_id, idx), diff --git a/drivers/clock_control/clock_control_smartbond.c b/drivers/clock_control/clock_control_smartbond.c index ed0cc205264..3d866fb4c58 100644 --- a/drivers/clock_control/clock_control_smartbond.c +++ b/drivers/clock_control/clock_control_smartbond.c @@ -265,7 +265,7 @@ static inline int smartbond_clock_control_off(const struct device *dev, switch (clk) { case SMARTBOND_CLK_RC32K: /* RC32K is used by POWERUP and WAKEUP HW FSM */ - BUILD_ASSERT(DT_NODE_HAS_STATUS(DT_NODELABEL(rc32k), okay), + BUILD_ASSERT(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(rc32k)), "RC32K is not allowed to be turned off"); ret = -EPERM; break; @@ -472,12 +472,12 @@ static void smartbond_clock_control_update_memory_settings(uint32_t sys_clock_fr { if (sys_clock_freq > 32000000) { da1469x_qspi_set_read_pipe_delay(QSPIC_ID, 7); -#if DT_NODE_HAS_STATUS(DT_NODELABEL(memc), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(memc)) da1469x_qspi_set_read_pipe_delay(QSPIC2_ID, 7); #endif } else { da1469x_qspi_set_read_pipe_delay(QSPIC_ID, 2); -#if DT_NODE_HAS_STATUS(DT_NODELABEL(memc), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(memc)) da1469x_qspi_set_read_pipe_delay(QSPIC2_ID, 2); #endif } @@ -485,7 +485,7 @@ static void smartbond_clock_control_update_memory_settings(uint32_t sys_clock_fr da1469x_qspi_set_cs_delay(QSPIC_ID, SystemCoreClock, DT_PROP(DT_NODELABEL(flash_controller), read_cs_idle_delay), DT_PROP(DT_NODELABEL(flash_controller), erase_cs_idle_delay)); -#if DT_NODE_HAS_STATUS(DT_NODELABEL(memc), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(memc)) da1469x_qspi_set_cs_delay(QSPIC2_ID, SystemCoreClock, DT_PROP(DT_NODELABEL(memc), read_cs_idle_min_ns), DT_PROP_OR(DT_NODELABEL(memc), erase_cs_idle_min_ns, 0)); @@ -565,7 +565,7 @@ int smartbond_clocks_init(const struct device *dev) ARG_UNUSED(dev); -#if DT_NODE_HAS_STATUS(DT_NODELABEL(memc), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(memc)) /* Make sure QSPIC2 is enabled */ da1469x_clock_amba_enable(CRG_TOP_CLK_AMBA_REG_QSPI2_ENABLE_Msk); #endif @@ -579,12 +579,12 @@ int smartbond_clocks_init(const struct device *dev) DT_FOREACH_CHILD_STATUS_OKAY_SEP(DT_PATH(crg, osc), ENABLE_OSC, (;)); /* Make sure that selected sysclock is enabled */ - BUILD_ASSERT(DT_NODE_HAS_STATUS(DT_PROP(DT_NODELABEL(sys_clk), clock_src), okay), + BUILD_ASSERT(DT_NODE_HAS_STATUS_OKAY(DT_PROP(DT_NODELABEL(sys_clk), clock_src)), "Clock selected as system clock no enabled in DT"); - BUILD_ASSERT(DT_NODE_HAS_STATUS(DT_PROP(DT_NODELABEL(lp_clk), clock_src), okay), + BUILD_ASSERT(DT_NODE_HAS_STATUS_OKAY(DT_PROP(DT_NODELABEL(lp_clk), clock_src)), "Clock selected as LP clock no enabled in DT"); BUILD_ASSERT(DT_NODE_HAS_STATUS(DT_NODELABEL(pll), disabled) || - DT_NODE_HAS_STATUS(DT_NODELABEL(xtal32m), okay), + DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(xtal32m)), "PLL enabled in DT but XTAL32M is disabled"); clk_id = DT_DEP_ORD(DT_PROP(DT_NODELABEL(lp_clk), clock_src)); @@ -616,7 +616,7 @@ static int smartbond_clocks_pm_action(const struct device *dev, enum pm_device_a case PM_DEVICE_ACTION_SUSPEND: break; case PM_DEVICE_ACTION_RESUME: -#if DT_NODE_HAS_STATUS(DT_NODELABEL(memc), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(memc)) /* Make sure QSPIC2 is enabled */ da1469x_clock_amba_enable(CRG_TOP_CLK_AMBA_REG_QSPI2_ENABLE_Msk); #endif diff --git a/drivers/clock_control/clock_stm32_ll_wb0.c b/drivers/clock_control/clock_stm32_ll_wb0.c index 6654867e01e..3a08cf64067 100644 --- a/drivers/clock_control/clock_stm32_ll_wb0.c +++ b/drivers/clock_control/clock_stm32_ll_wb0.c @@ -39,7 +39,7 @@ #if DT_NODE_HAS_PROP(STM32_CLOCK_CONTROL_NODE, slow_clock) -# if !DT_NODE_HAS_STATUS(DT_RCC_SLOWCLK_NODE, okay) +# if !DT_NODE_HAS_STATUS_OKAY(DT_RCC_SLOWCLK_NODE) # error slow-clock source is not enabled # endif diff --git a/drivers/counter/counter_mcux_snvs.c b/drivers/counter/counter_mcux_snvs.c index 3346cc21e75..172b4b894a3 100644 --- a/drivers/counter/counter_mcux_snvs.c +++ b/drivers/counter/counter_mcux_snvs.c @@ -311,7 +311,7 @@ static const struct counter_driver_api mcux_snvs_driver_api = { BUILD_ASSERT(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT) <= 1, "unsupported snvs instance"); -#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0)) static struct mcux_snvs_data mcux_snvs_data_0; static void mcux_snvs_irq_config_0(const struct device *dev); @@ -339,4 +339,4 @@ static void mcux_snvs_irq_config_0(const struct device *dev) mcux_snvs_isr, DEVICE_DT_INST_GET(0), 0); irq_enable(DT_INST_IRQN(0)); } -#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0)) */ diff --git a/drivers/counter/counter_smartbond_timer.c b/drivers/counter/counter_smartbond_timer.c index 8dc3baba045..8ee8f006dae 100644 --- a/drivers/counter/counter_smartbond_timer.c +++ b/drivers/counter/counter_smartbond_timer.c @@ -27,7 +27,7 @@ LOG_MODULE_REGISTER(counter_timer, CONFIG_COUNTER_LOG_LEVEL); #define COUNTER_DT_DEVICE(_idx) DEVICE_DT_GET_OR_NULL(DT_NODELABEL(timer##_idx)) -#define PDC_XTAL_EN (DT_NODE_HAS_STATUS(DT_NODELABEL(xtal32m), okay) ? \ +#define PDC_XTAL_EN (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(xtal32m)) ? \ MCU_PDC_EN_XTAL : MCU_PDC_EN_NONE) struct counter_smartbond_data { diff --git a/drivers/disk/sdmmc_stm32.c b/drivers/disk/sdmmc_stm32.c index 1ce9e8e16d9..faf9564a9fb 100644 --- a/drivers/disk/sdmmc_stm32.c +++ b/drivers/disk/sdmmc_stm32.c @@ -743,7 +743,7 @@ err_card_detect: return err; } -#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0)) #if STM32_SDMMC_USE_DMA diff --git a/drivers/dma/dma_mcux_edma.c b/drivers/dma/dma_mcux_edma.c index 26c7cf58c34..7da8bf79b06 100644 --- a/drivers/dma/dma_mcux_edma.c +++ b/drivers/dma/dma_mcux_edma.c @@ -55,11 +55,11 @@ struct dma_mcux_edma_config { #ifdef CONFIG_DMA_MCUX_USE_DTCM_FOR_DMA_DESCRIPTORS -#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm)) #define EDMA_TCDPOOL_CACHE_ATTR __dtcm_noinit_section -#else /* DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay) */ +#else /* DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm)) */ #error Selected DTCM for MCUX DMA descriptors but no DTCM section. -#endif /* DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm)) */ #elif defined(CONFIG_NOCACHE_MEMORY) #define EDMA_TCDPOOL_CACHE_ATTR __nocache diff --git a/drivers/dma/dma_stm32.c b/drivers/dma/dma_stm32.c index 1b8d1629d56..8918c1c4605 100644 --- a/drivers/dma/dma_stm32.c +++ b/drivers/dma/dma_stm32.c @@ -29,7 +29,7 @@ LOG_MODULE_REGISTER(dma_stm32, CONFIG_DMA_LOG_LEVEL); #define DT_DRV_COMPAT st_stm32_dma_v2bis #endif -#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0)) #if DT_INST_IRQ_HAS_IDX(0, 7) #define DMA_STM32_0_STREAM_COUNT 8 #elif DT_INST_IRQ_HAS_IDX(0, 6) @@ -41,9 +41,9 @@ LOG_MODULE_REGISTER(dma_stm32, CONFIG_DMA_LOG_LEVEL); #else #define DMA_STM32_0_STREAM_COUNT 3 #endif -#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0)) */ -#if DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(1)) #if DT_INST_IRQ_HAS_IDX(1, 7) #define DMA_STM32_1_STREAM_COUNT 8 #elif DT_INST_IRQ_HAS_IDX(1, 6) @@ -53,7 +53,7 @@ LOG_MODULE_REGISTER(dma_stm32, CONFIG_DMA_LOG_LEVEL); #else #define DMA_STM32_1_STREAM_COUNT 5 #endif -#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(1)) */ static const uint32_t table_m_size[] = { LL_DMA_MDATAALIGN_BYTE, @@ -756,7 +756,7 @@ static void dma_stm32_irq_##dma##_##chan(const struct device *dev) \ #endif /* CONFIG_DMA_STM32_SHARED_IRQS */ -#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0)) DMA_STM32_DEFINE_IRQ_HANDLER(0, 0); DMA_STM32_DEFINE_IRQ_HANDLER(0, 1); @@ -804,10 +804,10 @@ static void dma_stm32_config_irq_0(const struct device *dev) DMA_STM32_INIT_DEV(0); -#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0)) */ -#if DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(1)) DMA_STM32_DEFINE_IRQ_HANDLER(1, 0); DMA_STM32_DEFINE_IRQ_HANDLER(1, 1); @@ -856,4 +856,4 @@ static void dma_stm32_config_irq_1(const struct device *dev) DMA_STM32_INIT_DEV(1); -#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(1)) */ diff --git a/drivers/dma/dma_stm32_bdma.c b/drivers/dma/dma_stm32_bdma.c index c5f5c6c74ea..70cc9a67706 100644 --- a/drivers/dma/dma_stm32_bdma.c +++ b/drivers/dma/dma_stm32_bdma.c @@ -906,7 +906,7 @@ static void bdma_stm32_irq_##bdma##_##chan(const struct device *dev) \ } while (false) -#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0)) #define BDMA_STM32_DEFINE_IRQ_HANDLER_GEN(i, _) \ BDMA_STM32_DEFINE_IRQ_HANDLER(0, i) @@ -923,4 +923,4 @@ static void bdma_stm32_config_irq_0(const struct device *dev) BDMA_STM32_INIT_DEV(0); -#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0)) */ diff --git a/drivers/dma/dmamux_stm32.c b/drivers/dma/dmamux_stm32.c index d12a294eb7f..27e02b1c188 100644 --- a/drivers/dma/dmamux_stm32.c +++ b/drivers/dma/dmamux_stm32.c @@ -108,7 +108,7 @@ struct dmamux_stm32_dma_fops { }; #if (defined(CONFIG_DMA_STM32_V1) || defined(CONFIG_DMA_STM32_V2)) && \ - DT_NODE_HAS_STATUS(DT_NODELABEL(dmamux1), okay) + DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dmamux1)) static const struct dmamux_stm32_dma_fops dmamux1 = { dma_stm32_configure, dma_stm32_start, @@ -118,7 +118,7 @@ static const struct dmamux_stm32_dma_fops dmamux1 = { }; #endif -#if defined(CONFIG_DMA_STM32_BDMA) && DT_NODE_HAS_STATUS(DT_NODELABEL(dmamux2), okay) +#if defined(CONFIG_DMA_STM32_BDMA) && DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dmamux2)) static const struct dmamux_stm32_dma_fops dmamux2 = { bdma_stm32_configure, bdma_stm32_start, @@ -130,17 +130,17 @@ static const struct dmamux_stm32_dma_fops dmamux2 = { const struct dmamux_stm32_dma_fops *get_dma_fops(const struct dmamux_stm32_config *dev_config) { -#if DT_NODE_HAS_STATUS(DT_NODELABEL(dmamux1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dmamux1)) if (dev_config->base == DT_REG_ADDR(DT_NODELABEL(dmamux1))) { return &dmamux1; } -#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(dmamux1), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dmamux1)) */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(dmamux2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dmamux2)) if (dev_config->base == DT_REG_ADDR(DT_NODELABEL(dmamux2))) { return &dmamux2; } -#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(dmamux2), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dmamux2)) */ __ASSERT(false, "Unknown dma base address %x", dev_config->base); return (void *)0; @@ -298,24 +298,24 @@ static int dmamux_stm32_init(const struct device *dev) } #endif /* DT_INST_NODE_HAS_PROP(0, clocks) */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(dmamux1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dmamux1)) /* DMA 1 and DMA2 for DMAMUX1, BDMA for DMAMUX2 */ if (config->base == DT_REG_ADDR(DT_NODELABEL(dmamux1))) { /* DMAs assigned to DMAMUX channels at build time might not be ready. */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(dma1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dma1)) if (device_is_ready(DEVICE_DT_GET(DT_NODELABEL(dma1))) == false) { return -ENODEV; } #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(dma2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dma2)) if (device_is_ready(DEVICE_DT_GET(DT_NODELABEL(dma2))) == false) { return -ENODEV; } #endif } -#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(dmamux1), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dmamux1)) */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(dmamux2), okay) && DT_NODE_HAS_STATUS(DT_NODELABEL(bdma1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dmamux2)) && DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(bdma1)) if (config->base == DT_REG_ADDR(DT_NODELABEL(dmamux2))) { if (device_is_ready(DEVICE_DT_GET(DT_NODELABEL(bdma1))) == false) { return -ENODEV; @@ -346,19 +346,19 @@ static const struct dma_driver_api dma_funcs = { #define DMA_1_BEGIN_DMAMUX_CHANNEL DT_PROP_OR(DT_NODELABEL(dma1), dma_offset, 0) #define DMA_1_END_DMAMUX_CHANNEL (DMA_1_BEGIN_DMAMUX_CHANNEL + \ DT_PROP_OR(DT_NODELABEL(dma1), dma_requests, 0)) -#define DEV_DMA1 COND_CODE_1(DT_NODE_HAS_STATUS(DT_NODELABEL(dma1), okay), \ +#define DEV_DMA1 COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dma1)), \ DEVICE_DT_GET(DT_NODELABEL(dma1)), NULL) #define DMA_2_BEGIN_DMAMUX_CHANNEL DT_PROP_OR(DT_NODELABEL(dma2), dma_offset, 0) #define DMA_2_END_DMAMUX_CHANNEL (DMA_2_BEGIN_DMAMUX_CHANNEL + \ DT_PROP_OR(DT_NODELABEL(dma2), dma_requests, 0)) -#define DEV_DMA2 COND_CODE_1(DT_NODE_HAS_STATUS(DT_NODELABEL(dma2), okay), \ +#define DEV_DMA2 COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dma2)), \ DEVICE_DT_GET(DT_NODELABEL(dma2)), NULL) #define BDMA_1_BEGIN_DMAMUX_CHANNEL DT_PROP_OR(DT_NODELABEL(bdma1), dma_offset, 0) #define BDMA_1_END_DMAMUX_CHANNEL (BDMA_1_BEGIN_DMAMUX_CHANNEL + \ DT_PROP_OR(DT_NODELABEL(bdma1), dma_requests, 0)) -#define DEV_BDMA COND_CODE_1(DT_NODE_HAS_STATUS(DT_NODELABEL(bdma1), okay), \ +#define DEV_BDMA COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(bdma1)), \ DEVICE_DT_GET(DT_NODELABEL(bdma1)), NULL) #define DEV_DMA_BINDING(mux_channel) \ diff --git a/drivers/espi/espi_mchp_xec_host_v2.c b/drivers/espi/espi_mchp_xec_host_v2.c index 8cf4e085ed5..12d32007e84 100644 --- a/drivers/espi/espi_mchp_xec_host_v2.c +++ b/drivers/espi/espi_mchp_xec_host_v2.c @@ -108,7 +108,7 @@ static uint8_t ec_host_cmd_sram[CONFIG_ESPI_XEC_PERIPHERAL_HOST_CMD_PARAM_SIZE] #ifdef CONFIG_ESPI_PERIPHERAL_XEC_MAILBOX -BUILD_ASSERT(DT_NODE_HAS_STATUS(DT_NODELABEL(mbox0), okay), +BUILD_ASSERT(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(mbox0)), "XEC mbox0 DT node is disabled!"); static struct xec_mbox_config { @@ -171,7 +171,7 @@ static int init_mbox0(const struct device *dev) #ifdef CONFIG_ESPI_PERIPHERAL_8042_KBC -BUILD_ASSERT(DT_NODE_HAS_STATUS(DT_NODELABEL(kbc0), okay), +BUILD_ASSERT(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(kbc0)), "XEC kbc0 DT node is disabled!"); struct xec_kbc0_config { @@ -665,7 +665,7 @@ static int init_acpi_ec1(const struct device *dev) #ifdef CONFIG_ESPI_PERIPHERAL_EC_HOST_CMD -BUILD_ASSERT(DT_NODE_HAS_STATUS(DT_NODELABEL(emi0), okay), +BUILD_ASSERT(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(emi0)), "XEC EMI0 DT node is disabled!"); struct xec_emi_config { diff --git a/drivers/ethernet/eth_stm32_hal.c b/drivers/ethernet/eth_stm32_hal.c index c151f1a0c12..bc425155860 100644 --- a/drivers/ethernet/eth_stm32_hal.c +++ b/drivers/ethernet/eth_stm32_hal.c @@ -50,7 +50,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME); #endif #if defined(CONFIG_ETH_STM32_HAL_USE_DTCM_FOR_DMA_BUFFER) && \ - !DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay) + !DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm)) #error DTCM for DMA buffer is activated but zephyr,dtcm is not present in dts #endif @@ -91,7 +91,7 @@ static const struct device *eth_stm32_phy_dev = DEVICE_PHY_BY_NAME(0); #define ETH_DMA_TX_TIMEOUT_MS 20U /* transmit timeout in milliseconds */ #if defined(CONFIG_ETH_STM32_HAL_USE_DTCM_FOR_DMA_BUFFER) && \ - DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay) + DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm)) #define __eth_stm32_desc __dtcm_noinit_section #define __eth_stm32_buf __dtcm_noinit_section #elif defined(CONFIG_SOC_SERIES_STM32H7X) diff --git a/drivers/ethernet/nxp_enet/eth_mcux.c b/drivers/ethernet/nxp_enet/eth_mcux.c index 2ac0296d6b2..397fa58bae1 100644 --- a/drivers/ethernet/nxp_enet/eth_mcux.c +++ b/drivers/ethernet/nxp_enet/eth_mcux.c @@ -149,7 +149,7 @@ static const char *eth_name(ENET_Type *base) switch ((int)base) { case DT_INST_REG_ADDR(0): return "ETH_0"; -#if DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(1)) case DT_INST_REG_ADDR(1): return "ETH_1"; #endif @@ -964,10 +964,10 @@ static void eth_mcux_init(const struct device *dev) context->phy_handle->ops = &phyksz8081_ops; #if defined(CONFIG_SOC_SERIES_IMXRT10XX) -#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(enet)) sys_clock = CLOCK_GetFreq(kCLOCK_IpgClk); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(enet2)) sys_clock = CLOCK_GetFreq(kCLOCK_EnetPll1Clk); #endif #elif defined(CONFIG_SOC_SERIES_IMXRT11XX) @@ -1350,7 +1350,7 @@ static void eth_mcux_err_isr(const struct device *dev) } while (false) #define ETH_MCUX_IRQ_PTP(n) \ - COND_CODE_1(DT_NODE_HAS_STATUS(PTP_INST_NODEID(n), okay), \ + COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(PTP_INST_NODEID(n)), \ (ETH_MCUX_IRQ_PTP_INIT(n)), \ (ETH_MCUX_NONE)) @@ -1454,7 +1454,7 @@ static void eth_mcux_err_isr(const struct device *dev) #define ETH_MCUX_PINCTRL_INIT(n) #endif -#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay) && \ +#if DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm)) && \ CONFIG_ETH_MCUX_USE_DTCM_FOR_DMA_BUFFER /* Use DTCM for hardware DMA buffers */ #define _mcux_dma_desc __dtcm_bss_section diff --git a/drivers/ethernet/nxp_enet/eth_nxp_enet.c b/drivers/ethernet/nxp_enet/eth_nxp_enet.c index 255e8d1bd9b..5f6d58ad12c 100644 --- a/drivers/ethernet/nxp_enet/eth_nxp_enet.c +++ b/drivers/ethernet/nxp_enet/eth_nxp_enet.c @@ -855,7 +855,7 @@ static const struct ethernet_api api_funcs = { #define NXP_ENET_DT_PHY_DEV(node_id, phy_phandle, idx) \ DEVICE_DT_GET(DT_PHANDLE_BY_IDX(node_id, phy_phandle, idx)) -#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay) && \ +#if DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm)) && \ CONFIG_ETH_NXP_ENET_USE_DTCM_FOR_DMA_BUFFER #define _nxp_enet_dma_desc_section __dtcm_bss_section #define _nxp_enet_dma_buffer_section __dtcm_noinit_section diff --git a/drivers/ethernet/phy/phy_adin2111.c b/drivers/ethernet/phy/phy_adin2111.c index 380def0ebe7..902838bd08d 100644 --- a/drivers/ethernet/phy/phy_adin2111.c +++ b/drivers/ethernet/phy/phy_adin2111.c @@ -7,7 +7,7 @@ #include -#if DT_NODE_HAS_STATUS(DT_INST(0, adi_adin2111_phy), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_INST(0, adi_adin2111_phy)) #define DT_DRV_COMPAT adi_adin2111_phy #else #define DT_DRV_COMPAT adi_adin1100_phy diff --git a/drivers/flash/soc_flash_lpc.c b/drivers/flash/soc_flash_lpc.c index ae457fe926b..5f931a1bf73 100644 --- a/drivers/flash/soc_flash_lpc.c +++ b/drivers/flash/soc_flash_lpc.c @@ -17,9 +17,9 @@ #include "fsl_flashiap.h" -#if DT_NODE_HAS_STATUS(DT_INST(0, nxp_iap_fmc11), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nxp_iap_fmc11)) #define DT_DRV_COMPAT nxp_iap_fmc11 -#elif DT_NODE_HAS_STATUS(DT_INST(0, nxp_iap_fmc54), okay) +#elif DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nxp_iap_fmc54)) #define DT_DRV_COMPAT nxp_iap_fmc54 #else #error No matching compatible for soc_flash_lpc.c diff --git a/drivers/flash/soc_flash_mcux.c b/drivers/flash/soc_flash_mcux.c index e4a9e8ff7de..5cf62cfe65a 100644 --- a/drivers/flash/soc_flash_mcux.c +++ b/drivers/flash/soc_flash_mcux.c @@ -22,19 +22,19 @@ LOG_MODULE_REGISTER(flash_mcux); -#if DT_NODE_HAS_STATUS(DT_INST(0, nxp_kinetis_ftfa), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nxp_kinetis_ftfa)) #define DT_DRV_COMPAT nxp_kinetis_ftfa -#elif DT_NODE_HAS_STATUS(DT_INST(0, nxp_kinetis_ftfe), okay) +#elif DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nxp_kinetis_ftfe)) #define DT_DRV_COMPAT nxp_kinetis_ftfe -#elif DT_NODE_HAS_STATUS(DT_INST(0, nxp_kinetis_ftfl), okay) +#elif DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nxp_kinetis_ftfl)) #define DT_DRV_COMPAT nxp_kinetis_ftfl -#elif DT_NODE_HAS_STATUS(DT_INST(0, nxp_iap_fmc55), okay) +#elif DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nxp_iap_fmc55)) #define DT_DRV_COMPAT nxp_iap_fmc55 #define SOC_HAS_IAP 1 -#elif DT_NODE_HAS_STATUS(DT_INST(0, nxp_iap_fmc553), okay) +#elif DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nxp_iap_fmc553)) #define DT_DRV_COMPAT nxp_iap_fmc553 #define SOC_HAS_IAP 1 -#elif DT_NODE_HAS_STATUS(DT_INST(0, nxp_iap_msf1), okay) +#elif DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nxp_iap_msf1)) #define DT_DRV_COMPAT nxp_iap_msf1 #define SOC_HAS_IAP_MSF1 1 #else diff --git a/drivers/flash/soc_flash_nrf.c b/drivers/flash/soc_flash_nrf.c index c15722082a3..5ed86b724ff 100644 --- a/drivers/flash/soc_flash_nrf.c +++ b/drivers/flash/soc_flash_nrf.c @@ -23,13 +23,13 @@ #include LOG_MODULE_REGISTER(flash_nrf); -#if DT_NODE_HAS_STATUS(DT_INST(0, nordic_nrf51_flash_controller), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nordic_nrf51_flash_controller)) #define DT_DRV_COMPAT nordic_nrf51_flash_controller -#elif DT_NODE_HAS_STATUS(DT_INST(0, nordic_nrf52_flash_controller), okay) +#elif DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nordic_nrf52_flash_controller)) #define DT_DRV_COMPAT nordic_nrf52_flash_controller -#elif DT_NODE_HAS_STATUS(DT_INST(0, nordic_nrf53_flash_controller), okay) +#elif DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nordic_nrf53_flash_controller)) #define DT_DRV_COMPAT nordic_nrf53_flash_controller -#elif DT_NODE_HAS_STATUS(DT_INST(0, nordic_nrf91_flash_controller), okay) +#elif DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nordic_nrf91_flash_controller)) #define DT_DRV_COMPAT nordic_nrf91_flash_controller #else #error No matching compatible for soc_flash_nrf.c diff --git a/drivers/gpio/gpio_esp32.c b/drivers/gpio/gpio_esp32.c index ea12070235e..d0c933ca37d 100644 --- a/drivers/gpio/gpio_esp32.c +++ b/drivers/gpio/gpio_esp32.c @@ -284,7 +284,7 @@ static int gpio_esp32_port_get_raw(const struct device *port, uint32_t *value) if (cfg->gpio_port == 0) { *value = cfg->gpio_dev->in; -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1)) } else { *value = cfg->gpio_dev->in1.data; #endif @@ -302,7 +302,7 @@ static int gpio_esp32_port_set_masked_raw(const struct device *port, if (cfg->gpio_port == 0) { cfg->gpio_dev->out = (cfg->gpio_dev->out & ~mask) | (mask & value); -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1)) } else { cfg->gpio_dev->out1.data = (cfg->gpio_dev->out1.data & ~mask) | (mask & value); #endif @@ -320,7 +320,7 @@ static int gpio_esp32_port_set_bits_raw(const struct device *port, if (cfg->gpio_port == 0) { cfg->gpio_dev->out_w1ts = pins; -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1)) } else { cfg->gpio_dev->out1_w1ts.data = pins; #endif @@ -336,7 +336,7 @@ static int gpio_esp32_port_clear_bits_raw(const struct device *port, if (cfg->gpio_port == 0) { cfg->gpio_dev->out_w1tc = pins; -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1)) } else { cfg->gpio_dev->out1_w1tc.data = pins; #endif @@ -353,7 +353,7 @@ static int gpio_esp32_port_toggle_bits(const struct device *port, if (cfg->gpio_port == 0) { cfg->gpio_dev->out ^= pins; -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1)) } else { cfg->gpio_dev->out1.data ^= pins; #endif @@ -531,11 +531,11 @@ static void IRAM_ATTR gpio_esp32_isr(void *param) { ARG_UNUSED(param); -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio0)) gpio_esp32_fire_callbacks(DEVICE_DT_INST_GET(0)); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1)) gpio_esp32_fire_callbacks(DEVICE_DT_INST_GET(1)); #endif } diff --git a/drivers/gpio/gpio_gd32.c b/drivers/gpio/gpio_gd32.c index 744f5e4a776..1c40be4de4c 100644 --- a/drivers/gpio/gpio_gd32.c +++ b/drivers/gpio/gpio_gd32.c @@ -365,7 +365,7 @@ static int gpio_gd32_init(const struct device *port) }, \ .reg = DT_INST_REG_ADDR(n), \ .clkid = DT_INST_CLOCKS_CELL(n, id), \ - COND_CODE_1(DT_NODE_HAS_STATUS(SYSCFG_NODE, okay), \ + COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(SYSCFG_NODE), \ (.clkid_exti = DT_CLOCKS_CELL(SYSCFG_NODE, id),), \ (.clkid_exti = DT_CLOCKS_CELL(AFIO_NODE, id),)) \ .reset = RESET_DT_SPEC_INST_GET(n), \ diff --git a/drivers/gpio/gpio_lpc11u6x.c b/drivers/gpio/gpio_lpc11u6x.c index a44deceed9b..102d8c3e8b6 100644 --- a/drivers/gpio/gpio_lpc11u6x.c +++ b/drivers/gpio/gpio_lpc11u6x.c @@ -459,21 +459,21 @@ static void gpio_lpc11u6x_isr(const void *arg) } } /* For each port with active pins, fire the GPIO interrupt callbacks. */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio0)) if (pins[0]) { port = DEVICE_DT_GET(DT_NODELABEL(gpio0)); data = port->data; gpio_fire_callbacks(&data->cb_list, port, pins[0]); } #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1)) if (pins[1]) { port = DEVICE_DT_GET(DT_NODELABEL(gpio1)); data = port->data; gpio_fire_callbacks(&data->cb_list, port, pins[1]); } #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio2)) if (pins[2]) { port = DEVICE_DT_GET(DT_NODELABEL(gpio2)); data = port->data; @@ -589,14 +589,14 @@ DEVICE_DT_DEFINE(DT_NODELABEL(gpio##id), \ PRE_KERNEL_2, CONFIG_GPIO_INIT_PRIORITY, \ &gpio_lpc11u6x_driver_api) -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio0)) GPIO_LPC11U6X_INIT(0); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1)) GPIO_LPC11U6X_INIT(1); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio2)) GPIO_LPC11U6X_INIT(2); #endif diff --git a/drivers/gpio/gpio_mchp_xec.c b/drivers/gpio/gpio_mchp_xec.c index 86d9f2a5d7a..e96130a0941 100644 --- a/drivers/gpio/gpio_mchp_xec.c +++ b/drivers/gpio/gpio_mchp_xec.c @@ -341,7 +341,7 @@ static const struct gpio_driver_api gpio_xec_driver_api = { .manage_callback = gpio_xec_manage_callback, }; -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_000_036), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio_000_036)) static int gpio_xec_port000_036_init(const struct device *dev); static const struct gpio_xec_config gpio_xec_port000_036_config = { @@ -385,9 +385,9 @@ static int gpio_xec_port000_036_init(const struct device *dev) #endif return 0; } -#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_000_036), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio_000_036)) */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_040_076), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio_040_076)) static int gpio_xec_port040_076_init(const struct device *dev); static const struct gpio_xec_config gpio_xec_port040_076_config = { @@ -431,9 +431,9 @@ static int gpio_xec_port040_076_init(const struct device *dev) #endif return 0; } -#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_040_076), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio_040_076)) */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_100_136), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio_100_136)) static int gpio_xec_port100_136_init(const struct device *dev); static const struct gpio_xec_config gpio_xec_port100_136_config = { @@ -477,9 +477,9 @@ static int gpio_xec_port100_136_init(const struct device *dev) #endif return 0; } -#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_100_136), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio_100_136)) */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_140_176), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio_140_176)) static int gpio_xec_port140_176_init(const struct device *dev); static const struct gpio_xec_config gpio_xec_port140_176_config = { @@ -523,9 +523,9 @@ static int gpio_xec_port140_176_init(const struct device *dev) #endif return 0; } -#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_140_176), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio_140_176)) */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_200_236), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio_200_236)) static int gpio_xec_port200_236_init(const struct device *dev); static const struct gpio_xec_config gpio_xec_port200_236_config = { @@ -569,9 +569,9 @@ static int gpio_xec_port200_236_init(const struct device *dev) #endif return 0; } -#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_200_236), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio_200_236)) */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_240_276), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio_240_276)) static int gpio_xec_port240_276_init(const struct device *dev); static const struct gpio_xec_config gpio_xec_port240_276_config = { @@ -615,4 +615,4 @@ static int gpio_xec_port240_276_init(const struct device *dev) #endif return 0; } -#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpio_240_276), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio_240_276)) */ diff --git a/drivers/gpio/gpio_nrfx.c b/drivers/gpio/gpio_nrfx.c index d89c964cc90..151cf1a830c 100644 --- a/drivers/gpio/gpio_nrfx.c +++ b/drivers/gpio/gpio_nrfx.c @@ -446,7 +446,7 @@ static const struct gpio_driver_api gpio_nrfx_drv_api_funcs = { #define GPIOTE_CHECK(id) \ COND_CODE_1(DT_INST_NODE_HAS_PROP(id, gpiote_instance), \ - (BUILD_ASSERT(DT_NODE_HAS_STATUS(GPIOTE_PHANDLE(id), okay), \ + (BUILD_ASSERT(DT_NODE_HAS_STATUS_OKAY(GPIOTE_PHANDLE(id)), \ "Please enable GPIOTE instance for used GPIO port!")), \ ()) diff --git a/drivers/gpio/gpio_nxp_s32.c b/drivers/gpio/gpio_nxp_s32.c index e9bcc29c907..5e9e7a55471 100644 --- a/drivers/gpio/gpio_nxp_s32.c +++ b/drivers/gpio/gpio_nxp_s32.c @@ -519,7 +519,7 @@ static const struct gpio_driver_api gpio_nxp_s32_driver_api = { DT_NODE_HAS_PROP(DT_DRV_INST(n), interrupts)), \ "interrupts and interrupt-parent must be set when " \ "using external interrupts"); \ - IF_ENABLED(DT_NODE_HAS_STATUS(GPIO_NXP_S32_EIRQ_NODE(n), okay), ( \ + IF_ENABLED(DT_NODE_HAS_STATUS_OKAY(GPIO_NXP_S32_EIRQ_NODE(n)), ( \ static uint8_t gpio_nxp_s32_eirq_data_##n[] = { \ LISTIFY(DT_NUM_IRQS(DT_DRV_INST(n)), \ GPIO_NXP_S32_EIRQ_PIN_LINE, (,), n) \ @@ -533,7 +533,7 @@ static const struct gpio_driver_api gpio_nxp_s32_driver_api = { )) #define GPIO_NXP_S32_GET_EIRQ_INFO(n) \ - .eirq_info = UTIL_AND(DT_NODE_HAS_STATUS(GPIO_NXP_S32_EIRQ_NODE(n), okay),\ + .eirq_info = UTIL_AND(DT_NODE_HAS_STATUS_OKAY(GPIO_NXP_S32_EIRQ_NODE(n)),\ &gpio_nxp_s32_eirq_##n), #else #define GPIO_NXP_S32_SET_EIRQ_INFO(n) @@ -547,7 +547,7 @@ static const struct gpio_driver_api gpio_nxp_s32_driver_api = { BUILD_ASSERT((DT_INST_NODE_HAS_PROP(n, nxp_wkpu) == \ DT_INST_NODE_HAS_PROP(n, nxp_wkpu_interrupts)), \ "nxp,wkpu and nxp,wkpu-interrupts must be provided"); \ - IF_ENABLED(DT_NODE_HAS_STATUS(GPIO_NXP_S32_WKPU_NODE(n), okay), ( \ + IF_ENABLED(DT_NODE_HAS_STATUS_OKAY(GPIO_NXP_S32_WKPU_NODE(n)), ( \ static uint8_t gpio_nxp_s32_wkpu_data_##n[] = \ DT_INST_PROP(n, nxp_wkpu_interrupts); \ static struct gpio_nxp_s32_irq_config gpio_nxp_s32_wkpu_##n = { \ @@ -560,7 +560,7 @@ static const struct gpio_driver_api gpio_nxp_s32_driver_api = { )) #define GPIO_NXP_S32_GET_WKPU_INFO(n) \ - .wkpu_info = UTIL_AND(DT_NODE_HAS_STATUS(GPIO_NXP_S32_WKPU_NODE(n), okay),\ + .wkpu_info = UTIL_AND(DT_NODE_HAS_STATUS_OKAY(GPIO_NXP_S32_WKPU_NODE(n)),\ &gpio_nxp_s32_wkpu_##n) #else #define GPIO_NXP_S32_SET_WKPU_INFO(n) diff --git a/drivers/gpio/gpio_renesas_ra_ioport.c b/drivers/gpio/gpio_renesas_ra_ioport.c index 8005acab360..65fc946438a 100644 --- a/drivers/gpio/gpio_renesas_ra_ioport.c +++ b/drivers/gpio/gpio_renesas_ra_ioport.c @@ -176,7 +176,7 @@ static const struct gpio_driver_api gpio_ra_drv_api_funcs = { DT_REG_ADDR(DT_NODELABEL(ioport##suffix))) #define GPIO_DEVICE_INIT_RA_IF_OKAY(suffix) \ - COND_CODE_1(DT_NODE_HAS_STATUS(DT_NODELABEL(ioport##suffix), okay), \ + COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ioport##suffix)), \ (GPIO_DEVICE_INIT_RA(suffix)), \ ()) diff --git a/drivers/gpio/gpio_sam0.c b/drivers/gpio/gpio_sam0.c index 03cfab48e60..98234d3319d 100644 --- a/drivers/gpio/gpio_sam0.c +++ b/drivers/gpio/gpio_sam0.c @@ -286,7 +286,7 @@ static const struct gpio_driver_api gpio_sam0_api = { static int gpio_sam0_init(const struct device *dev) { return 0; } /* Port A */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(porta), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(porta)) static const struct gpio_sam0_config gpio_sam0_config_0 = { .common = { @@ -308,7 +308,7 @@ DEVICE_DT_DEFINE(DT_NODELABEL(porta), #endif /* Port B */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(portb), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(portb)) static const struct gpio_sam0_config gpio_sam0_config_1 = { .common = { @@ -330,7 +330,7 @@ DEVICE_DT_DEFINE(DT_NODELABEL(portb), #endif /* Port C */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(portc), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(portc)) static const struct gpio_sam0_config gpio_sam0_config_2 = { .common = { @@ -352,7 +352,7 @@ DEVICE_DT_DEFINE(DT_NODELABEL(portc), #endif /* Port D */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(portd), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(portd)) static const struct gpio_sam0_config gpio_sam0_config_3 = { .common = { diff --git a/drivers/gpio/gpio_stm32.c b/drivers/gpio/gpio_stm32.c index d077f54e64d..d341612aaac 100644 --- a/drivers/gpio/gpio_stm32.c +++ b/drivers/gpio/gpio_stm32.c @@ -702,7 +702,7 @@ static int gpio_stm32_init(const struct device *dev) } #if (defined(PWR_CR2_IOSV) || defined(PWR_SVMCR_IO2SV)) && \ - DT_NODE_HAS_STATUS(DT_NODELABEL(gpiog), okay) + DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpiog)) z_stm32_hsem_lock(CFG_HW_RCC_SEMID, HSEM_LOCK_DEFAULT_RETRY); /* Port G[15:2] requires external power supply */ /* Cf: L4/L5 RM, Chapter "Independent I/O supply rail" */ @@ -752,7 +752,7 @@ static int gpio_stm32_init(const struct device *dev) DT_CLOCKS_CELL(DT_NODELABEL(gpio##__suffix), bus)) #define GPIO_DEVICE_INIT_STM32_IF_OKAY(__suffix, __SUFFIX) \ - COND_CODE_1(DT_NODE_HAS_STATUS(DT_NODELABEL(gpio##__suffix), okay), \ + COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio##__suffix)), \ (GPIO_DEVICE_INIT_STM32(__suffix, __SUFFIX)), \ ()) diff --git a/drivers/gpio/gpio_xlnx_axi.c b/drivers/gpio/gpio_xlnx_axi.c index 4b50bf85cd6..3b1238310f9 100644 --- a/drivers/gpio/gpio_xlnx_axi.c +++ b/drivers/gpio/gpio_xlnx_axi.c @@ -382,7 +382,7 @@ static const struct gpio_driver_api gpio_xlnx_axi_driver_api = { #define GPIO_XLNX_AXI_GPIO2_HAS_COMPAT_STATUS_OKAY(n) \ UTIL_AND(DT_NODE_HAS_COMPAT(DT_INST_CHILD(n, gpio2), xlnx_xps_gpio_1_00_a_gpio2), \ - DT_NODE_HAS_STATUS(DT_INST_CHILD(n, gpio2), okay)) + DT_NODE_HAS_STATUS_OKAY(DT_INST_CHILD(n, gpio2))) #define GPIO_XLNX_AXI_GPIO2_COND_INIT(n) \ IF_ENABLED(UTIL_AND(DT_INST_PROP_OR(n, xlnx_is_dual, 1), \ diff --git a/drivers/i2c/i2c_esp32.c b/drivers/i2c/i2c_esp32.c index 3c138172209..07c8ea536ca 100644 --- a/drivers/i2c/i2c_esp32.c +++ b/drivers/i2c/i2c_esp32.c @@ -843,7 +843,7 @@ static int IRAM_ATTR i2c_esp32_init(const struct device *dev) &i2c_esp32_config_##idx, POST_KERNEL, CONFIG_I2C_INIT_PRIORITY, \ &i2c_esp32_driver_api); -#if DT_NODE_HAS_STATUS(I2C(0), okay) +#if DT_NODE_HAS_STATUS_OKAY(I2C(0)) #ifndef SOC_I2C_SUPPORT_HW_CLR_BUS #if !DT_NODE_HAS_PROP(I2C(0), sda_gpios) || !DT_NODE_HAS_PROP(I2C(0), scl_gpios) #error "Missing and properties to build for this target." @@ -854,9 +854,9 @@ static int IRAM_ATTR i2c_esp32_init(const struct device *dev) #endif #endif /* !SOC_I2C_SUPPORT_HW_CLR_BUS */ ESP32_I2C_INIT(0); -#endif /* DT_NODE_HAS_STATUS(I2C(0), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(I2C(0)) */ -#if DT_NODE_HAS_STATUS(I2C(1), okay) +#if DT_NODE_HAS_STATUS_OKAY(I2C(1)) #ifndef SOC_I2C_SUPPORT_HW_CLR_BUS #if !DT_NODE_HAS_PROP(I2C(1), sda_gpios) || !DT_NODE_HAS_PROP(I2C(1), scl_gpios) #error "Missing and properties to build for this target." @@ -867,4 +867,4 @@ ESP32_I2C_INIT(0); #endif #endif /* !SOC_I2C_SUPPORT_HW_CLR_BUS */ ESP32_I2C_INIT(1); -#endif /* DT_NODE_HAS_STATUS(I2C(1), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(I2C(1)) */ diff --git a/drivers/i2s/i2s_litex.c b/drivers/i2s/i2s_litex.c index e66eaed7972..6105804d8ce 100644 --- a/drivers/i2s/i2s_litex.c +++ b/drivers/i2s/i2s_litex.c @@ -634,9 +634,9 @@ static const struct i2s_driver_api i2s_litex_driver_api = { irq_enable(DT_IRQN(DT_NODELABEL(i2s_##dir))); \ } -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2s_rx), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(i2s_rx)) I2S_INIT(rx); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2s_tx), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(i2s_tx)) I2S_INIT(tx); #endif diff --git a/drivers/interrupt_controller/intc_mchp_ecia_xec.c b/drivers/interrupt_controller/intc_mchp_ecia_xec.c index f1fc0f8c28b..c4844643ccb 100644 --- a/drivers/interrupt_controller/intc_mchp_ecia_xec.c +++ b/drivers/interrupt_controller/intc_mchp_ecia_xec.c @@ -445,7 +445,7 @@ int mchp_ecia_info_unset_callback(int ecia_info) * Leaving a node disabled also allows another driver/application to take over * aggregation by managing the GIRQ itself. */ -#define XEC_CHK_REQ_AGGR(n) DT_NODE_HAS_STATUS(n, okay) | +#define XEC_CHK_REQ_AGGR(n) DT_NODE_HAS_STATUS_OKAY(n) | #define XEC_ECIA_REQUIRE_AGGR_ISR \ ( \ diff --git a/drivers/led_strip/lpd880x.c b/drivers/led_strip/lpd880x.c index 991e2e3fb57..d4b56509db1 100644 --- a/drivers/led_strip/lpd880x.c +++ b/drivers/led_strip/lpd880x.c @@ -9,7 +9,7 @@ #include #include -#if DT_NODE_HAS_STATUS(DT_INST(0, greeled_lpd8806), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_INST(0, greeled_lpd8806)) #define DT_DRV_COMPAT greeled_lpd8806 #else #define DT_DRV_COMPAT greeled_lpd8803 diff --git a/drivers/lora/shell.c b/drivers/lora/shell.c index 692446b06cf..7d3775c9d5c 100644 --- a/drivers/lora/shell.c +++ b/drivers/lora/shell.c @@ -13,7 +13,7 @@ LOG_MODULE_REGISTER(lora_shell, CONFIG_LORA_LOG_LEVEL); #define DEFAULT_RADIO_NODE DT_ALIAS(lora0) -BUILD_ASSERT(DT_NODE_HAS_STATUS(DEFAULT_RADIO_NODE, okay), +BUILD_ASSERT(DT_NODE_HAS_STATUS_OKAY(DEFAULT_RADIO_NODE), "No default LoRa radio specified in DT"); static struct lora_modem_config modem_config = { diff --git a/drivers/memc/memc_nxp_s32_qspi.c b/drivers/memc/memc_nxp_s32_qspi.c index f588a0bd9af..e1d5c60bd67 100644 --- a/drivers/memc/memc_nxp_s32_qspi.c +++ b/drivers/memc/memc_nxp_s32_qspi.c @@ -139,7 +139,7 @@ uint8_t memc_nxp_s32_qspi_get_instance(const struct device *dev) #define QSPI_PORT_SIZE_FN(node_id, side_upper, port) \ COND_CODE_1(IS_EQ(DT_REG_ADDR(node_id), QSPI_PCSF##side_upper##port), \ - (COND_CODE_1(DT_NODE_HAS_STATUS(node_id, okay), \ + (COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(node_id), \ (.memSize##side_upper##port = DT_PROP(node_id, size) / 8,), \ (.memSize##side_upper##port = 0,))), \ (EMPTY)) diff --git a/drivers/pinctrl/pinctrl_esp32.c b/drivers/pinctrl/pinctrl_esp32.c index 89c1ba43b41..4ed39229d56 100644 --- a/drivers/pinctrl/pinctrl_esp32.c +++ b/drivers/pinctrl/pinctrl_esp32.c @@ -254,7 +254,7 @@ static int esp32_pin_configure(const uint32_t pin_mux, const uint32_t pin_cfg) gpio_dev_t *const gpio_dev = (gpio_dev_t *)DT_REG_ADDR(DT_NODELABEL(gpio0)); gpio_dev->out_w1ts = BIT(pin_num); -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1)) } else { gpio_dev_t *const gpio_dev = (gpio_dev_t *)DT_REG_ADDR(DT_NODELABEL(gpio1)); @@ -268,7 +268,7 @@ static int esp32_pin_configure(const uint32_t pin_mux, const uint32_t pin_cfg) gpio_dev_t *const gpio_dev = (gpio_dev_t *)DT_REG_ADDR(DT_NODELABEL(gpio0)); gpio_dev->out_w1tc = BIT(pin_num); -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1)) } else { gpio_dev_t *const gpio_dev = (gpio_dev_t *)DT_REG_ADDR(DT_NODELABEL(gpio1)); diff --git a/drivers/pinctrl/pinctrl_ite_it8xxx2.c b/drivers/pinctrl/pinctrl_ite_it8xxx2.c index 91ca93ea293..422f8c6c67f 100644 --- a/drivers/pinctrl/pinctrl_ite_it8xxx2.c +++ b/drivers/pinctrl/pinctrl_ite_it8xxx2.c @@ -366,7 +366,7 @@ static int pinctrl_it8xxx2_init(const struct device *dev) gpio_base->GPIO_GCR &= ~IT8XXX2_GPIO_LPCRSTEN; #ifdef CONFIG_SOC_IT8XXX2_REG_SET_V2 -#if defined(CONFIG_I2C_ITE_ENHANCE) && DT_NODE_HAS_STATUS(DT_NODELABEL(i2c5), okay) +#if defined(CONFIG_I2C_ITE_ENHANCE) && DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(i2c5)) const struct gpio_dt_spec scl_gpios = GPIO_DT_SPEC_GET(DT_NODELABEL(i2c5), scl_gpios); const struct gpio_dt_spec sda_gpios = GPIO_DT_SPEC_GET(DT_NODELABEL(i2c5), sda_gpios); diff --git a/drivers/pinctrl/pinctrl_kinetis.c b/drivers/pinctrl/pinctrl_kinetis.c index 7a8151c7be1..bc250d742cf 100644 --- a/drivers/pinctrl/pinctrl_kinetis.c +++ b/drivers/pinctrl/pinctrl_kinetis.c @@ -75,7 +75,7 @@ static int pinctrl_mcux_init(const struct device *dev) return 0; } -#if DT_NODE_HAS_STATUS(DT_INST(0, nxp_kinetis_sim), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nxp_kinetis_sim)) #define PINCTRL_MCUX_DT_INST_CLOCK_SUBSYS(n) \ CLK_GATE_DEFINE(DT_INST_CLOCKS_CELL(n, offset), DT_INST_CLOCKS_CELL(n, bits)) #elif DT_HAS_COMPAT_STATUS_OKAY(nxp_scg_k4) diff --git a/drivers/rtc/rtc_smartbond.c b/drivers/rtc/rtc_smartbond.c index 7aa0d461d27..3d171e58f69 100644 --- a/drivers/rtc/rtc_smartbond.c +++ b/drivers/rtc/rtc_smartbond.c @@ -626,7 +626,7 @@ static int rtc_smartbond_init(const struct device *dev) /* Wakeup device from RTC events (alarm/roll over) */ #if CONFIG_PM - bool is_xtal32m_enabled = DT_NODE_HAS_STATUS(DT_NODELABEL(xtal32m), okay); + bool is_xtal32m_enabled = DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(xtal32m)); int pdc_idx = da1469x_pdc_add(MCU_PDC_TRIGGER_RTC_ALARM, MCU_PDC_MASTER_M33, is_xtal32m_enabled ? MCU_PDC_EN_XTAL : 0); diff --git a/drivers/sensor/bosch/bmi08x/bmi08x.h b/drivers/sensor/bosch/bmi08x/bmi08x.h index 6b8b33f8ec7..83926126e48 100644 --- a/drivers/sensor/bosch/bmi08x/bmi08x.h +++ b/drivers/sensor/bosch/bmi08x/bmi08x.h @@ -427,7 +427,7 @@ enum bmi08x_odr { #define BMI08X_GYR_SCALE(range_dps) ((2 * range_dps * SENSOR_PI) / 180LL / 65536LL) /* report of data sync is selected */ -#define BMI08X_ACCEL_DATA_SYNC_EN(inst) DT_NODE_HAS_STATUS(DT_INST_PHANDLE(inst, data_sync), okay) +#define BMI08X_ACCEL_DATA_SYNC_EN(inst) DT_NODE_HAS_STATUS_OKAY(DT_INST_PHANDLE(inst, data_sync)) /* Macro used for compile time optimization to compile in/out code used for data-sync * if at least 1 bmi08x has data-sync enabled */ diff --git a/drivers/sensor/st/stm32_temp/stm32_temp.c b/drivers/sensor/st/stm32_temp/stm32_temp.c index 0c9e90b2d18..76e502bcfae 100644 --- a/drivers/sensor/st/stm32_temp/stm32_temp.c +++ b/drivers/sensor/st/stm32_temp/stm32_temp.c @@ -287,7 +287,7 @@ static int stm32_temp_init(const struct device *dev) * this driver even if the ADC used for measurement is disabled. In such cases, * fail build with an explicit error message. */ -#if !DT_NODE_HAS_STATUS(DT_INST_IO_CHANNELS_CTLR(0), okay) +#if !DT_NODE_HAS_STATUS_OKAY(DT_INST_IO_CHANNELS_CTLR(0)) /* Use BUILD_ASSERT to get preprocessing on the message */ BUILD_ASSERT(0, "ADC '" DT_NODE_FULL_NAME(DT_INST_IO_CHANNELS_CTLR(0)) "' needed by " @@ -334,4 +334,4 @@ SENSOR_DEVICE_DT_INST_DEFINE(0, stm32_temp_init, NULL, POST_KERNEL, CONFIG_SENSOR_INIT_PRIORITY, &stm32_temp_driver_api); -#endif /* !DT_NODE_HAS_STATUS(DT_INST_IO_CHANNELS_CTLR(0), okay) */ +#endif /* !DT_NODE_HAS_STATUS_OKAY(DT_INST_IO_CHANNELS_CTLR(0)) */ diff --git a/drivers/sensor/st/stm32_vbat/stm32_vbat.c b/drivers/sensor/st/stm32_vbat/stm32_vbat.c index b74e0cf8b7f..98bebad37fa 100644 --- a/drivers/sensor/st/stm32_vbat/stm32_vbat.c +++ b/drivers/sensor/st/stm32_vbat/stm32_vbat.c @@ -125,7 +125,7 @@ static int stm32_vbat_init(const struct device *dev) } #define ASSERT_VBAT_ADC_ENABLED(inst) \ - BUILD_ASSERT(DT_NODE_HAS_STATUS(DT_INST_IO_CHANNELS_CTLR(inst), okay), \ + BUILD_ASSERT(DT_NODE_HAS_STATUS_OKAY(DT_INST_IO_CHANNELS_CTLR(inst)), \ "ADC instance '" DT_NODE_FULL_NAME(DT_INST_IO_CHANNELS_CTLR(inst)) "' needed " \ "by Vbat sensor '" DT_NODE_FULL_NAME(DT_DRV_INST(inst)) "' is not enabled") diff --git a/drivers/sensor/st/stm32_vref/stm32_vref.c b/drivers/sensor/st/stm32_vref/stm32_vref.c index b2cf7222fad..b76c2ea0e6e 100644 --- a/drivers/sensor/st/stm32_vref/stm32_vref.c +++ b/drivers/sensor/st/stm32_vref/stm32_vref.c @@ -154,7 +154,7 @@ static int stm32_vref_init(const struct device *dev) * possible to compile this driver even if the ADC used for measurement is * disabled. In such cases, fail build with an explicit error message. */ -#if !DT_NODE_HAS_STATUS(DT_INST_IO_CHANNELS_CTLR(0), okay) +#if !DT_NODE_HAS_STATUS_OKAY(DT_INST_IO_CHANNELS_CTLR(0)) /* Use BUILD_ASSERT to get preprocessing on the message */ BUILD_ASSERT(0, "ADC '" DT_NODE_FULL_NAME(DT_INST_IO_CHANNELS_CTLR(0)) "' needed by " @@ -183,4 +183,4 @@ static const struct stm32_vref_config stm32_vref_dev_config = { SENSOR_DEVICE_DT_INST_DEFINE(0, stm32_vref_init, NULL, &stm32_vref_dev_data, &stm32_vref_dev_config, POST_KERNEL, CONFIG_SENSOR_INIT_PRIORITY, &stm32_vref_driver_api); -#endif /* !DT_NODE_HAS_STATUS(DT_INST_IO_CHANNELS_CTLR(0), okay) */ +#endif /* !DT_NODE_HAS_STATUS_OKAY(DT_INST_IO_CHANNELS_CTLR(0)) */ diff --git a/drivers/serial/leuart_gecko.c b/drivers/serial/leuart_gecko.c index daaff59069c..9eec982802c 100644 --- a/drivers/serial/leuart_gecko.c +++ b/drivers/serial/leuart_gecko.c @@ -317,7 +317,7 @@ static const struct uart_driver_api leuart_gecko_driver_api = { #endif }; -#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0)) #define PIN_LEUART_0_RXD {DT_INST_PROP_BY_IDX(0, location_rx, 1), \ DT_INST_PROP_BY_IDX(0, location_rx, 2), gpioModeInput, 1} @@ -368,9 +368,9 @@ static void leuart_gecko_config_func_0(const struct device *dev) } #endif -#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0)) */ -#if DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(1)) #define PIN_LEUART_1_RXD {DT_INST_PROP_BY_IDX(1, location_rx, 1), \ DT_INST_PROP_BY_IDX(1, location_rx, 2), gpioModeInput, 1} @@ -421,4 +421,4 @@ static void leuart_gecko_config_func_1(const struct device *dev) } #endif -#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(1)) */ diff --git a/drivers/serial/uart_cmsdk_apb.c b/drivers/serial/uart_cmsdk_apb.c index a6568133b72..e4ceb883bd6 100644 --- a/drivers/serial/uart_cmsdk_apb.c +++ b/drivers/serial/uart_cmsdk_apb.c @@ -475,7 +475,7 @@ static const struct uart_driver_api uart_cmsdk_apb_driver_api = { #endif /* CONFIG_UART_INTERRUPT_DRIVEN */ }; -#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0)) #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void uart_cmsdk_apb_irq_config_func_0(const struct device *dev); @@ -538,9 +538,9 @@ static void uart_cmsdk_apb_irq_config_func_0(const struct device *dev) #endif #endif -#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0)) */ -#if DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(1)) #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void uart_cmsdk_apb_irq_config_func_1(const struct device *dev); @@ -603,9 +603,9 @@ static void uart_cmsdk_apb_irq_config_func_1(const struct device *dev) #endif #endif -#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(1), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(1)) */ -#if DT_NODE_HAS_STATUS(DT_DRV_INST(2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(2)) #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void uart_cmsdk_apb_irq_config_func_2(const struct device *dev); @@ -668,9 +668,9 @@ static void uart_cmsdk_apb_irq_config_func_2(const struct device *dev) #endif #endif -#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(2), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(2)) */ -#if DT_NODE_HAS_STATUS(DT_DRV_INST(3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(3)) #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void uart_cmsdk_apb_irq_config_func_3(const struct device *dev); @@ -733,9 +733,9 @@ static void uart_cmsdk_apb_irq_config_func_3(const struct device *dev) #endif #endif -#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(3), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(3)) */ -#if DT_NODE_HAS_STATUS(DT_DRV_INST(4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(4)) #ifdef CONFIG_UART_INTERRUPT_DRIVEN static void uart_cmsdk_apb_irq_config_func_4(const struct device *dev); @@ -798,4 +798,4 @@ static void uart_cmsdk_apb_irq_config_func_4(const struct device *dev) #endif #endif -#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(4), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(4)) */ diff --git a/drivers/serial/uart_lpc11u6x.c b/drivers/serial/uart_lpc11u6x.c index 5645fb7910b..3a13850429f 100644 --- a/drivers/serial/uart_lpc11u6x.c +++ b/drivers/serial/uart_lpc11u6x.c @@ -13,7 +13,7 @@ #include "uart_lpc11u6x.h" -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart0)) static int lpc11u6x_uart0_poll_in(const struct device *dev, unsigned char *c) { const struct lpc11u6x_uart0_config *cfg = dev->config; @@ -443,12 +443,12 @@ static void lpc11u6x_uart0_isr_config(const struct device *dev) } #endif /* CONFIG_UART_INTERRUPT_DRIVEN */ -#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart0), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart0)) */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) || \ - DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) || \ - DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay) || \ - DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) || \ + DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) || \ + DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3)) || \ + DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart4)) static int lpc11u6x_uartx_poll_in(const struct device *dev, unsigned char *c) { @@ -810,18 +810,18 @@ static int lpc11u6x_uartx_init(const struct device *dev) LPC11U6X_UARTX_CFG_ENABLE; #ifdef CONFIG_UART_INTERRUPT_DRIVEN -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) || \ - DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) || \ + DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart4)) lpc11u6x_uartx_isr_config_1(dev); -#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) || - * DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay) +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) || + * DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart4)) */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) || \ - DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) || \ + DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3)) lpc11u6x_uartx_isr_config_2(dev); -#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) || - * DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay) +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) || + * DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3)) */ #endif /* CONFIG_UART_INTERRUPT_DRIVEN */ return 0; @@ -876,44 +876,44 @@ DEVICE_DT_DEFINE(DT_NODELABEL(uart##idx), \ PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, \ &uartx_api) -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) LPC11U6X_UARTX_INIT(1); -#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) LPC11U6X_UARTX_INIT(2); -#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3)) LPC11U6X_UARTX_INIT(3); -#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3)) */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart4)) LPC11U6X_UARTX_INIT(4); -#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart4)) */ #if CONFIG_UART_INTERRUPT_DRIVEN && \ - (DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) || \ - DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay)) + (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) || \ + DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart4))) struct lpc11u6x_uartx_shared_irq lpc11u6x_uartx_shared_irq_info_1 = { .devices = { -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) DEVICE_DT_GET(DT_NODELABEL(uart1)), #else NULL, -#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay) +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) */ +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart4)) DEVICE_DT_GET(DT_NODELABEL(uart4)), #else NULL, -#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart4)) */ }, }; static void lpc11u6x_uartx_isr_config_1(const struct device *dev) { -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) IRQ_CONNECT(DT_IRQN(DT_NODELABEL(uart1)), DT_IRQ(DT_NODELABEL(uart1), priority), lpc11u6x_uartx_shared_isr, @@ -927,34 +927,34 @@ static void lpc11u6x_uartx_isr_config_1(const struct device *dev) &lpc11u6x_uartx_shared_irq_info_1, 0); irq_enable(DT_IRQN(DT_NODELABEL(uart4))); -#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) */ } #endif /* CONFIG_UART_INTERRUPT_DRIVEN && - * (DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) || - * DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay)) + * (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) || + * DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart4))) */ #if CONFIG_UART_INTERRUPT_DRIVEN && \ - (DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) || \ - DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay)) + (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) || \ + DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3))) struct lpc11u6x_uartx_shared_irq lpc11u6x_uartx_shared_irq_info_2 = { .devices = { -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) DEVICE_DT_GET(DT_NODELABEL(uart2)), #else NULL, -#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay) +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) */ +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3)) DEVICE_DT_GET(DT_NODELABEL(uart3)), #else NULL, -#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3)) */ }, }; static void lpc11u6x_uartx_isr_config_2(const struct device *dev) { -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) IRQ_CONNECT(DT_IRQN(DT_NODELABEL(uart2)), DT_IRQ(DT_NODELABEL(uart2), priority), lpc11u6x_uartx_shared_isr, @@ -968,11 +968,11 @@ static void lpc11u6x_uartx_isr_config_2(const struct device *dev) &lpc11u6x_uartx_shared_irq_info_2, 0); irq_enable(DT_IRQN(DT_NODELABEL(uart3))); -#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) */ } #endif /* CONFIG_UART_INTERRUPT_DRIVEN && - * (DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) || - * DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay)) + * (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) || + * DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3))) */ #endif /* DT_NODE_EXISTS(DT_NODELABEL(uart1) || * DT_NODE_EXISTS(DT_NODELABEL(uart2) || diff --git a/drivers/serial/uart_lpc11u6x.h b/drivers/serial/uart_lpc11u6x.h index 8951945e65a..257846cbdd4 100644 --- a/drivers/serial/uart_lpc11u6x.h +++ b/drivers/serial/uart_lpc11u6x.h @@ -199,20 +199,20 @@ struct lpc11u6x_uartx_shared_irq { }; #if CONFIG_UART_INTERRUPT_DRIVEN && \ - (DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) || \ - DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay)) + (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) || \ + DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart4))) static void lpc11u6x_uartx_isr_config_1(const struct device *dev); #endif /* CONFIG_UART_INTERRUPT_DRIVEN && - * (DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) || - * DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay)) + * (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) || + * DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3))) */ #if CONFIG_UART_INTERRUPT_DRIVEN && \ - (DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) || \ - DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay)) + (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) || \ + DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3))) static void lpc11u6x_uartx_isr_config_2(const struct device *dev); #endif /* CONFIG_UART_INTERRUPT_DRIVEN && - * (DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) || - * DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay)) + * (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) || + * DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3))) */ #endif /* ZEPHYR_DRIVERS_SERIAL_UART_LPC11U6X_H_ */ diff --git a/drivers/serial/uart_miv.c b/drivers/serial/uart_miv.c index bf35b4cf656..d1b5cfb0e26 100644 --- a/drivers/serial/uart_miv.c +++ b/drivers/serial/uart_miv.c @@ -387,7 +387,7 @@ static const struct uart_driver_api uart_miv_driver_api = { BUILD_ASSERT(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT) <= 1, "unsupported uart_miv instance"); -#if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0)) static struct uart_miv_data uart_miv_data_0; @@ -424,4 +424,4 @@ static void uart_miv_irq_cfg_func_0(const struct device *dev) } #endif -#endif /* DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_DRV_INST(0)) */ diff --git a/drivers/spi/spi_smartbond.c b/drivers/spi/spi_smartbond.c index 324273bc12e..7a2be279e98 100644 --- a/drivers/spi/spi_smartbond.c +++ b/drivers/spi/spi_smartbond.c @@ -1227,11 +1227,11 @@ static int spi_smartbond_isr_connect(const struct device *dev) switch ((uint32_t)cfg->regs) { case (uint32_t)SPI: - COND_CODE_1(DT_NODE_HAS_STATUS(DT_NODELABEL(spi), okay), + COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(spi)), (SPI_SMARTBOND_ISR_CONNECT), (NULL)); break; case (uint32_t)SPI2: - COND_CODE_1(DT_NODE_HAS_STATUS(DT_NODELABEL(spi2), okay), + COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(spi2)), (SPI2_SMARTBOND_ISR_CONNECT), (NULL)); break; default: diff --git a/drivers/spi/spi_xec_qmspi.c b/drivers/spi/spi_xec_qmspi.c index f606f3145c3..02cd34d259f 100644 --- a/drivers/spi/spi_xec_qmspi.c +++ b/drivers/spi/spi_xec_qmspi.c @@ -681,7 +681,7 @@ static const struct spi_driver_api spi_qmspi_driver_api = { DT_INST_PROP(0, dldh), \ DT_INST_PROP(0, dcsda)) -#if DT_NODE_HAS_STATUS(DT_INST(0, microchip_xec_qmspi), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_INST(0, microchip_xec_qmspi)) PINCTRL_DT_INST_DEFINE(0); @@ -708,4 +708,4 @@ DEVICE_DT_INST_DEFINE(0, &spi_qmspi_0_config, POST_KERNEL, CONFIG_SPI_INIT_PRIORITY, &spi_qmspi_driver_api); -#endif /* DT_NODE_HAS_STATUS(DT_INST(0, microchip_xec_qmspi), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_INST(0, microchip_xec_qmspi)) */ diff --git a/drivers/timer/mcux_os_timer.c b/drivers/timer/mcux_os_timer.c index 74580e684b0..c6eb776e43a 100644 --- a/drivers/timer/mcux_os_timer.c +++ b/drivers/timer/mcux_os_timer.c @@ -36,7 +36,7 @@ static OSTIMER_Type *base; * certain deep sleep modes and the time elapsed when it is powered off. */ static uint64_t cyc_sys_compensated; -#if DT_NODE_HAS_STATUS(DT_NODELABEL(standby), okay) && CONFIG_PM +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(standby)) && CONFIG_PM static const struct device *counter_dev; #endif @@ -71,7 +71,7 @@ void mcux_lpc_ostick_isr(const void *arg) sys_clock_announce(IS_ENABLED(CONFIG_TICKLESS_KERNEL) ? dticks : 1); } -#if DT_NODE_HAS_STATUS(DT_NODELABEL(standby), okay) && CONFIG_PM +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(standby)) && CONFIG_PM /* The OS Timer is disabled in certain low power modes and cannot wakeup the system * on timeout. This function will be called by the low power code to allow the @@ -178,7 +178,7 @@ void sys_clock_set_timeout(int32_t ticks, bool idle) return; } -#if DT_NODE_HAS_STATUS(DT_NODELABEL(standby), okay) && CONFIG_PM +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(standby)) && CONFIG_PM if (idle) { /* OS Timer may not be able to wakeup in certain low power modes. * For these cases, we start a counter that can wakeup @@ -247,7 +247,7 @@ uint64_t sys_clock_cycle_get_64(void) void sys_clock_idle_exit(void) { -#if DT_NODE_HAS_STATUS(DT_NODELABEL(standby), okay) && CONFIG_PM +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(standby)) && CONFIG_PM /* The tick should be compensated for states where the * OS Timer is disabled */ @@ -280,7 +280,7 @@ static int sys_clock_driver_init(void) irq_enable(DT_INST_IRQN(0)); /* On some SoC's, OS Timer cannot wakeup from low power mode in standby modes */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(standby), okay) && CONFIG_PM +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(standby)) && CONFIG_PM counter_dev = DEVICE_DT_GET_OR_NULL(DT_INST_PHANDLE(0, deep_sleep_counter)); #endif diff --git a/drivers/timer/nrf_grtc_timer.c b/drivers/timer/nrf_grtc_timer.c index 187c7e12326..401fdd26821 100644 --- a/drivers/timer/nrf_grtc_timer.c +++ b/drivers/timer/nrf_grtc_timer.c @@ -426,7 +426,7 @@ int z_nrf_grtc_wakeup_prepare(uint64_t wake_time_us) nrfy_grtc_timeout_get(NRF_GRTC) * CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC / 32768 + MAX_CC_LATCH_WAIT_TIME_US; k_busy_wait(wait_time); -#if DT_NODE_HAS_STATUS(DT_NODELABEL(lfxo), okay) && NRF_GRTC_HAS_CLKSEL +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lfxo)) && NRF_GRTC_HAS_CLKSEL nrfx_grtc_clock_source_set(NRF_GRTC_CLKSEL_LFXO); #endif k_spin_unlock(&lock, key); @@ -508,7 +508,7 @@ static int sys_clock_driver_init(void) #endif #if defined(CONFIG_NRF_GRTC_TIMER_CLOCK_MANAGEMENT) && \ - DT_NODE_HAS_STATUS(DT_NODELABEL(lfxo), okay) && NRF_GRTC_HAS_CLKSEL + DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lfxo)) && NRF_GRTC_HAS_CLKSEL /* Switch to LFXO as the low-frequency clock source. */ nrfx_grtc_clock_source_set(NRF_GRTC_CLKSEL_LFXO); #endif diff --git a/drivers/timer/smartbond_timer.c b/drivers/timer/smartbond_timer.c index ceef22ce5fa..afa86617e0e 100644 --- a/drivers/timer/smartbond_timer.c +++ b/drivers/timer/smartbond_timer.c @@ -199,7 +199,7 @@ static int sys_clock_driver_init(void) uint8_t pdc_idx; uint8_t en_xtal; - en_xtal = DT_NODE_HAS_STATUS(DT_NODELABEL(xtal32m), okay) ? MCU_PDC_EN_XTAL : 0; + en_xtal = DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(xtal32m)) ? MCU_PDC_EN_XTAL : 0; /* Enable wakeup by TIMER2 */ pdc_idx = da1469x_pdc_add(MCU_PDC_TRIGGER_TIMER2, MCU_PDC_MASTER_M33, en_xtal); diff --git a/drivers/usb/device/usb_dc_mcux.c b/drivers/usb/device/usb_dc_mcux.c index b28499db1d6..14a8918d106 100644 --- a/drivers/usb/device/usb_dc_mcux.c +++ b/drivers/usb/device/usb_dc_mcux.c @@ -84,17 +84,17 @@ BUILD_ASSERT(NUM_INSTS <= 1, "Only one USB device supported"); #elif defined(CONFIG_SOC_LPC55S36) #define CONTROLLER_ID kUSB_ControllerLpcIp3511Fs0 #elif defined(CONFIG_SOC_LPC55S69_CPU0) || defined(CONFIG_SOC_LPC55S69_CPU1) -#if DT_NODE_HAS_STATUS(DT_NODELABEL(usbhs), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usbhs)) #define CONTROLLER_ID kUSB_ControllerLpcIp3511Hs0 -#elif DT_NODE_HAS_STATUS(DT_NODELABEL(usbfs), okay) +#elif DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usbfs)) #define CONTROLLER_ID kUSB_ControllerLpcIp3511Fs0 #endif /* LPC55s69 */ #elif defined(CONFIG_SOC_SERIES_IMXRT11XX) || \ defined(CONFIG_SOC_SERIES_IMXRT10XX) || \ defined(CONFIG_SOC_SERIES_MCXN) -#if DT_NODE_HAS_STATUS(DT_NODELABEL(usb1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usb1)) #define CONTROLLER_ID kUSB_ControllerEhci0 -#elif DT_NODE_HAS_STATUS(DT_NODELABEL(usb2), okay) +#elif DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usb2)) #define CONTROLLER_ID kUSB_ControllerEhci1 #endif /* IMX RT */ #elif defined(CONFIG_SOC_SERIES_RW6XX) diff --git a/drivers/usb/device/usb_dc_nrfx.c b/drivers/usb/device/usb_dc_nrfx.c index a165c24f789..c8442cb8f64 100644 --- a/drivers/usb/device/usb_dc_nrfx.c +++ b/drivers/usb/device/usb_dc_nrfx.c @@ -1900,8 +1900,8 @@ static int usb_init(void) == NRF5X_REG_MODE_DCDC), #if NRFX_POWER_SUPPORTS_DCDCEN_VDDH .dcdcenhv = COND_CODE_1(CONFIG_SOC_SERIES_NRF52X, - (DT_NODE_HAS_STATUS(DT_INST(0, nordic_nrf52x_regulator_hv), okay)), - (DT_NODE_HAS_STATUS(DT_INST(0, nordic_nrf53x_regulator_hv), okay))), + (DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nordic_nrf52x_regulator_hv))), + (DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nordic_nrf53x_regulator_hv)))), #endif }; diff --git a/drivers/usb/udc/udc_nrf.c b/drivers/usb/udc/udc_nrf.c index c6951074c85..c024d2a6a18 100644 --- a/drivers/usb/udc/udc_nrf.c +++ b/drivers/usb/udc/udc_nrf.c @@ -824,8 +824,8 @@ static const struct udc_nrf_config udc_nrf_cfg = { == NRF5X_REG_MODE_DCDC), #if NRFX_POWER_SUPPORTS_DCDCEN_VDDH .dcdcenhv = COND_CODE_1(CONFIG_SOC_SERIES_NRF52X, - (DT_NODE_HAS_STATUS(DT_INST(0, nordic_nrf52x_regulator_hv), okay)), - (DT_NODE_HAS_STATUS(DT_INST(0, nordic_nrf53x_regulator_hv), okay))), + (DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nordic_nrf52x_regulator_hv))), + (DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nordic_nrf53x_regulator_hv)))), #endif }, diff --git a/drivers/watchdog/wdt_esp32.c b/drivers/watchdog/wdt_esp32.c index 8fe4c877fd0..1c7ee61ee64 100644 --- a/drivers/watchdog/wdt_esp32.c +++ b/drivers/watchdog/wdt_esp32.c @@ -226,10 +226,10 @@ static void wdt_esp32_isr(void *arg) } -#if DT_NODE_HAS_STATUS(DT_NODELABEL(wdt0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(wdt0)) ESP32_WDT_INIT(0); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(wdt1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(wdt1)) ESP32_WDT_INIT(1); #endif diff --git a/include/zephyr/device.h b/include/zephyr/device.h index 8328ace40e9..fccfa6e6d09 100644 --- a/include/zephyr/device.h +++ b/include/zephyr/device.h @@ -318,7 +318,7 @@ typedef int16_t device_handle_t; * @return a @ref device reference for the node identifier, which may be `NULL`. */ #define DEVICE_DT_GET_OR_NULL(node_id) \ - COND_CODE_1(DT_NODE_HAS_STATUS(node_id, okay), \ + COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(node_id), \ (DEVICE_DT_GET(node_id)), (NULL)) /** diff --git a/include/zephyr/drivers/clock_control/stm32_clock_control.h b/include/zephyr/drivers/clock_control/stm32_clock_control.h index c33714be976..b03fa790027 100644 --- a/include/zephyr/drivers/clock_control/stm32_clock_control.h +++ b/include/zephyr/drivers/clock_control/stm32_clock_control.h @@ -250,7 +250,7 @@ #endif /** PLL/PLL1 clock source */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pll), okay) && \ +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pll)) && \ DT_NODE_HAS_PROP(DT_NODELABEL(pll), clocks) #define DT_PLL_CLOCKS_CTRL DT_CLOCKS_CTLR(DT_NODELABEL(pll)) #if DT_SAME_NODE(DT_PLL_CLOCKS_CTRL, DT_NODELABEL(clk_msi)) @@ -275,7 +275,7 @@ #endif /** PLL2 clock source */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pll2), okay) && \ +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pll2)) && \ DT_NODE_HAS_PROP(DT_NODELABEL(pll2), clocks) #define DT_PLL2_CLOCKS_CTRL DT_CLOCKS_CTLR(DT_NODELABEL(pll2)) #if DT_SAME_NODE(DT_PLL2_CLOCKS_CTRL, DT_NODELABEL(clk_msis)) @@ -291,7 +291,7 @@ #endif /** PLL3 clock source */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pll3), okay) && \ +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pll3)) && \ DT_NODE_HAS_PROP(DT_NODELABEL(pll3), clocks) #define DT_PLL3_CLOCKS_CTRL DT_CLOCKS_CTLR(DT_NODELABEL(pll3)) #if DT_SAME_NODE(DT_PLL3_CLOCKS_CTRL, DT_NODELABEL(clk_msis)) diff --git a/include/zephyr/drivers/emul.h b/include/zephyr/drivers/emul.h index c0830bb0205..a20679573e4 100644 --- a/include/zephyr/drivers/emul.h +++ b/include/zephyr/drivers/emul.h @@ -195,7 +195,7 @@ struct emul { * @return a @ref emul reference for the node identifier, which may be `NULL`. */ #define EMUL_DT_GET_OR_NULL(node_id) \ - COND_CODE_1(DT_NODE_HAS_STATUS(node_id, okay), (EMUL_DT_GET(node_id)), (NULL)) + COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(node_id), (EMUL_DT_GET(node_id)), (NULL)) /** * @brief Set up a list of emulators diff --git a/include/zephyr/linker/linker-defs.h b/include/zephyr/linker/linker-defs.h index 5c1089c0fcf..ff3cbe6ca6c 100644 --- a/include/zephyr/linker/linker-defs.h +++ b/include/zephyr/linker/linker-defs.h @@ -32,6 +32,7 @@ */ #ifdef ZTEST_UNITTEST #define DT_NODE_HAS_STATUS(node, status) 0 +#define DT_NODE_HAS_STATUS_OKAY(node) 0 #else #include #endif @@ -159,7 +160,7 @@ extern char __gcov_bss_size[]; /* end address of image, used by newlib for the heap */ extern char _end[]; -#if (DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_ccm), okay)) +#if (DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_ccm))) extern char __ccm_data_rom_start[]; extern char __ccm_start[]; extern char __ccm_data_start[]; @@ -171,14 +172,14 @@ extern char __ccm_noinit_end[]; extern char __ccm_end[]; #endif -#if (DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_itcm), okay)) +#if (DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_itcm))) extern char __itcm_start[]; extern char __itcm_end[]; extern char __itcm_size[]; extern char __itcm_load_start[]; #endif -#if (DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay)) +#if (DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm))) extern char __dtcm_data_start[]; extern char __dtcm_data_end[]; extern char __dtcm_bss_start[]; @@ -190,7 +191,7 @@ extern char __dtcm_start[]; extern char __dtcm_end[]; #endif -#if (DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_ocm), okay)) +#if (DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_ocm))) extern char __ocm_data_start[]; extern char __ocm_data_end[]; extern char __ocm_bss_start[]; diff --git a/include/zephyr/pm/state.h b/include/zephyr/pm/state.h index 87363ea27d2..6590b90c385 100644 --- a/include/zephyr/pm/state.h +++ b/include/zephyr/pm/state.h @@ -194,7 +194,7 @@ struct pm_state_constraint { * @param idx Index within the array. */ #define Z_DT_PHANDLE_01(node_id, prop, idx) \ - COND_CODE_1(DT_NODE_HAS_STATUS(DT_PHANDLE_BY_IDX(node_id, prop, idx), okay), \ + COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(DT_PHANDLE_BY_IDX(node_id, prop, idx)), \ (1), (0)) /** @@ -207,7 +207,7 @@ struct pm_state_constraint { * @param node_id A node identifier with compatible zephyr,power-state */ #define Z_PM_STATE_INFO_FROM_DT_CPU(i, node_id) \ - COND_CODE_1(DT_NODE_HAS_STATUS(DT_PHANDLE_BY_IDX(node_id, cpu_power_states, i), okay), \ + COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(DT_PHANDLE_BY_IDX(node_id, cpu_power_states, i)), \ (PM_STATE_INFO_DT_INIT(DT_PHANDLE_BY_IDX(node_id, cpu_power_states, i)),), ()) /** @@ -220,7 +220,7 @@ struct pm_state_constraint { * @param node_id A node identifier with compatible zephyr,power-state */ #define Z_PM_STATE_FROM_DT_CPU(i, node_id) \ - COND_CODE_1(DT_NODE_HAS_STATUS(DT_PHANDLE_BY_IDX(node_id, cpu_power_states, i), okay), \ + COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(DT_PHANDLE_BY_IDX(node_id, cpu_power_states, i)), \ (PM_STATE_DT_INIT(DT_PHANDLE_BY_IDX(node_id, cpu_power_states, i)),), ()) /** @endcond */ diff --git a/kernel/init.c b/kernel/init.c index afbffe1ccff..c3b6ea9bb33 100644 --- a/kernel/init.c +++ b/kernel/init.c @@ -223,17 +223,17 @@ void z_bss_zero(void) } z_early_memset(__bss_start, 0, __bss_end - __bss_start); -#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_ccm), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_ccm)) z_early_memset(&__ccm_bss_start, 0, (uintptr_t) &__ccm_bss_end - (uintptr_t) &__ccm_bss_start); #endif -#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm)) z_early_memset(&__dtcm_bss_start, 0, (uintptr_t) &__dtcm_bss_end - (uintptr_t) &__dtcm_bss_start); #endif -#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_ocm), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_ocm)) z_early_memset(&__ocm_bss_start, 0, (uintptr_t) &__ocm_bss_end - (uintptr_t) &__ocm_bss_start); diff --git a/kernel/xip.c b/kernel/xip.c index d068174a1e9..94d38e9b30d 100644 --- a/kernel/xip.c +++ b/kernel/xip.c @@ -31,15 +31,15 @@ void z_data_copy(void) z_early_memcpy(&__ramfunc_start, &__ramfunc_load_start, (uintptr_t) &__ramfunc_size); #endif /* CONFIG_ARCH_HAS_RAMFUNC_SUPPORT */ -#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_ccm), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_ccm)) z_early_memcpy(&__ccm_data_start, &__ccm_data_rom_start, __ccm_data_end - __ccm_data_start); #endif -#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_itcm), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_itcm)) z_early_memcpy(&__itcm_start, &__itcm_load_start, (uintptr_t) &__itcm_size); #endif -#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm)) z_early_memcpy(&__dtcm_data_start, &__dtcm_data_load_start, __dtcm_data_end - __dtcm_data_start); #endif diff --git a/modules/hal_nordic/nrfx/nrfx_config.h b/modules/hal_nordic/nrfx/nrfx_config.h index b0c27bb2fe8..bec09b1a058 100644 --- a/modules/hal_nordic/nrfx/nrfx_config.h +++ b/modules/hal_nordic/nrfx/nrfx_config.h @@ -1000,7 +1000,7 @@ #define NRFX_IPCT_PUB_OR_SUB_MASK(inst_num) \ COND_CODE_1(IS_EMPTY(inst_num), \ - (DT_NODE_HAS_STATUS(NRFX_CONFIG_IPCT_LOCAL_NODE, okay)), \ + (DT_NODE_HAS_STATUS_OKAY(NRFX_CONFIG_IPCT_LOCAL_NODE)), \ (DT_NODE_HAS_PROP(DT_NODELABEL(_CONCAT(ipct, inst_num)), owned_channels))) /* Variables names generation. */ diff --git a/samples/basic/button/src/main.c b/samples/basic/button/src/main.c index b181afcc34e..a86407a65c2 100644 --- a/samples/basic/button/src/main.c +++ b/samples/basic/button/src/main.c @@ -18,7 +18,7 @@ * Get button configuration from the devicetree sw0 alias. This is mandatory. */ #define SW0_NODE DT_ALIAS(sw0) -#if !DT_NODE_HAS_STATUS(SW0_NODE, okay) +#if !DT_NODE_HAS_STATUS_OKAY(SW0_NODE) #error "Unsupported board: sw0 devicetree alias is not defined" #endif static const struct gpio_dt_spec button = GPIO_DT_SPEC_GET_OR(SW0_NODE, gpios, diff --git a/samples/basic/threads/src/main.c b/samples/basic/threads/src/main.c index 0554ddd9daf..529df15908a 100644 --- a/samples/basic/threads/src/main.c +++ b/samples/basic/threads/src/main.c @@ -20,11 +20,11 @@ #define LED0_NODE DT_ALIAS(led0) #define LED1_NODE DT_ALIAS(led1) -#if !DT_NODE_HAS_STATUS(LED0_NODE, okay) +#if !DT_NODE_HAS_STATUS_OKAY(LED0_NODE) #error "Unsupported board: led0 devicetree alias is not defined" #endif -#if !DT_NODE_HAS_STATUS(LED1_NODE, okay) +#if !DT_NODE_HAS_STATUS_OKAY(LED1_NODE) #error "Unsupported board: led1 devicetree alias is not defined" #endif diff --git a/samples/bluetooth/central_otc/src/main.c b/samples/bluetooth/central_otc/src/main.c index bd690e87ed1..9f1f3069fd4 100644 --- a/samples/bluetooth/central_otc/src/main.c +++ b/samples/bluetooth/central_otc/src/main.c @@ -77,8 +77,8 @@ static void print_hex_number(const uint8_t *num, size_t len) #define SW1_NODE DT_ALIAS(sw1) #define SW2_NODE DT_ALIAS(sw2) #define SW3_NODE DT_ALIAS(sw3) -#if !DT_NODE_HAS_STATUS(SW0_NODE, okay) || !DT_NODE_HAS_STATUS(SW1_NODE, okay) || \ - !DT_NODE_HAS_STATUS(SW2_NODE, okay) || !DT_NODE_HAS_STATUS(SW3_NODE, okay) +#if !DT_NODE_HAS_STATUS_OKAY(SW0_NODE) || !DT_NODE_HAS_STATUS_OKAY(SW1_NODE) || \ + !DT_NODE_HAS_STATUS_OKAY(SW2_NODE) || !DT_NODE_HAS_STATUS_OKAY(SW3_NODE) #error "Unsupported board: This sample need 4 buttons to run" #endif diff --git a/samples/bluetooth/encrypted_advertising/central/src/main.c b/samples/bluetooth/encrypted_advertising/central/src/main.c index 888940af780..122641b311a 100644 --- a/samples/bluetooth/encrypted_advertising/central/src/main.c +++ b/samples/bluetooth/encrypted_advertising/central/src/main.c @@ -30,7 +30,7 @@ LOG_MODULE_DECLARE(ead_central_sample, CONFIG_BT_EAD_LOG_LEVEL); * Get button configuration from the devicetree sw0 alias. This is mandatory. */ #define SW0_NODE DT_ALIAS(sw0) -#if !DT_NODE_HAS_STATUS(SW0_NODE, okay) +#if !DT_NODE_HAS_STATUS_OKAY(SW0_NODE) #error "Unsupported board: sw0 devicetree alias is not defined" #endif static const struct gpio_dt_spec button = GPIO_DT_SPEC_GET_OR(SW0_NODE, gpios, {0}); diff --git a/samples/bluetooth/encrypted_advertising/peripheral/src/main.c b/samples/bluetooth/encrypted_advertising/peripheral/src/main.c index 6b269d30513..affa5430af2 100644 --- a/samples/bluetooth/encrypted_advertising/peripheral/src/main.c +++ b/samples/bluetooth/encrypted_advertising/peripheral/src/main.c @@ -26,7 +26,7 @@ LOG_MODULE_DECLARE(ead_peripheral_sample, CONFIG_BT_EAD_LOG_LEVEL); * Get button configuration from the devicetree sw0 alias. This is mandatory. */ #define SW0_NODE DT_ALIAS(sw0) -#if !DT_NODE_HAS_STATUS(SW0_NODE, okay) +#if !DT_NODE_HAS_STATUS_OKAY(SW0_NODE) #error "Unsupported board: sw0 devicetree alias is not defined" #endif static const struct gpio_dt_spec button = GPIO_DT_SPEC_GET_OR(SW0_NODE, gpios, {0}); diff --git a/samples/bluetooth/iso_receive/src/main.c b/samples/bluetooth/iso_receive/src/main.c index 3b7c051f387..989694907b4 100644 --- a/samples/bluetooth/iso_receive/src/main.c +++ b/samples/bluetooth/iso_receive/src/main.c @@ -42,7 +42,7 @@ static K_SEM_DEFINE(sem_big_sync_lost, 0, BIS_ISO_CHAN_COUNT); /* The devicetree node identifier for the "led0" alias. */ #define LED0_NODE DT_ALIAS(led0) -#if DT_NODE_HAS_STATUS(LED0_NODE, okay) +#if DT_NODE_HAS_STATUS_OKAY(LED0_NODE) static const struct gpio_dt_spec led_gpio = GPIO_DT_SPEC_GET(LED0_NODE, gpios); #define HAS_LED 1 #define BLINK_ONOFF K_MSEC(500) diff --git a/samples/bluetooth/mesh_provisioner/src/main.c b/samples/bluetooth/mesh_provisioner/src/main.c index 472dc020d43..d4be8601304 100644 --- a/samples/bluetooth/mesh_provisioner/src/main.c +++ b/samples/bluetooth/mesh_provisioner/src/main.c @@ -20,7 +20,7 @@ static uint8_t node_uuid[16]; K_SEM_DEFINE(sem_unprov_beacon, 0, 1); K_SEM_DEFINE(sem_node_added, 0, 1); -#if DT_NODE_HAS_STATUS(SW0_NODE, okay) +#if DT_NODE_HAS_STATUS_OKAY(SW0_NODE) K_SEM_DEFINE(sem_button_pressed, 0, 1); #endif @@ -315,7 +315,7 @@ static uint8_t check_unconfigured(struct bt_mesh_cdb_node *node, void *data) return BT_MESH_CDB_ITER_CONTINUE; } -#if DT_NODE_HAS_STATUS(SW0_NODE, okay) +#if DT_NODE_HAS_STATUS_OKAY(SW0_NODE) static const struct gpio_dt_spec button = GPIO_DT_SPEC_GET_OR(SW0_NODE, gpios, {0}); static struct gpio_callback button_cb_data; @@ -366,7 +366,7 @@ int main(void) printk("Bluetooth initialized\n"); bt_ready(); -#if DT_NODE_HAS_STATUS(SW0_NODE, okay) +#if DT_NODE_HAS_STATUS_OKAY(SW0_NODE) button_init(); #endif @@ -383,7 +383,7 @@ int main(void) bin2hex(node_uuid, 16, uuid_hex_str, sizeof(uuid_hex_str)); -#if DT_NODE_HAS_STATUS(SW0_NODE, okay) +#if DT_NODE_HAS_STATUS_OKAY(SW0_NODE) k_sem_reset(&sem_button_pressed); printk("Device %s detected, press button 1 to provision.\n", uuid_hex_str); err = k_sem_take(&sem_button_pressed, K_SECONDS(30)); diff --git a/samples/bluetooth/periodic_sync/src/main.c b/samples/bluetooth/periodic_sync/src/main.c index 44c5a8530b4..a8baf5d2600 100644 --- a/samples/bluetooth/periodic_sync/src/main.c +++ b/samples/bluetooth/periodic_sync/src/main.c @@ -24,7 +24,7 @@ static K_SEM_DEFINE(sem_per_sync_lost, 0, 1); /* The devicetree node identifier for the "led0" alias. */ #define LED0_NODE DT_ALIAS(led0) -#if DT_NODE_HAS_STATUS(LED0_NODE, okay) +#if DT_NODE_HAS_STATUS_OKAY(LED0_NODE) #define HAS_LED 1 static const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(LED0_NODE, gpios); #define BLINK_ONOFF K_MSEC(500) diff --git a/samples/bluetooth/peripheral_hids/src/hog.c b/samples/bluetooth/peripheral_hids/src/hog.c index cf67521517d..9aefdf2ea98 100644 --- a/samples/bluetooth/peripheral_hids/src/hog.c +++ b/samples/bluetooth/peripheral_hids/src/hog.c @@ -180,7 +180,7 @@ void hog_init(void) void hog_button_loop(void) { -#if DT_NODE_HAS_STATUS(SW0_NODE, okay) +#if DT_NODE_HAS_STATUS_OKAY(SW0_NODE) const struct gpio_dt_spec sw0 = GPIO_DT_SPEC_GET(SW0_NODE, gpios); gpio_pin_configure_dt(&sw0, GPIO_INPUT); diff --git a/samples/bluetooth/peripheral_hr/src/main.c b/samples/bluetooth/peripheral_hr/src/main.c index 8d7f73e5440..19c640ca91b 100644 --- a/samples/bluetooth/peripheral_hr/src/main.c +++ b/samples/bluetooth/peripheral_hr/src/main.c @@ -123,7 +123,7 @@ static void hrs_notify(void) /* The devicetree node identifier for the "led0" alias. */ #define LED0_NODE DT_ALIAS(led0) -#if DT_NODE_HAS_STATUS(LED0_NODE, okay) +#if DT_NODE_HAS_STATUS_OKAY(LED0_NODE) #include #define HAS_LED 1 static const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(LED0_NODE, gpios); diff --git a/samples/boards/espressif/deep_sleep/src/main.c b/samples/boards/espressif/deep_sleep/src/main.c index edf8b559705..519a1a550df 100644 --- a/samples/boards/espressif/deep_sleep/src/main.c +++ b/samples/boards/espressif/deep_sleep/src/main.c @@ -17,7 +17,7 @@ #endif #ifdef CONFIG_EXAMPLE_GPIO_WAKEUP -#if !DT_NODE_HAS_STATUS(DT_ALIAS(wakeup_button), okay) +#if !DT_NODE_HAS_STATUS_OKAY(DT_ALIAS(wakeup_button)) #error "Unsupported: wakeup-button alias is not defined" #else static const struct gpio_dt_spec wakeup_button = GPIO_DT_SPEC_GET(DT_ALIAS(wakeup_button), gpios); diff --git a/samples/boards/espressif/light_sleep/src/main.c b/samples/boards/espressif/light_sleep/src/main.c index 50cb920d159..9134f6a2006 100644 --- a/samples/boards/espressif/light_sleep/src/main.c +++ b/samples/boards/espressif/light_sleep/src/main.c @@ -16,7 +16,7 @@ */ #define SW0_NODE DT_ALIAS(sw0) -#if !DT_NODE_HAS_STATUS(SW0_NODE, okay) +#if !DT_NODE_HAS_STATUS_OKAY(SW0_NODE) #error "unsupported board: sw0 devicetree alias is not defined" #endif diff --git a/samples/boards/nordic/battery/src/battery.c b/samples/boards/nordic/battery/src/battery.c index a0fbb651b58..3a31a91398b 100644 --- a/samples/boards/nordic/battery/src/battery.c +++ b/samples/boards/nordic/battery/src/battery.c @@ -51,7 +51,7 @@ struct divider_config { }; static const struct divider_config divider_config = { -#if DT_NODE_HAS_STATUS(VBATT, okay) +#if DT_NODE_HAS_STATUS_OKAY(VBATT) .io_channel = { DT_IO_CHANNELS_INPUT(VBATT), }, @@ -72,7 +72,7 @@ struct divider_data { int16_t raw; }; static struct divider_data divider_data = { -#if DT_NODE_HAS_STATUS(VBATT, okay) +#if DT_NODE_HAS_STATUS_OKAY(VBATT) .adc = DEVICE_DT_GET(DT_IO_CHANNELS_CTLR(VBATT)), #else .adc = DEVICE_DT_GET(DT_IO_CHANNELS_CTLR(ZEPHYR_USER)), diff --git a/samples/boards/nxp/mimxrt1060_evk/system_off/src/main.c b/samples/boards/nxp/mimxrt1060_evk/system_off/src/main.c index 57b0298f861..af5dbf4b845 100644 --- a/samples/boards/nxp/mimxrt1060_evk/system_off/src/main.c +++ b/samples/boards/nxp/mimxrt1060_evk/system_off/src/main.c @@ -17,12 +17,12 @@ #define SOFT_OFF_S 10U #define SW0_NODE DT_ALIAS(sw0) -#if !DT_NODE_HAS_STATUS(SW0_NODE, okay) +#if !DT_NODE_HAS_STATUS_OKAY(SW0_NODE) #error "Unsupported board: sw0 devicetree alias is not defined" #endif #define SNVS_RTC_NODE DT_NODELABEL(snvs_rtc) -#if !DT_NODE_HAS_STATUS(SNVS_RTC_NODE, okay) +#if !DT_NODE_HAS_STATUS_OKAY(SNVS_RTC_NODE) #error "Unsupported board: snvs_rtc node is not enabled" #endif diff --git a/samples/boards/st/i2c_timing/src/main.c b/samples/boards/st/i2c_timing/src/main.c index 41b8dfa2dee..80f8001318d 100644 --- a/samples/boards/st/i2c_timing/src/main.c +++ b/samples/boards/st/i2c_timing/src/main.c @@ -10,7 +10,7 @@ #include -#if DT_NODE_HAS_STATUS(DT_ALIAS(i2c_0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_ALIAS(i2c_0)) #define I2C_DEV_NODE DT_ALIAS(i2c_0) #else #error "Please set the correct I2C device" diff --git a/samples/boards/st/mco/src/main.c b/samples/boards/st/mco/src/main.c index 966e80f8525..7e79d1e8cd8 100644 --- a/samples/boards/st/mco/src/main.c +++ b/samples/boards/st/mco/src/main.c @@ -25,7 +25,7 @@ int main(void) return -1; } -#if DT_NODE_HAS_STATUS(DT_NODELABEL(mco2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(mco2)) dev = DEVICE_DT_GET(DT_NODELABEL(mco2)); if (device_is_ready(dev)) { printk("MCO2 device successfully configured\n"); diff --git a/samples/boards/st/power_mgmt/standby_shutdown/src/main.c b/samples/boards/st/power_mgmt/standby_shutdown/src/main.c index 6610f01f955..b74051bc99f 100644 --- a/samples/boards/st/power_mgmt/standby_shutdown/src/main.c +++ b/samples/boards/st/power_mgmt/standby_shutdown/src/main.c @@ -23,7 +23,7 @@ #define SLEEP_TIME_MS 3000 #define SW0_NODE DT_ALIAS(sw0) -#if !DT_NODE_HAS_STATUS(SW0_NODE, okay) +#if !DT_NODE_HAS_STATUS_OKAY(SW0_NODE) #error "Unsupported board: sw0 devicetree alias is not defined" #endif diff --git a/samples/boards/st/power_mgmt/wkup_pins/src/main.c b/samples/boards/st/power_mgmt/wkup_pins/src/main.c index 2284a76b035..c83db862d43 100644 --- a/samples/boards/st/power_mgmt/wkup_pins/src/main.c +++ b/samples/boards/st/power_mgmt/wkup_pins/src/main.c @@ -15,7 +15,7 @@ #define WAIT_TIME_US 4000000 #define WKUP_SRC_NODE DT_ALIAS(wkup_src) -#if !DT_NODE_HAS_STATUS(WKUP_SRC_NODE, okay) +#if !DT_NODE_HAS_STATUS_OKAY(WKUP_SRC_NODE) #error "Unsupported board: wkup_src devicetree alias is not defined" #endif diff --git a/samples/drivers/espi/src/main.c b/samples/drivers/espi/src/main.c index fff0998459d..aa6b92a4725 100644 --- a/samples/drivers/espi/src/main.c +++ b/samples/drivers/espi/src/main.c @@ -45,7 +45,7 @@ LOG_MODULE_DECLARE(espi, CONFIG_ESPI_LOG_LEVEL); /* The devicetree node identifier for the board power rails pins. */ #define BRD_PWR_NODE DT_NODELABEL(board_power) -#if DT_NODE_HAS_STATUS(BRD_PWR_NODE, okay) +#if DT_NODE_HAS_STATUS_OKAY(BRD_PWR_NODE) static const struct gpio_dt_spec pwrgd_gpio = GPIO_DT_SPEC_GET(BRD_PWR_NODE, pwrg_gpios); static const struct gpio_dt_spec rsm_gpio = GPIO_DT_SPEC_GET(BRD_PWR_NODE, rsm_gpios); #endif @@ -911,7 +911,7 @@ int espi_init(void) return ret; } -#if DT_NODE_HAS_STATUS(BRD_PWR_NODE, okay) +#if DT_NODE_HAS_STATUS_OKAY(BRD_PWR_NODE) static int wait_for_pin(const struct gpio_dt_spec *gpio, uint16_t timeout, int exp_level) { uint16_t loop_cnt = timeout; @@ -1172,7 +1172,7 @@ int espi_test(void) */ k_sleep(K_SECONDS(1)); -#if DT_NODE_HAS_STATUS(BRD_PWR_NODE, okay) +#if DT_NODE_HAS_STATUS_OKAY(BRD_PWR_NODE) if (!gpio_is_ready_dt(&pwrgd_gpio)) { LOG_ERR("%s: device not ready.", pwrgd_gpio.port->name); return -ENODEV; @@ -1201,7 +1201,7 @@ int espi_test(void) LOG_INF("Hello eSPI test %s", CONFIG_BOARD); -#if DT_NODE_HAS_STATUS(BRD_PWR_NODE, okay) +#if DT_NODE_HAS_STATUS_OKAY(BRD_PWR_NODE) ret = gpio_pin_configure_dt(&pwrgd_gpio, GPIO_INPUT); if (ret) { LOG_ERR("Unable to configure %d:%d", pwrgd_gpio.pin, ret); @@ -1252,7 +1252,7 @@ int espi_test(void) } #endif -#if DT_NODE_HAS_STATUS(BRD_PWR_NODE, okay) +#if DT_NODE_HAS_STATUS_OKAY(BRD_PWR_NODE) ret = wait_for_pin(&pwrgd_gpio, PWR_SEQ_TIMEOUT, 1); if (ret) { LOG_ERR("RSMRST_PWRGD timeout"); diff --git a/samples/drivers/i2s/echo/src/main.c b/samples/drivers/i2s/echo/src/main.c index c0ac1505d7b..bffa794158b 100644 --- a/samples/drivers/i2s/echo/src/main.c +++ b/samples/drivers/i2s/echo/src/main.c @@ -30,12 +30,12 @@ #define TIMEOUT 1000 #define SW0_NODE DT_ALIAS(sw0) -#if DT_NODE_HAS_STATUS(SW0_NODE, okay) +#if DT_NODE_HAS_STATUS_OKAY(SW0_NODE) static struct gpio_dt_spec sw0_spec = GPIO_DT_SPEC_GET(SW0_NODE, gpios); #endif #define SW1_NODE DT_ALIAS(sw1) -#if DT_NODE_HAS_STATUS(SW1_NODE, okay) +#if DT_NODE_HAS_STATUS_OKAY(SW1_NODE) static struct gpio_dt_spec sw1_spec = GPIO_DT_SPEC_GET(SW1_NODE, gpios); #endif @@ -47,7 +47,7 @@ static int16_t echo_block[SAMPLES_PER_BLOCK]; static volatile bool echo_enabled = true; static K_SEM_DEFINE(toggle_transfer, 1, 1); -#if DT_NODE_HAS_STATUS(SW0_NODE, okay) +#if DT_NODE_HAS_STATUS_OKAY(SW0_NODE) static void sw0_handler(const struct device *dev, struct gpio_callback *cb, uint32_t pins) { @@ -58,7 +58,7 @@ static void sw0_handler(const struct device *dev, struct gpio_callback *cb, } #endif -#if DT_NODE_HAS_STATUS(SW1_NODE, okay) +#if DT_NODE_HAS_STATUS_OKAY(SW1_NODE) static void sw1_handler(const struct device *dev, struct gpio_callback *cb, uint32_t pins) { @@ -70,7 +70,7 @@ static bool init_buttons(void) { int ret; -#if DT_NODE_HAS_STATUS(SW0_NODE, okay) +#if DT_NODE_HAS_STATUS_OKAY(SW0_NODE) static struct gpio_callback sw0_cb_data; if (!gpio_is_ready_dt(&sw0_spec)) { @@ -98,7 +98,7 @@ static bool init_buttons(void) printk("Press \"%s\" to toggle the echo effect\n", sw0_spec.port->name); #endif -#if DT_NODE_HAS_STATUS(SW1_NODE, okay) +#if DT_NODE_HAS_STATUS_OKAY(SW1_NODE) static struct gpio_callback sw1_cb_data; if (!gpio_is_ready_dt(&sw1_spec)) { diff --git a/samples/drivers/lora/receive/src/main.c b/samples/drivers/lora/receive/src/main.c index 9b503354001..e6ba6086ae0 100644 --- a/samples/drivers/lora/receive/src/main.c +++ b/samples/drivers/lora/receive/src/main.c @@ -11,7 +11,7 @@ #include #define DEFAULT_RADIO_NODE DT_ALIAS(lora0) -BUILD_ASSERT(DT_NODE_HAS_STATUS(DEFAULT_RADIO_NODE, okay), +BUILD_ASSERT(DT_NODE_HAS_STATUS_OKAY(DEFAULT_RADIO_NODE), "No default LoRa radio specified in DT"); #define MAX_DATA_LEN 255 diff --git a/samples/drivers/lora/send/src/main.c b/samples/drivers/lora/send/src/main.c index 63cce8367af..7988fa8762e 100644 --- a/samples/drivers/lora/send/src/main.c +++ b/samples/drivers/lora/send/src/main.c @@ -11,7 +11,7 @@ #include #define DEFAULT_RADIO_NODE DT_ALIAS(lora0) -BUILD_ASSERT(DT_NODE_HAS_STATUS(DEFAULT_RADIO_NODE, okay), +BUILD_ASSERT(DT_NODE_HAS_STATUS_OKAY(DEFAULT_RADIO_NODE), "No default LoRa radio specified in DT"); #define MAX_DATA_LEN 10 diff --git a/samples/shields/x_nucleo_53l0a1/src/main.c b/samples/shields/x_nucleo_53l0a1/src/main.c index e2688eec21b..9de9469ba7d 100644 --- a/samples/shields/x_nucleo_53l0a1/src/main.c +++ b/samples/shields/x_nucleo_53l0a1/src/main.c @@ -15,7 +15,7 @@ * Get button configuration from the devicetree sw0 alias. This is mandatory. */ #define SW0_NODE DT_ALIAS(sw0) -#if !DT_NODE_HAS_STATUS(SW0_NODE, okay) +#if !DT_NODE_HAS_STATUS_OKAY(SW0_NODE) #error "Unsupported board: sw0 devicetree alias is not defined" #endif diff --git a/samples/subsys/mgmt/osdp/control_panel/src/main.c b/samples/subsys/mgmt/osdp/control_panel/src/main.c index 1942e822733..2b58692e926 100644 --- a/samples/subsys/mgmt/osdp/control_panel/src/main.c +++ b/samples/subsys/mgmt/osdp/control_panel/src/main.c @@ -12,7 +12,7 @@ /* The devicetree node identifier for the "led0" alias. */ #define LED0_NODE DT_ALIAS(led0) -#if !DT_NODE_HAS_STATUS(LED0_NODE, okay) +#if !DT_NODE_HAS_STATUS_OKAY(LED0_NODE) #error "BOARD does not define a debug LED" #endif diff --git a/samples/subsys/mgmt/osdp/peripheral_device/src/main.c b/samples/subsys/mgmt/osdp/peripheral_device/src/main.c index 8ffdd10f081..74d4fed6d2c 100644 --- a/samples/subsys/mgmt/osdp/peripheral_device/src/main.c +++ b/samples/subsys/mgmt/osdp/peripheral_device/src/main.c @@ -12,7 +12,7 @@ /* The devicetree node identifier for the "led0" alias. */ #define LED0_NODE DT_ALIAS(led0) -#if !DT_NODE_HAS_STATUS(LED0_NODE, okay) +#if !DT_NODE_HAS_STATUS_OKAY(LED0_NODE) #error "BOARD does not define a debug LED" #endif diff --git a/samples/subsys/task_wdt/src/main.c b/samples/subsys/task_wdt/src/main.c index f06ef1faef2..a366b3683eb 100644 --- a/samples/subsys/task_wdt/src/main.c +++ b/samples/subsys/task_wdt/src/main.c @@ -21,7 +21,7 @@ * from there. Otherwise, the task watchdog will be used without a * hardware watchdog fallback. */ -#if DT_NODE_HAS_STATUS(DT_ALIAS(watchdog0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_ALIAS(watchdog0)) #define WDT_NODE DT_ALIAS(watchdog0) #elif DT_HAS_COMPAT_STATUS_OKAY(st_stm32_window_watchdog) #define WDT_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(st_stm32_window_watchdog) diff --git a/soc/arm/beetle/power.c b/soc/arm/beetle/power.c index 4377d79d3f0..700969f4673 100644 --- a/soc/arm/beetle/power.c +++ b/soc/arm/beetle/power.c @@ -11,13 +11,13 @@ #include #include -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio0)) #define CLK_BIT_GPIO0 _BEETLE_GPIO0 #else #define CLK_BIT_GPIO0 0 #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1)) #define CLK_BIT_GPIO1 _BEETLE_GPIO1 #else #define CLK_BIT_GPIO1 0 @@ -25,13 +25,13 @@ #define AHB_CLK_BITS (CLK_BIT_GPIO0 | CLK_BIT_GPIO1) -#if DT_NODE_HAS_STATUS(DT_NODELABEL(timer0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(timer0)) #define CLK_BIT_TIMER0 _BEETLE_TIMER0 #else #define CLK_BIT_TIMER0 0 #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(timer1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(timer1)) #define CLK_BIT_TIMER1 _BEETLE_TIMER1 #else #define CLK_BIT_TIMER1 0 @@ -43,13 +43,13 @@ #define CLK_BIT_WDOG 0 #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart0)) #define CLK_BIT_UART0 _BEETLE_UART0 #else #define CLK_BIT_UART0 0 #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) #define CLK_BIT_UART1 _BEETLE_UART1 #else #define CLK_BIT_UART1 0 diff --git a/soc/atmel/sam/common/soc_power.c b/soc/atmel/sam/common/soc_power.c index 08499b98b10..0b477f9fbe9 100644 --- a/soc/atmel/sam/common/soc_power.c +++ b/soc/atmel/sam/common/soc_power.c @@ -12,7 +12,7 @@ #endif #if defined(CONFIG_REBOOT) -#if DT_NODE_HAS_STATUS(SAM_DT_RSTC_DRIVER, okay) +#if DT_NODE_HAS_STATUS_OKAY(SAM_DT_RSTC_DRIVER) void sys_arch_reboot(int type) { @@ -33,5 +33,5 @@ void sys_arch_reboot(int type) } } -#endif /* DT_NODE_HAS_STATUS */ +#endif /* DT_NODE_HAS_STATUS_OKAY */ #endif /* CONFIG_REBOOT */ diff --git a/soc/intel/intel_adsp/common/clk.c b/soc/intel/intel_adsp/common/clk.c index b32071bab78..66c86202198 100644 --- a/soc/intel/intel_adsp/common/clk.c +++ b/soc/intel/intel_adsp/common/clk.c @@ -129,10 +129,10 @@ struct adsp_clock_source_desc adsp_clk_src_info[ADSP_CLOCK_SOURCE_COUNT] = { */ [ADSP_CLOCK_SOURCE_XTAL_OSC] = { CONFIG_DAI_DMIC_HW_IOCLK }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(audioclk), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(audioclk)) [ADSP_CLOCK_SOURCE_AUDIO_CARDINAL] = { DT_PROP(DT_NODELABEL(audioclk), clock_frequency) }, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pllclk), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pllclk)) [ADSP_CLOCK_SOURCE_AUDIO_PLL_FIXED] = { DT_PROP(DT_NODELABEL(pllclk), clock_frequency) }, #endif [ADSP_CLOCK_SOURCE_MLCK_INPUT] = { 0 }, diff --git a/soc/intel/intel_adsp/common/include/adsp_clk.h b/soc/intel/intel_adsp/common/include/adsp_clk.h index ccfb5cdc7e7..591116c5561 100644 --- a/soc/intel/intel_adsp/common/include/adsp_clk.h +++ b/soc/intel/intel_adsp/common/include/adsp_clk.h @@ -64,10 +64,10 @@ struct adsp_cpu_clock_info *adsp_cpu_clocks_get(void); /* Clock sources used by dai */ #define ADSP_CLOCK_SOURCE_XTAL_OSC 0 -#if DT_NODE_HAS_STATUS(DT_NODELABEL(audioclk), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(audioclk)) #define ADSP_CLOCK_SOURCE_AUDIO_CARDINAL 1 #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pllclk), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pllclk)) #define ADSP_CLOCK_SOURCE_AUDIO_PLL_FIXED 2 #endif diff --git a/soc/intel/intel_adsp/common/mem_window.c b/soc/intel/intel_adsp/common/mem_window.c index 8ca591deb36..ae5abcb77bf 100644 --- a/soc/intel/intel_adsp/common/mem_window.c +++ b/soc/intel/intel_adsp/common/mem_window.c @@ -58,15 +58,15 @@ void mem_window_idle_exit(void) &mem_win_config_##n, PRE_KERNEL_1, \ CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, NULL); -#if DT_NODE_HAS_STATUS(MEM_WINDOW_NODE(0), okay) +#if DT_NODE_HAS_STATUS_OKAY(MEM_WINDOW_NODE(0)) MEM_WINDOW_DEFINE(0) #endif -#if DT_NODE_HAS_STATUS(MEM_WINDOW_NODE(1), okay) +#if DT_NODE_HAS_STATUS_OKAY(MEM_WINDOW_NODE(1)) MEM_WINDOW_DEFINE(1) #endif -#if DT_NODE_HAS_STATUS(MEM_WINDOW_NODE(2), okay) +#if DT_NODE_HAS_STATUS_OKAY(MEM_WINDOW_NODE(2)) MEM_WINDOW_DEFINE(2) #endif -#if DT_NODE_HAS_STATUS(MEM_WINDOW_NODE(3), okay) +#if DT_NODE_HAS_STATUS_OKAY(MEM_WINDOW_NODE(3)) MEM_WINDOW_DEFINE(3) #endif diff --git a/soc/ite/ec/it8xxx2/soc.c b/soc/ite/ec/it8xxx2/soc.c index 0f2501111be..2c2660ac3b1 100644 --- a/soc/ite/ec/it8xxx2/soc.c +++ b/soc/ite/ec/it8xxx2/soc.c @@ -403,7 +403,7 @@ static int ite_it8xxx2_init(void) IT8XXX2_EGPIO_EGCR |= IT8XXX2_EGPIO_EEPODD; #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) /* UART1 board init */ /* bit2: clocks to UART1 modules are not gated. */ IT8XXX2_ECPM_CGCTRL3R &= ~BIT(2); @@ -417,9 +417,9 @@ static int ite_it8xxx2_init(void) /* switch UART1 on without hardware flow control */ gpio_regs->GPIO_GCR1 |= IT8XXX2_GPIO_U1CTRL_SIN0_SOUT0_EN; -#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) /* UART2 board init */ /* setting voltage 3.3v */ gpio_regs->GPIO_GCR21 &= ~(IT8XXX2_GPIO_GPH1VS | IT8XXX2_GPIO_GPH2VS); @@ -435,7 +435,7 @@ static int ite_it8xxx2_init(void) /* switch UART2 on without hardware flow control */ gpio_regs->GPIO_GCR1 |= IT8XXX2_GPIO_U2CTRL_SIN1_SOUT1_EN; -#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) */ #if (SOC_USBPD_ITE_PHY_PORT_COUNT > 0) int port; diff --git a/soc/microchip/mec/common/soc_dt.h b/soc/microchip/mec/common/soc_dt.h index cfaa8821da9..39f772f964f 100644 --- a/soc/microchip/mec/common/soc_dt.h +++ b/soc/microchip/mec/common/soc_dt.h @@ -35,7 +35,7 @@ #define MCHP_DT_ESPI_VW_FLAG_RST_SRC_MSK0 0x7 #define MCHP_DT_NODE_FROM_VWTABLE(name) DT_CHILD(DT_PATH(mchp_xec_espi_vw_routing), name) -#define MCHP_DT_VW_NODE_HAS_STATUS(name) DT_NODE_HAS_STATUS(MCHP_DT_NODE_FROM_VWTABLE(name), okay) +#define MCHP_DT_VW_NODE_HAS_STATUS(name) DT_NODE_HAS_STATUS_OKAY(MCHP_DT_NODE_FROM_VWTABLE(name)) /* Macro to store eSPI virtual wire DT flags * b[0] = DT status property 0 is disabled, 1 enabled, diff --git a/soc/microchip/mec/mec172x/device_power.c b/soc/microchip/mec/mec172x/device_power.c index 8a35d6ddd00..eab5bfb0419 100644 --- a/soc/microchip/mec/mec172x/device_power.c +++ b/soc/microchip/mec/mec172x/device_power.c @@ -93,14 +93,14 @@ void soc_deep_sleep_non_wake_dis(void) void soc_deep_sleep_wake_en(void) { #if defined(CONFIG_KSCAN) || \ - (!defined(CONFIG_PM_DEVICE) && DT_NODE_HAS_STATUS(DT_NODELABEL(ps2_0), okay)) + (!defined(CONFIG_PM_DEVICE) && DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ps2_0))) struct ecia_named_regs *regs = ECIA_XEC_REG_BASE; #if defined(CONFIG_KSCAN) /* Enable PLL wake via KSCAN */ regs->GIRQ21.SRC = MCHP_KEYSCAN_GIRQ_BIT; regs->GIRQ21.EN_SET = MCHP_KEYSCAN_GIRQ_BIT; #endif -#if !defined(CONFIG_PM_DEVICE) && DT_NODE_HAS_STATUS(DT_NODELABEL(ps2_0), okay) +#if !defined(CONFIG_PM_DEVICE) && DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ps2_0)) /* Enable PS2_0B_WK */ regs->GIRQ21.SRC = MCHP_PS2_0_PORT0B_WK_GIRQ_BIT; regs->GIRQ21.EN_SET = MCHP_PS2_0_PORT0B_WK_GIRQ_BIT; @@ -110,7 +110,7 @@ void soc_deep_sleep_wake_en(void) void soc_deep_sleep_wake_dis(void) { -#if !defined(CONFIG_PM_DEVICE) && DT_NODE_HAS_STATUS(DT_NODELABEL(ps2_0), okay) +#if !defined(CONFIG_PM_DEVICE) && DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ps2_0)) struct ecia_named_regs *regs = ECIA_XEC_REG_BASE; /* Enable PS2_0B_WK */ diff --git a/soc/nordic/common/nrf54hx_nrf92x_mpu_regions.c b/soc/nordic/common/nrf54hx_nrf92x_mpu_regions.c index 66659588411..b76fac86bcd 100644 --- a/soc/nordic/common/nrf54hx_nrf92x_mpu_regions.c +++ b/soc/nordic/common/nrf54hx_nrf92x_mpu_regions.c @@ -28,15 +28,15 @@ static struct arm_mpu_region mpu_regions[] = { REGION_RAM_ATTR(CONFIG_SRAM_BASE_ADDRESS, CONFIG_SRAM_SIZE * 1024)), -#if DT_NODE_HAS_STATUS(DT_NODELABEL(usbhs), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usbhs)) MPU_REGION_ENTRY("USBHS_CORE", USBHS_BASE, REGION_RAM_NOCACHE_ATTR(USBHS_BASE, USBHS_SIZE)), #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(can120), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(can120)) MPU_REGION_ENTRY("CAN120_MCAN", CAN120_BASE, REGION_RAM_NOCACHE_ATTR(CAN120_BASE, CAN120_SIZE)), #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(can121), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(can121)) MPU_REGION_ENTRY("CAN121_MCAN", CAN121_BASE, REGION_RAM_NOCACHE_ATTR(CAN121_BASE, CAN121_SIZE)), #endif diff --git a/soc/nordic/nrf52/soc.c b/soc/nordic/nrf52/soc.c index 3262b84bc85..4bb3b8640e5 100644 --- a/soc/nordic/nrf52/soc.c +++ b/soc/nordic/nrf52/soc.c @@ -37,7 +37,7 @@ static int nordicsemi_nrf52_init(void) nrf_power_dcdcen_set(NRF_POWER, true); #endif #if NRF_POWER_HAS_DCDCEN_VDDH && (defined(CONFIG_SOC_DCDC_NRF52X_HV) || \ - DT_NODE_HAS_STATUS(DT_INST(0, nordic_nrf52x_regulator_hv), okay)) + DT_NODE_HAS_STATUS_OKAY(DT_INST(0, nordic_nrf52x_regulator_hv))) nrf_power_dcdcen_vddh_set(NRF_POWER, true); #endif diff --git a/soc/nordic/nrf53/soc.c b/soc/nordic/nrf53/soc.c index 35a13be1b9a..cbdb8e04fe0 100644 --- a/soc/nordic/nrf53/soc.c +++ b/soc/nordic/nrf53/soc.c @@ -558,7 +558,7 @@ static int nordicsemi_nrf53_init(void) (DT_PROP(DT_NODELABEL(vregradio), regulator_initial_mode) == NRF5X_REG_MODE_DCDC) nrf_regulators_vreg_enable_set(NRF_REGULATORS, NRF_REGULATORS_VREG_RADIO, true); #endif -#if defined(CONFIG_SOC_DCDC_NRF53X_HV) || DT_NODE_HAS_STATUS(DT_NODELABEL(vregh), okay) +#if defined(CONFIG_SOC_DCDC_NRF53X_HV) || DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(vregh)) nrf_regulators_vreg_enable_set(NRF_REGULATORS, NRF_REGULATORS_VREG_HIGH, true); #endif diff --git a/soc/nordic/nrf54h/soc.c b/soc/nordic/nrf54h/soc.c index 2699a3ebd54..4ffb17bef51 100644 --- a/soc/nordic/nrf54h/soc.c +++ b/soc/nordic/nrf54h/soc.c @@ -143,7 +143,7 @@ static int nordicsemi_nrf54h_init(void) return err; } -#if DT_NODE_HAS_STATUS(DT_NODELABEL(ccm030), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ccm030)) /* DMASEC is set to non-secure by default, which prevents CCM from * accessing secure memory. Change DMASEC to secure. */ diff --git a/soc/nordic/nrf92/soc.c b/soc/nordic/nrf92/soc.c index 1a40bb58dda..d9a54e4f1aa 100644 --- a/soc/nordic/nrf92/soc.c +++ b/soc/nordic/nrf92/soc.c @@ -93,7 +93,7 @@ static int nordicsemi_nrf92_init(void) trim_hsfll(); -#if DT_NODE_HAS_STATUS(DT_NODELABEL(ccm030), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ccm030)) /* DMASEC is set to non-secure by default, which prevents CCM from * accessing secure memory. Change DMASEC to secure. */ diff --git a/soc/nordic/validate_enabled_instances.c b/soc/nordic/validate_enabled_instances.c index b3e4dd70bbf..afcfc6e8ca8 100644 --- a/soc/nordic/validate_enabled_instances.c +++ b/soc/nordic/validate_enabled_instances.c @@ -7,16 +7,16 @@ #include #define I2C_ENABLED(idx) (IS_ENABLED(CONFIG_I2C) && \ - DT_NODE_HAS_STATUS(DT_NODELABEL(i2c##idx), okay)) + DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(i2c##idx))) #define SPI_ENABLED(idx) (IS_ENABLED(CONFIG_SPI) && \ - DT_NODE_HAS_STATUS(DT_NODELABEL(spi##idx), okay)) + DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(spi##idx))) #define UART_ENABLED(idx) (IS_ENABLED(CONFIG_SERIAL) && \ (IS_ENABLED(CONFIG_SOC_SERIES_NRF53X) || \ IS_ENABLED(CONFIG_SOC_SERIES_NRF54LX) || \ IS_ENABLED(CONFIG_SOC_SERIES_NRF91X)) && \ - DT_NODE_HAS_STATUS(DT_NODELABEL(uart##idx), okay)) + DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart##idx))) /* * In most Nordic SoCs, SPI and TWI peripherals with the same instance number diff --git a/soc/nxp/imx/imx6sx/soc.c b/soc/nxp/imx/imx6sx/soc.c index 11cbac10002..516c2e9bcf6 100644 --- a/soc/nxp/imx/imx6sx/soc.c +++ b/soc/nxp/imx/imx6sx/soc.c @@ -23,55 +23,55 @@ static void SOC_RdcInit(void) RDC_DOMAIN_PERM(M4_DOMAIN_ID, RDC_DOMAIN_PERM_RW), false, false); -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) /* Set access to UART_1 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapUart1, RDC_DT_VAL(uart1), false, false); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) /* Set access to UART_2 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapUart2, RDC_DT_VAL(uart2), false, false); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3)) /* Set access to UART_3 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapUart3, RDC_DT_VAL(uart3), false, false); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart4)) /* Set access to UART_4 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapUart4, RDC_DT_VAL(uart4), false, false); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart5), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart5)) /* Set access to UART_5 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapUart5, RDC_DT_VAL(uart5), false, false); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart6), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart6)) /* Set access to UART_6 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapUart6, RDC_DT_VAL(uart6), false, false); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1)) /* Set access to GPIO_1 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapGpio1, RDC_DT_VAL(gpio1), false, false); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio2)) /* Set access to GPIO_2 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapGpio2, RDC_DT_VAL(gpio2), false, false); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio3)) /* Set access to GPIO_3 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapGpio3, RDC_DT_VAL(gpio3), false, false); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio4)) /* Set access to GPIO_4 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapGpio4, RDC_DT_VAL(gpio4), false, false); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio5), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio5)) /* Set access to GPIO_5 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapGpio5, RDC_DT_VAL(gpio5), false, false); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio6), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio6)) /* Set access to GPIO_6 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapGpio6, RDC_DT_VAL(gpio6), false, false); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio7), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio7)) /* Set access to GPIO_7 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapGpio7, RDC_DT_VAL(gpio7), false, false); #endif @@ -81,69 +81,69 @@ static void SOC_RdcInit(void) RDC_SetPdapAccess(RDC, rdcPdapMuB, RDC_DT_VAL(mub), false, false); #endif /* CONFIG_IPM_IMX */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(epit1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(epit1)) /* Set access to EPIT_1 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapEpit1, RDC_DT_VAL(epit1), false, false); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(epit2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(epit2)) /* Set access to EPIT_2 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapEpit2, RDC_DT_VAL(epit2), false, false); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(i2c1)) /* Set access to I2C-1 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapI2c1, RDC_DT_VAL(i2c1), false, false); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(i2c2)) /* Set access to I2C-2 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapI2c2, RDC_DT_VAL(i2c2), false, false); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(i2c3)) /* Set access to I2C-3 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapI2c3, RDC_DT_VAL(i2c3), false, false); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(i2c4)) /* Set access to I2C-4 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapI2c4, RDC_DT_VAL(i2c4), false, false); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pwm1)) /* Set access to PWM-1 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapPwm1, RDC_DT_VAL(pwm1), false, false); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pwm2)) /* Set access to PWM-2 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapPwm2, RDC_DT_VAL(pwm2), false, false); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pwm3)) /* Set access to PWM-3 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapPwm3, RDC_DT_VAL(pwm3), false, false); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pwm4)) /* Set access to PWM-4 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapPwm4, RDC_DT_VAL(pwm4), false, false); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm5), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pwm5)) /* Set access to PWM-5 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapPwm5, RDC_DT_VAL(pwm5), false, false); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm6), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pwm6)) /* Set access to PWM-6 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapPwm6, RDC_DT_VAL(pwm6), false, false); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm7), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pwm7)) /* Set access to PWM-7 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapPwm7, RDC_DT_VAL(pwm7), false, false); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm8), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pwm8)) /* Set access to PWM-8 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapPwm8, RDC_DT_VAL(pwm8), false, false); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(adc1)) /* Set access to ADC-1 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapAdc1, RDC_DT_VAL(adc1), false, false); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(adc2)) /* Set access to ADC-2 for M4 core */ RDC_SetPdapAccess(RDC, rdcPdapAdc2, RDC_DT_VAL(adc2), false, false); #endif @@ -213,10 +213,10 @@ static void SOC_ClockInit(void) CCM_SetRootDivider(CCM, ccmRootPerclkPodf, 0); /* Enable EPIT clocks */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(epit1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(epit1)) CCM_ControlGate(CCM, ccmCcgrGateEpit1Clk, ccmClockNeededAll); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(epit2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(epit2)) CCM_ControlGate(CCM, ccmCcgrGateEpit2Clk, ccmClockNeededAll); #endif #endif /* CONFIG_COUNTER_IMX_EPIT */ @@ -229,16 +229,16 @@ static void SOC_ClockInit(void) CCM_SetRootDivider(CCM, ccmRootPerclkPodf, 0); /* Enable I2C clock */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(i2c1)) CCM_ControlGate(CCM, ccmCcgrGateI2c1Serialclk, ccmClockNeededAll); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(i2c2)) CCM_ControlGate(CCM, ccmCcgrGateI2c2Serialclk, ccmClockNeededAll); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(i2c3)) CCM_ControlGate(CCM, ccmCcgrGateI2c3Serialclk, ccmClockNeededAll); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(i2c4)) CCM_ControlGate(CCM, ccmCcgrGateI2c4Serialclk, ccmClockNeededAll); #endif #endif /* CONFIG_I2C_IMX */ @@ -251,28 +251,28 @@ static void SOC_ClockInit(void) CCM_SetRootDivider(CCM, ccmRootPerclkPodf, 0); /* Enable PWM clock */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pwm1)) CCM_ControlGate(CCM, ccmCcgrGatePwm1Clk, ccmClockNeededAll); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pwm2)) CCM_ControlGate(CCM, ccmCcgrGatePwm2Clk, ccmClockNeededAll); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pwm3)) CCM_ControlGate(CCM, ccmCcgrGatePwm3Clk, ccmClockNeededAll); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pwm4)) CCM_ControlGate(CCM, ccmCcgrGatePwm4Clk, ccmClockNeededAll); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm5), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pwm5)) CCM_ControlGate(CCM, ccmCcgrGatePwm5Clk, ccmClockNeededAll); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm6), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pwm6)) CCM_ControlGate(CCM, ccmCcgrGatePwm6Clk, ccmClockNeededAll); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm7), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pwm7)) CCM_ControlGate(CCM, ccmCcgrGatePwm7Clk, ccmClockNeededAll); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm8), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pwm8)) CCM_ControlGate(CCM, ccmCcgrGatePwm8Clk, ccmClockNeededAll); #endif #endif /* CONFIG_PWM_IMX */ diff --git a/soc/nxp/imx/imx7d/soc.c b/soc/nxp/imx/imx7d/soc.c index df3ee95f2e1..780c405a0bb 100644 --- a/soc/nxp/imx/imx7d/soc.c +++ b/soc/nxp/imx/imx7d/soc.c @@ -57,21 +57,21 @@ void SOC_RdcInit(void) static void nxp_mcimx7_gpio_config(void) { -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1)) RDC_SetPdapAccess(RDC, rdcPdapGpio1, RDC_DT_VAL(gpio1), false, false); /* Enable gpio clock gate */ CCM_ControlGate(CCM, ccmCcgrGateGpio1, ccmClockNeededRunWait); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio2)) RDC_SetPdapAccess(RDC, rdcPdapGpio2, RDC_DT_VAL(gpio2), false, false); /* Enable gpio clock gate */ CCM_ControlGate(CCM, ccmCcgrGateGpio2, ccmClockNeededRunWait); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio7), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio7)) RDC_SetPdapAccess(RDC, rdcPdapGpio7, RDC_DT_VAL(gpio7), false, false); /* Enable gpio clock gate */ CCM_ControlGate(CCM, ccmCcgrGateGpio7, ccmClockNeededRunWait); @@ -84,7 +84,7 @@ static void nxp_mcimx7_gpio_config(void) static void nxp_mcimx7_uart_config(void) { -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) /* We need to grasp board uart exclusively */ RDC_SetPdapAccess(RDC, rdcPdapUart2, RDC_DT_VAL(uart2), false, false); /* Select clock derived from OSC clock(24M) */ @@ -99,7 +99,7 @@ static void nxp_mcimx7_uart_config(void) CCM_ControlGate(CCM, ccmCcgrGateUart2, ccmClockNeededAll); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart6), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart6)) /* We need to grasp board uart exclusively */ RDC_SetPdapAccess(RDC, rdcPdapUart6, RDC_DT_VAL(uart6), false, false); /* Select clock derived from OSC clock(24M) */ @@ -121,7 +121,7 @@ static void nxp_mcimx7_uart_config(void) static void nxp_mcimx7_i2c_config(void) { -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(i2c1)) /* In this example, we need to grasp board I2C exclusively */ RDC_SetPdapAccess(RDC, rdcPdapI2c1, RDC_DT_VAL(i2c1), false, false); /* Select I2C clock derived from OSC clock(24M) */ @@ -131,7 +131,7 @@ static void nxp_mcimx7_i2c_config(void) CCM_ControlGate(CCM, ccmCcgrGateI2c1, ccmClockNeededRunWait); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(i2c2)) /* In this example, we need to grasp board I2C exclusively */ RDC_SetPdapAccess(RDC, rdcPdapI2c2, RDC_DT_VAL(i2c2), false, false); /* Select I2C clock derived from OSC clock(24M) */ @@ -141,7 +141,7 @@ static void nxp_mcimx7_i2c_config(void) CCM_ControlGate(CCM, ccmCcgrGateI2c2, ccmClockNeededRunWait); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(i2c3)) /* In this example, we need to grasp board I2C exclusively */ RDC_SetPdapAccess(RDC, rdcPdapI2c3, RDC_DT_VAL(i2c3), false, false); /* Select I2C clock derived from OSC clock(24M) */ @@ -151,7 +151,7 @@ static void nxp_mcimx7_i2c_config(void) CCM_ControlGate(CCM, ccmCcgrGateI2c3, ccmClockNeededRunWait); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(i2c4)) /* In this example, we need to grasp board I2C exclusively */ RDC_SetPdapAccess(RDC, rdcPdapI2c4, RDC_DT_VAL(i2c4), false, false); /* Select I2C clock derived from OSC clock(24M) */ @@ -168,7 +168,7 @@ static void nxp_mcimx7_i2c_config(void) static void nxp_mcimx7_pwm_config(void) { -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pwm1)) /* We need to grasp board pwm exclusively */ RDC_SetPdapAccess(RDC, rdcPdapPwm1, RDC_DT_VAL(pwm1), false, false); /* Select clock derived from OSC clock(24M) */ @@ -178,7 +178,7 @@ static void nxp_mcimx7_pwm_config(void) CCM_ControlGate(CCM, ccmCcgrGatePwm1, ccmClockNeededAll); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pwm2)) /* We need to grasp board pwm exclusively */ RDC_SetPdapAccess(RDC, rdcPdapPwm2, RDC_DT_VAL(pwm2), false, false); /* Select clock derived from OSC clock(24M) */ @@ -188,7 +188,7 @@ static void nxp_mcimx7_pwm_config(void) CCM_ControlGate(CCM, ccmCcgrGatePwm2, ccmClockNeededAll); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pwm3)) /* We need to grasp board pwm exclusively */ RDC_SetPdapAccess(RDC, rdcPdapPwm3, RDC_DT_VAL(pwm3), false, false); /* Select clock derived from OSC clock(24M) */ @@ -198,7 +198,7 @@ static void nxp_mcimx7_pwm_config(void) CCM_ControlGate(CCM, ccmCcgrGatePwm3, ccmClockNeededAll); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pwm4)) /* We need to grasp board pwm exclusively */ RDC_SetPdapAccess(RDC, rdcPdapPwm4, RDC_DT_VAL(pwm4), false, false); /* Select clock derived from OSC clock(24M) */ diff --git a/soc/nxp/imx/imx8m/a53/soc.c b/soc/nxp/imx/imx8m/a53/soc.c index a20ae395f18..a110213e2b6 100644 --- a/soc/nxp/imx/imx8m/a53/soc.c +++ b/soc/nxp/imx/imx8m/a53/soc.c @@ -12,7 +12,7 @@ #include #include -#if DT_NODE_HAS_STATUS(DT_NODELABEL(rdc), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(rdc)) #define rdc_inst ((RDC_Type *)DT_REG_ADDR(DT_NODELABEL(rdc))) @@ -28,19 +28,19 @@ static void soc_rdc_init(void) RDC_GetDefaultPeriphAccessConfig(&periphConfig); -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) && DT_NODE_HAS_PROP(DT_NODELABEL(uart2), rdc) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) && DT_NODE_HAS_PROP(DT_NODELABEL(uart2), rdc) periphConfig.periph = kRDC_Periph_UART2; periphConfig.policy = RDC_DT_VAL(uart2); RDC_SetPeriphAccessConfig(rdc_inst, &periphConfig); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay) && DT_NODE_HAS_PROP(DT_NODELABEL(uart4), rdc) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart4)) && DT_NODE_HAS_PROP(DT_NODELABEL(uart4), rdc) periphConfig.periph = kRDC_Periph_UART4; periphConfig.policy = RDC_DT_VAL(uart4); RDC_SetPeriphAccessConfig(rdc_inst, &periphConfig); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) && DT_NODE_HAS_PROP(DT_NODELABEL(enet), rdc) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(enet)) && DT_NODE_HAS_PROP(DT_NODELABEL(enet), rdc) periphConfig.periph = kRDC_Periph_ENET1; periphConfig.policy = RDC_DT_VAL(enet); RDC_SetPeriphAccessConfig(rdc_inst, &periphConfig); diff --git a/soc/nxp/imx/imx8m/m4_mini/soc.c b/soc/nxp/imx/imx8m/m4_mini/soc.c index 784c39fcc04..b809a900e11 100644 --- a/soc/nxp/imx/imx8m/m4_mini/soc.c +++ b/soc/nxp/imx/imx8m/m4_mini/soc.c @@ -104,25 +104,25 @@ static void SOC_ClockInit(void) CLOCK_SetRootMux(kCLOCK_RootAudioAhb, kCLOCK_AudioAhbRootmuxSysPll1); #if defined(CONFIG_UART_MCUX_IUART) -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) /* Set UART source to SysPLL1 Div10 80MHZ */ CLOCK_SetRootMux(kCLOCK_RootUart1, kCLOCK_UartRootmuxSysPll1Div10); /* Set root clock to 80MHZ/ 1= 80MHZ */ CLOCK_SetRootDivider(kCLOCK_RootUart1, 1U, 1U); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) /* Set UART source to SysPLL1 Div10 80MHZ */ CLOCK_SetRootMux(kCLOCK_RootUart2, kCLOCK_UartRootmuxSysPll1Div10); /* Set root clock to 80MHZ/ 1= 80MHZ */ CLOCK_SetRootDivider(kCLOCK_RootUart2, 1U, 1U); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3)) /* Set UART source to SysPLL1 Div10 80MHZ */ CLOCK_SetRootMux(kCLOCK_RootUart3, kCLOCK_UartRootmuxSysPll1Div10); /* Set root clock to 80MHZ/ 1= 80MHZ */ CLOCK_SetRootDivider(kCLOCK_RootUart3, 1U, 1U); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart4)) /* Set UART source to SysPLL1 Div10 80MHZ */ CLOCK_SetRootMux(kCLOCK_RootUart4, kCLOCK_UartRootmuxSysPll1Div10); /* Set root clock to 80MHZ/ 1= 80MHZ */ diff --git a/soc/nxp/imx/imx8m/m4_quad/soc.c b/soc/nxp/imx/imx8m/m4_quad/soc.c index 031121bc424..eea984fc172 100644 --- a/soc/nxp/imx/imx8m/m4_quad/soc.c +++ b/soc/nxp/imx/imx8m/m4_quad/soc.c @@ -67,25 +67,25 @@ static void SOC_ClockInit(void) CLOCK_SetRootMux(kCLOCK_RootM4, kCLOCK_M4RootmuxSysPll1Div3); #if defined(CONFIG_UART_MCUX_IUART) -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) /* Set UART source to SysPLL1 Div10 80MHZ */ CLOCK_SetRootMux(kCLOCK_RootUart1, kCLOCK_UartRootmuxSysPll1Div10); /* Set root clock to 80MHZ/ 1= 80MHZ */ CLOCK_SetRootDivider(kCLOCK_RootUart1, 1U, 1U); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) /* Set UART source to SysPLL1 Div10 80MHZ */ CLOCK_SetRootMux(kCLOCK_RootUart2, kCLOCK_UartRootmuxSysPll1Div10); /* Set root clock to 80MHZ/ 1= 80MHZ */ CLOCK_SetRootDivider(kCLOCK_RootUart2, 1U, 1U); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3)) /* Set UART source to SysPLL1 Div10 80MHZ */ CLOCK_SetRootMux(kCLOCK_RootUart3, kCLOCK_UartRootmuxSysPll1Div10); /* Set root clock to 80MHZ/ 1= 80MHZ */ CLOCK_SetRootDivider(kCLOCK_RootUart3, 1U, 1U); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart4)) /* Set UART source to SysPLL1 Div10 80MHZ */ CLOCK_SetRootMux(kCLOCK_RootUart4, kCLOCK_UartRootmuxSysPll1Div10); /* Set root clock to 80MHZ/ 1= 80MHZ */ diff --git a/soc/nxp/imx/imx8m/m7/soc.c b/soc/nxp/imx/imx8m/m7/soc.c index 683d550b149..7cd42b3bb5d 100644 --- a/soc/nxp/imx/imx8m/m7/soc.c +++ b/soc/nxp/imx/imx8m/m7/soc.c @@ -107,25 +107,25 @@ static void SOC_ClockInit(void) CLOCK_SetRootMux(kCLOCK_RootAhb, kCLOCK_AhbRootmuxSysPll1Div6); #if defined(CONFIG_UART_MCUX_IUART) -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart1)) /* Set UART source to SysPLL1 Div10 80MHZ */ CLOCK_SetRootMux(kCLOCK_RootUart1, kCLOCK_UartRootmuxSysPll1Div10); /* Set root clock to 80MHZ/ 1= 80MHZ */ CLOCK_SetRootDivider(kCLOCK_RootUart1, 1U, 1U); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart2)) /* Set UART source to SysPLL1 Div10 80MHZ */ CLOCK_SetRootMux(kCLOCK_RootUart2, kCLOCK_UartRootmuxSysPll1Div10); /* Set root clock to 80MHZ/ 1= 80MHZ */ CLOCK_SetRootDivider(kCLOCK_RootUart2, 1U, 1U); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart3)) /* Set UART source to SysPLL1 Div10 80MHZ */ CLOCK_SetRootMux(kCLOCK_RootUart3, kCLOCK_UartRootmuxSysPll1Div10); /* Set root clock to 80MHZ/ 1= 80MHZ */ CLOCK_SetRootDivider(kCLOCK_RootUart3, 1U, 1U); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart4)) /* Set UART source to SysPLL1 Div10 80MHZ */ CLOCK_SetRootMux(kCLOCK_RootUart4, kCLOCK_UartRootmuxSysPll1Div10); /* Set root clock to 80MHZ/ 1= 80MHZ */ @@ -134,21 +134,21 @@ static void SOC_ClockInit(void) #endif #if defined(CONFIG_SPI_MCUX_ECSPI) -#if DT_NODE_HAS_STATUS(DT_NODELABEL(ecspi1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ecspi1)) /* Set ECSPI1 source to SYSTEM PLL1 800MHZ */ CLOCK_SetRootMux(kCLOCK_RootEcspi1, kCLOCK_EcspiRootmuxSysPll1); /* Set root clock to 800MHZ / 10 = 80MHZ */ CLOCK_SetRootDivider(kCLOCK_RootEcspi1, 2U, 5U); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(ecspi2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ecspi2)) /* Set ECSPI2 source to SYSTEM PLL1 800MHZ */ CLOCK_SetRootMux(kCLOCK_RootEcspi2, kCLOCK_EcspiRootmuxSysPll1); /* Set root clock to 800MHZ / 10 = 80MHZ */ CLOCK_SetRootDivider(kCLOCK_RootEcspi2, 2U, 5U); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(ecspi3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ecspi3)) /* Set ECSPI3 source to SYSTEM PLL1 800MHZ */ CLOCK_SetRootMux(kCLOCK_RootEcspi3, kCLOCK_EcspiRootmuxSysPll1); /* Set root clock to 800MHZ / 10 = 80MHZ */ @@ -175,27 +175,27 @@ static void gpio_init(void) { #if defined(CONFIG_GPIO_MCUX_IGPIO) -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1)) CLOCK_EnableClock(kCLOCK_Gpio1); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio2)) CLOCK_EnableClock(kCLOCK_Gpio2); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio3)) CLOCK_EnableClock(kCLOCK_Gpio3); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio4), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio4)) CLOCK_EnableClock(kCLOCK_Gpio4); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio5), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio5)) CLOCK_EnableClock(kCLOCK_Gpio5); diff --git a/soc/nxp/imxrt/imxrt10xx/flexspi.c b/soc/nxp/imxrt/imxrt10xx/flexspi.c index a6a6239e9e7..5f288747c1a 100644 --- a/soc/nxp/imxrt/imxrt10xx/flexspi.c +++ b/soc/nxp/imxrt/imxrt10xx/flexspi.c @@ -28,7 +28,7 @@ uint32_t flexspi_clock_set_freq(uint32_t clock_name, uint32_t rate) div_sel = kCLOCK_FlexspiDiv; clk_name = kCLOCK_FlexSpi; break; -#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexspi2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexspi2)) case IMX_CCM_FLEXSPI2_CLK: /* Get clock root frequency */ root_rate = CLOCK_GetClockRootFreq(kCLOCK_Flexspi2ClkRoot) * diff --git a/soc/nxp/imxrt/imxrt10xx/soc.c b/soc/nxp/imxrt/imxrt10xx/soc.c index d8a11dafd34..941ae1d3474 100644 --- a/soc/nxp/imxrt/imxrt10xx/soc.c +++ b/soc/nxp/imxrt/imxrt10xx/soc.c @@ -67,10 +67,10 @@ const clock_enet_pll_config_t ethPllConfig = { .enableClkOutput500M = true, #endif #if defined(CONFIG_ETH_NXP_ENET) || defined(CONFIG_ETH_MCUX) -#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(enet)) .enableClkOutput = true, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(enet2)) .enableClkOutput1 = true, #endif #endif @@ -79,10 +79,10 @@ const clock_enet_pll_config_t ethPllConfig = { #else .enableClkOutput25M = false, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(enet)) .loopDivider = 1, #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(enet2)) .loopDivider1 = 1, #endif }; @@ -226,7 +226,7 @@ static ALWAYS_INLINE void clock_init(void) #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) && CONFIG_NET_L2_ETHERNET +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(enet)) && CONFIG_NET_L2_ETHERNET #if CONFIG_ETH_MCUX_RMII_EXT_CLK /* Enable clock input for ENET1 */ IOMUXC_EnableMode(IOMUXC_GPR, kIOMUXC_GPR_ENET1TxClkOutputDir, false); @@ -236,43 +236,43 @@ static ALWAYS_INLINE void clock_init(void) #endif #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet2), okay) && CONFIG_NET_L2_ETHERNET +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(enet2)) && CONFIG_NET_L2_ETHERNET /* Set ENET2 ref clock to be generated by External OSC,*/ /* direction as output and frequency to 50MHz */ IOMUXC_EnableMode(IOMUXC_GPR, kIOMUXC_GPR_ENET2TxClkOutputDir | kIOMUXC_GPR_ENET2RefClkMode, true); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(usb1), okay) && \ +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usb1)) && \ (CONFIG_USB_DC_NXP_EHCI || CONFIG_UDC_NXP_EHCI) CLOCK_EnableUsbhs0PhyPllClock(kCLOCK_Usb480M, DT_PROP_BY_PHANDLE(DT_NODELABEL(usb1), clocks, clock_frequency)); CLOCK_EnableUsbhs0Clock(kCLOCK_Usb480M, DT_PROP_BY_PHANDLE(DT_NODELABEL(usb1), clocks, clock_frequency)); -#if DT_NODE_HAS_STATUS(DT_NODELABEL(usb1), okay) && CONFIG_USB_DC_NXP_EHCI +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usb1)) && CONFIG_USB_DC_NXP_EHCI USB_EhciPhyInit(kUSB_ControllerEhci0, CPU_XTAL_CLK_HZ, &usbPhyConfig); #endif #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(usb2), okay) && \ +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usb2)) && \ (CONFIG_USB_DC_NXP_EHCI || CONFIG_UDC_NXP_EHCI) CLOCK_EnableUsbhs1PhyPllClock(kCLOCK_Usb480M, DT_PROP_BY_PHANDLE(DT_NODELABEL(usb2), clocks, clock_frequency)); CLOCK_EnableUsbhs1Clock(kCLOCK_Usb480M, DT_PROP_BY_PHANDLE(DT_NODELABEL(usb2), clocks, clock_frequency)); -#if DT_NODE_HAS_STATUS(DT_NODELABEL(usb1), okay) && CONFIG_USB_DC_NXP_EHCI +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usb1)) && CONFIG_USB_DC_NXP_EHCI USB_EhciPhyInit(kUSB_ControllerEhci1, CPU_XTAL_CLK_HZ, &usbPhyConfig); #endif #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc1), okay) && CONFIG_IMX_USDHC +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usdhc1)) && CONFIG_IMX_USDHC /* Configure USDHC clock source and divider */ CLOCK_InitSysPfd(kCLOCK_Pfd0, 24U); CLOCK_SetDiv(kCLOCK_Usdhc1Div, 1U); CLOCK_SetMux(kCLOCK_Usdhc1Mux, 1U); CLOCK_EnableClock(kCLOCK_Usdhc1); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc2), okay) && CONFIG_IMX_USDHC +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usdhc2)) && CONFIG_IMX_USDHC /* Configure USDHC clock source and divider */ CLOCK_InitSysPfd(kCLOCK_Pfd0, 24U); CLOCK_SetDiv(kCLOCK_Usdhc2Div, 1U); diff --git a/soc/nxp/imxrt/imxrt118x/soc.c b/soc/nxp/imxrt/imxrt118x/soc.c index 85299643de7..1809d6b4b02 100644 --- a/soc/nxp/imxrt/imxrt118x/soc.c +++ b/soc/nxp/imxrt/imxrt118x/soc.c @@ -208,16 +208,16 @@ static ALWAYS_INLINE void clock_init(void) #endif #if defined(CONFIG_UART_MCUX_LPUART) && \ - (DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart1), okay) \ - || DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart2), okay)) + (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpuart1)) \ + || DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpuart2))) /* Configure LPUART0102 using SYS_PLL3_DIV2_CLK */ rootCfg.mux = kCLOCK_LPUART0102_ClockRoot_MuxSysPll3Div2; rootCfg.div = 10; #endif #if defined(CONFIG_I2C_MCUX_LPI2C) && \ - (DT_NODE_HAS_STATUS(DT_NODELABEL(lpi2c1), okay) \ - || DT_NODE_HAS_STATUS(DT_NODELABEL(lpi2c2), okay)) + (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpi2c1)) \ + || DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpi2c2))) /* Configure LPI2C0102 using SYS_PLL3_DIV2_CLK */ rootCfg.mux = kCLOCK_LPI2C0102_ClockRoot_MuxSysPll3Div2; rootCfg.div = 4; @@ -225,8 +225,8 @@ static ALWAYS_INLINE void clock_init(void) #endif #if defined(CONFIG_I2C_MCUX_LPI2C) && \ - (DT_NODE_HAS_STATUS(DT_NODELABEL(lpi2c3), okay) \ - || DT_NODE_HAS_STATUS(DT_NODELABEL(lpi2c4), okay)) + (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpi2c3)) \ + || DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpi2c4))) /* Configure LPI2C0304 using SYS_PLL3_DIV2_CLK */ rootCfg.mux = kCLOCK_LPI2C0304_ClockRoot_MuxSysPll3Div2; rootCfg.div = 4; @@ -234,8 +234,8 @@ static ALWAYS_INLINE void clock_init(void) #endif #if defined(CONFIG_I2C_MCUX_LPI2C) && \ - (DT_NODE_HAS_STATUS(DT_NODELABEL(lpi2c5), okay) \ - || DT_NODE_HAS_STATUS(DT_NODELABEL(lpi2c6), okay)) + (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpi2c5)) \ + || DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpi2c6))) /* Configure LPI2C0506 using SYS_PLL3_DIV2_CLK */ rootCfg.mux = kCLOCK_LPI2C0506_ClockRoot_MuxSysPll3Div2; rootCfg.div = 4; @@ -243,8 +243,8 @@ static ALWAYS_INLINE void clock_init(void) #endif #if defined(CONFIG_SPI_MCUX_LPSPI) && \ - (DT_NODE_HAS_STATUS(DT_NODELABEL(lpspi1), okay) \ - || DT_NODE_HAS_STATUS(DT_NODELABEL(lpspi2), okay)) + (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpspi1)) \ + || DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpspi2))) /* Configure LPSPI0102 using SYS_PLL3_PFD1_CLK */ rootCfg.mux = kCLOCK_LPSPI0102_ClockRoot_MuxSysPll3Pfd1; rootCfg.div = 2; @@ -253,28 +253,28 @@ static ALWAYS_INLINE void clock_init(void) #if defined(CONFIG_COUNTER_MCUX_GPT) -#if (DT_NODE_HAS_STATUS(DT_NODELABEL(gpt1), okay)) +#if (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpt1))) /* Configure GPT1 using SYS_PLL3_DIV2_CLK */ rootCfg.mux = kCLOCK_GPT1_ClockRoot_MuxSysPll3Div2; rootCfg.div = 1; CLOCK_SetRootClock(kCLOCK_Root_Gpt1, &rootCfg); -#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpt1), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpt1)) */ -#if (DT_NODE_HAS_STATUS(DT_NODELABEL(gpt2), okay)) +#if (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpt2))) /* Configure GPT2 using SYS_PLL3_DIV2_CLK */ rootCfg.mux = kCLOCK_GPT2_ClockRoot_MuxSysPll3Div2; rootCfg.div = 1; CLOCK_SetRootClock(kCLOCK_Root_Gpt2, &rootCfg); -#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(gpt2), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpt2)) */ #endif /* CONFIG_COUNTER_MCUX_GPT */ #ifdef CONFIG_MCUX_ACMP -#if (DT_NODE_HAS_STATUS(DT_NODELABEL(acmp1), okay) \ - || DT_NODE_HAS_STATUS(DT_NODELABEL(acmp2), okay) \ - || DT_NODE_HAS_STATUS(DT_NODELABEL(acmp3), okay) \ - || DT_NODE_HAS_STATUS(DT_NODELABEL(acmp4), okay)) +#if (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(acmp1)) \ + || DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(acmp2)) \ + || DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(acmp3)) \ + || DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(acmp4))) /* Configure ACMP using MuxSysPll3Out */ rootCfg.mux = kCLOCK_ACMP_ClockRoot_MuxSysPll3Out; rootCfg.div = 2; diff --git a/soc/nxp/imxrt/imxrt11xx/soc.c b/soc/nxp/imxrt/imxrt11xx/soc.c index ae82e772b2c..02e35c2d105 100644 --- a/soc/nxp/imxrt/imxrt11xx/soc.c +++ b/soc/nxp/imxrt/imxrt11xx/soc.c @@ -409,7 +409,7 @@ static ALWAYS_INLINE void clock_init(void) #endif #if CONFIG_ETH_MCUX || CONFIG_ETH_NXP_ENET -#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(enet)) /* 50 MHz ENET clock */ rootCfg.mux = kCLOCK_ENET1_ClockRoot_MuxSysPll1Div2; rootCfg.div = 10; @@ -424,7 +424,7 @@ static ALWAYS_INLINE void clock_init(void) (IOMUXC_GPR_GPR4_ENET_REF_CLK_DIR(0x01U) | IOMUXC_GPR_GPR4_ENET_TX_CLK_SEL(0x1U)); #endif #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet1g), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(enet1g)) rootCfg.mux = kCLOCK_ENET2_ClockRoot_MuxSysPll1Div2; #if DT_ENUM_HAS_VALUE(DT_CHILD(DT_NODELABEL(enet1g), ethernet), phy_connection_type, rgmii) /* 125 MHz ENET1G clock */ @@ -491,13 +491,13 @@ static ALWAYS_INLINE void clock_init(void) #endif #ifdef CONFIG_CAN_MCUX_FLEXCAN -#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexcan1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcan1)) /* Configure CAN1 using Osc48MDiv2 */ rootCfg.mux = kCLOCK_CAN1_ClockRoot_MuxOscRc48MDiv2; rootCfg.div = 1; CLOCK_SetRootClock(kCLOCK_Root_Can1, &rootCfg); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexcan3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexcan3)) /* Configure CAN1 using Osc48MDiv2 */ rootCfg.mux = kCLOCK_CAN3_ClockRoot_MuxOscRc48MDiv2; rootCfg.div = 1; @@ -506,7 +506,7 @@ static ALWAYS_INLINE void clock_init(void) #endif #ifdef CONFIG_MCUX_ACMP -#if DT_NODE_HAS_STATUS(DT_NODELABEL(acmp1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(acmp1)) /* Configure ACMP1 using Osc48MDiv2*/ rootCfg.mux = kCLOCK_ACMP_ClockRoot_MuxOscRc48MDiv2; rootCfg.div = 1; @@ -532,28 +532,28 @@ static ALWAYS_INLINE void clock_init(void) CLOCK_SetRootClock(kCLOCK_Root_Gpt1, &rootCfg); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(usb1), okay) && (CONFIG_USB_DC_NXP_EHCI || CONFIG_UDC_NXP_EHCI) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usb1)) && (CONFIG_USB_DC_NXP_EHCI || CONFIG_UDC_NXP_EHCI) CLOCK_EnableUsbhs0PhyPllClock( kCLOCK_Usb480M, DT_PROP_BY_PHANDLE(DT_NODELABEL(usb1), clocks, clock_frequency)); CLOCK_EnableUsbhs0Clock(kCLOCK_Usb480M, DT_PROP_BY_PHANDLE(DT_NODELABEL(usb1), clocks, clock_frequency)); -#if DT_NODE_HAS_STATUS(DT_NODELABEL(usb1), okay) && CONFIG_USB_DC_NXP_EHCI +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usb1)) && CONFIG_USB_DC_NXP_EHCI USB_EhciPhyInit(kUSB_ControllerEhci0, CPU_XTAL_CLK_HZ, &usbPhyConfig); #endif #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(usb2), okay) && (CONFIG_USB_DC_NXP_EHCI || CONFIG_UDC_NXP_EHCI) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usb2)) && (CONFIG_USB_DC_NXP_EHCI || CONFIG_UDC_NXP_EHCI) CLOCK_EnableUsbhs1PhyPllClock( kCLOCK_Usb480M, DT_PROP_BY_PHANDLE(DT_NODELABEL(usb2), clocks, clock_frequency)); CLOCK_EnableUsbhs1Clock(kCLOCK_Usb480M, DT_PROP_BY_PHANDLE(DT_NODELABEL(usb2), clocks, clock_frequency)); -#if DT_NODE_HAS_STATUS(DT_NODELABEL(usb1), okay) && CONFIG_USB_DC_NXP_EHCI +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usb1)) && CONFIG_USB_DC_NXP_EHCI USB_EhciPhyInit(kUSB_ControllerEhci1, CPU_XTAL_CLK_HZ, &usbPhyConfig); #endif #endif #if CONFIG_IMX_USDHC -#if DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usdhc1)) /* Configure USDHC1 using SysPll2Pfd2*/ rootCfg.mux = kCLOCK_USDHC1_ClockRoot_MuxSysPll2Pfd2; rootCfg.div = 2; @@ -561,7 +561,7 @@ static ALWAYS_INLINE void clock_init(void) CLOCK_EnableClock(kCLOCK_Usdhc1); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usdhc2)) /* Configure USDHC2 using SysPll2Pfd2*/ rootCfg.mux = kCLOCK_USDHC2_ClockRoot_MuxSysPll2Pfd2; rootCfg.div = 2; @@ -571,7 +571,7 @@ static ALWAYS_INLINE void clock_init(void) #endif #if !(DT_NODE_HAS_COMPAT(DT_CHOSEN(zephyr_flash), nxp_imx_flexspi)) && \ - defined(CONFIG_MEMC_MCUX_FLEXSPI) && DT_NODE_HAS_STATUS(DT_NODELABEL(flexspi), okay) + defined(CONFIG_MEMC_MCUX_FLEXSPI) && DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexspi)) /* Configure FLEXSPI1 using OSC_RC_48M_DIV2 */ rootCfg.mux = kCLOCK_FLEXSPI1_ClockRoot_MuxOscRc48MDiv2; rootCfg.div = 1; diff --git a/soc/nxp/imxrt/imxrt5xx/cm33/soc.c b/soc/nxp/imxrt/imxrt5xx/cm33/soc.c index 10f690bf0a5..b8eeef23a45 100644 --- a/soc/nxp/imxrt/imxrt5xx/cm33/soc.c +++ b/soc/nxp/imxrt/imxrt5xx/cm33/soc.c @@ -358,7 +358,7 @@ void __weak rt5xx_clock_init(void) /* Switch CLKOUT to FRO_DIV2 */ CLOCK_AttachClk(kFRO_DIV2_to_CLKOUT); -#if DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc0), okay) && CONFIG_IMX_USDHC +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usdhc0)) && CONFIG_IMX_USDHC /* Make sure USDHC ram buffer has been power up*/ POWER_DisablePD(kPDRUNCFG_APD_USDHC0_SRAM); POWER_DisablePD(kPDRUNCFG_PPD_USDHC0_SRAM); @@ -373,7 +373,7 @@ void __weak rt5xx_clock_init(void) RESET_PeripheralReset(kSDIO0_RST_SHIFT_RSTn); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(smartdma), okay) && CONFIG_DMA_MCUX_SMARTDMA +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(smartdma)) && CONFIG_DMA_MCUX_SMARTDMA /* Power up SMARTDMA ram */ POWER_DisablePD(kPDRUNCFG_APD_SMARTDMA_SRAM); POWER_DisablePD(kPDRUNCFG_PPD_SMARTDMA_SRAM); diff --git a/soc/nxp/imxrt/imxrt6xx/cm33/soc.c b/soc/nxp/imxrt/imxrt6xx/cm33/soc.c index e8ec55510f3..cf5bc6f57b4 100644 --- a/soc/nxp/imxrt/imxrt6xx/cm33/soc.c +++ b/soc/nxp/imxrt/imxrt6xx/cm33/soc.c @@ -286,7 +286,7 @@ static ALWAYS_INLINE void clock_init(void) CLOCK_AttachClk(kNONE_to_WDT0_CLK); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc0), okay) && CONFIG_IMX_USDHC +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usdhc0)) && CONFIG_IMX_USDHC /* Make sure USDHC ram buffer has been power up*/ POWER_DisablePD(kPDRUNCFG_APD_USDHC0_SRAM); POWER_DisablePD(kPDRUNCFG_PPD_USDHC0_SRAM); @@ -350,7 +350,7 @@ static ALWAYS_INLINE void clock_init(void) #endif /* CONFIG_SOC_MIMXRT685S_CM33 */ } -#if (DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc0), okay) && CONFIG_IMX_USDHC) +#if (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usdhc0)) && CONFIG_IMX_USDHC) void imxrt_usdhc_pinmux(uint16_t nusdhc, bool init, uint32_t speed, uint32_t strength) { diff --git a/soc/nxp/imxrt/imxrt6xx/cm33/soc.h b/soc/nxp/imxrt/imxrt6xx/cm33/soc.h index 356b0e5727c..71e5d69544e 100644 --- a/soc/nxp/imxrt/imxrt6xx/cm33/soc.h +++ b/soc/nxp/imxrt/imxrt6xx/cm33/soc.h @@ -85,8 +85,8 @@ extern "C" { #endif #if CONFIG_IMX_USDHC && \ - (DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc0), okay) || \ - DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc1), okay)) + (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usdhc0)) || \ + DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usdhc1))) void imxrt_usdhc_pinmux(uint16_t nusdhc, bool init, uint32_t speed, uint32_t strength); diff --git a/soc/nxp/kinetis/k6x/soc.c b/soc/nxp/kinetis/k6x/soc.c index c8eb6ba7870..32832dc8a0a 100644 --- a/soc/nxp/kinetis/k6x/soc.c +++ b/soc/nxp/kinetis/k6x/soc.c @@ -101,7 +101,7 @@ static ALWAYS_INLINE void clock_init(void) CLOCK_SetSimConfig(&simConfig); -#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpuart0)) CLOCK_SetLpuartClock(LPUART0SRC_OSCERCLK); #endif diff --git a/soc/nxp/kinetis/ke1xf/soc.c b/soc/nxp/kinetis/ke1xf/soc.c index 5d3e2291fe6..35968f6acf0 100644 --- a/soc/nxp/kinetis/ke1xf/soc.c +++ b/soc/nxp/kinetis/ke1xf/soc.c @@ -61,7 +61,7 @@ static const scg_sys_clk_config_t scg_sys_clk_config = { #endif }; -#if DT_NODE_HAS_STATUS(SCG_CLOCK_NODE(sosc_clk), okay) +#if DT_NODE_HAS_STATUS_OKAY(SCG_CLOCK_NODE(sosc_clk)) /* System Oscillator (SOSC) configuration */ ASSERT_ASYNC_CLK_DIV_VALID(SCG_CLOCK_DIV(soscdiv1_clk), "Invalid SCG SOSC divider 1 value"); @@ -155,7 +155,7 @@ static ALWAYS_INLINE void clk_init(void) }; scg_sys_clk_config_t current; -#if DT_NODE_HAS_STATUS(SCG_CLOCK_NODE(sosc_clk), okay) +#if DT_NODE_HAS_STATUS_OKAY(SCG_CLOCK_NODE(sosc_clk)) /* Optionally initialize system oscillator */ CLOCK_InitSysOsc(&scg_sosc_config); CLOCK_SetXtal0Freq(scg_sosc_config.freq); @@ -179,59 +179,59 @@ static ALWAYS_INLINE void clk_init(void) CLOCK_GetCurSysClkConfig(¤t); } while (current.src != scg_sys_clk_config.src); -#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpuart0)) CLOCK_SetIpSrc(kCLOCK_Lpuart0, DT_CLOCKS_CELL(DT_NODELABEL(lpuart0), ip_source)); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpuart1)) CLOCK_SetIpSrc(kCLOCK_Lpuart1, DT_CLOCKS_CELL(DT_NODELABEL(lpuart1), ip_source)); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpuart2)) CLOCK_SetIpSrc(kCLOCK_Lpuart2, DT_CLOCKS_CELL(DT_NODELABEL(lpuart2), ip_source)); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpi2c0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpi2c0)) CLOCK_SetIpSrc(kCLOCK_Lpi2c0, DT_CLOCKS_CELL(DT_NODELABEL(lpi2c0), ip_source)); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpi2c1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpi2c1)) CLOCK_SetIpSrc(kCLOCK_Lpi2c1, DT_CLOCKS_CELL(DT_NODELABEL(lpi2c1), ip_source)); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpspi0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpspi0)) CLOCK_SetIpSrc(kCLOCK_Lpspi0, DT_CLOCKS_CELL(DT_NODELABEL(lpspi0), ip_source)); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpspi1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpspi1)) CLOCK_SetIpSrc(kCLOCK_Lpspi1, DT_CLOCKS_CELL(DT_NODELABEL(lpspi1), ip_source)); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(adc0)) CLOCK_SetIpSrc(kCLOCK_Adc0, DT_CLOCKS_CELL(DT_NODELABEL(adc0), ip_source)); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(adc1)) CLOCK_SetIpSrc(kCLOCK_Adc1, DT_CLOCKS_CELL(DT_NODELABEL(adc1), ip_source)); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(adc2)) CLOCK_SetIpSrc(kCLOCK_Adc2, DT_CLOCKS_CELL(DT_NODELABEL(adc2), ip_source)); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(ftm0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ftm0)) CLOCK_SetIpSrc(kCLOCK_Ftm0, DT_CLOCKS_CELL(DT_NODELABEL(ftm0), ip_source)); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(ftm1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ftm1)) CLOCK_SetIpSrc(kCLOCK_Ftm1, DT_CLOCKS_CELL(DT_NODELABEL(ftm1), ip_source)); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(ftm2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ftm2)) CLOCK_SetIpSrc(kCLOCK_Ftm2, DT_CLOCKS_CELL(DT_NODELABEL(ftm2), ip_source)); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(ftm3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ftm3)) CLOCK_SetIpSrc(kCLOCK_Ftm3, DT_CLOCKS_CELL(DT_NODELABEL(ftm3), ip_source)); #endif diff --git a/soc/nxp/kinetis/ke1xz/soc.c b/soc/nxp/kinetis/ke1xz/soc.c index 5a6b443c1fe..0f8ad0de6ac 100644 --- a/soc/nxp/kinetis/ke1xz/soc.c +++ b/soc/nxp/kinetis/ke1xz/soc.c @@ -106,39 +106,39 @@ static ALWAYS_INLINE void clk_init(void) CLOCK_GetCurSysClkConfig(¤t); } while (current.src != scg_sys_clk_config.src); -#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpuart0)) CLOCK_SetIpSrc(kCLOCK_Lpuart0, DT_CLOCKS_CELL(DT_NODELABEL(lpuart0), ip_source)); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpuart1)) CLOCK_SetIpSrc(kCLOCK_Lpuart1, DT_CLOCKS_CELL(DT_NODELABEL(lpuart1), ip_source)); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpuart2)) CLOCK_SetIpSrc(kCLOCK_Lpuart2, DT_CLOCKS_CELL(DT_NODELABEL(lpuart2), ip_source)); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpi2c0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpi2c0)) CLOCK_SetIpSrc(kCLOCK_Lpi2c0, DT_CLOCKS_CELL(DT_NODELABEL(lpi2c0), ip_source)); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpi2c1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpi2c1)) CLOCK_SetIpSrc(kCLOCK_Lpi2c1, DT_CLOCKS_CELL(DT_NODELABEL(lpi2c1), ip_source)); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(flexio), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flexio)) CLOCK_SetIpSrc(kCLOCK_Flexio0, DT_CLOCKS_CELL(DT_NODELABEL(flexio), ip_source)); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpspi0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpspi0)) CLOCK_SetIpSrc(kCLOCK_Lpspi0, DT_CLOCKS_CELL(DT_NODELABEL(lpspi0), ip_source)); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpspi1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpspi1)) CLOCK_SetIpSrc(kCLOCK_Lpspi1, DT_CLOCKS_CELL(DT_NODELABEL(lpspi1), ip_source)); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(adc0)) CLOCK_SetIpSrc(kCLOCK_Adc0, DT_CLOCKS_CELL(DT_NODELABEL(adc0), ip_source)); #endif diff --git a/soc/nxp/kinetis/kl2x/soc.c b/soc/nxp/kinetis/kl2x/soc.c index 71fe3d35a35..8ab125d4c7c 100644 --- a/soc/nxp/kinetis/kl2x/soc.c +++ b/soc/nxp/kinetis/kl2x/soc.c @@ -70,7 +70,7 @@ static ALWAYS_INLINE void clock_init(void) CLOCK_SetInternalRefClkConfig(kMCG_IrclkEnable, kMCG_IrcSlow, 0); CLOCK_SetSimConfig(&simConfig); -#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(uart0)) CLOCK_SetLpsci0Clock(LPSCI0SRC_MCGFLLCLK); #endif #if CONFIG_USB_KINETIS || CONFIG_UDC_KINETIS diff --git a/soc/nxp/kinetis/kwx/soc_kw4xz.c b/soc/nxp/kinetis/kwx/soc_kw4xz.c index 4e33f4df5b8..f6baedb07b7 100644 --- a/soc/nxp/kinetis/kwx/soc_kw4xz.c +++ b/soc/nxp/kinetis/kwx/soc_kw4xz.c @@ -67,14 +67,14 @@ static ALWAYS_INLINE void clock_init(void) CLOCK_SetSimConfig(&simConfig); -#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpuart0)) CLOCK_SetLpuartClock(LPUART0SRC_OSCERCLK); #endif #if defined(CONFIG_PWM) && \ - (DT_NODE_HAS_STATUS(DT_NODELABEL(pwm0), okay) || \ - DT_NODE_HAS_STATUS(DT_NODELABEL(pwm1), okay) || \ - DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay)) + (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pwm0)) || \ + DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pwm1)) || \ + DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pwm2))) CLOCK_SetTpmClock(TPMSRC_MCGPLLCLK); #endif } diff --git a/soc/nxp/lpc/lpc55xxx/soc.c b/soc/nxp/lpc/lpc55xxx/soc.c index 233ab0d9d82..1959b525e92 100644 --- a/soc/nxp/lpc/lpc55xxx/soc.c +++ b/soc/nxp/lpc/lpc55xxx/soc.c @@ -193,7 +193,7 @@ static ALWAYS_INLINE void clock_init(void) CLOCK_AttachClk(kFRO12M_to_FLEXCOMM4); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(hs_lspi), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(hs_lspi)) /* Attach 12 MHz clock to HSLSPI */ CLOCK_AttachClk(kFRO_HF_DIV_to_HSLSPI); #endif diff --git a/soc/nxp/mcx/mcxc/soc.c b/soc/nxp/mcx/mcxc/soc.c index 1f4762e202a..4cb7b3c5085 100644 --- a/soc/nxp/mcx/mcxc/soc.c +++ b/soc/nxp/mcx/mcxc/soc.c @@ -95,7 +95,7 @@ static void clock_init(void) /* Set SystemCoreClock variable. */ SystemCoreClock = DT_PROP(DT_NODELABEL(cpu0), clock_frequency); /* Set LPUART0 clock source. */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpuart0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpuart0)) CLOCK_SetLpuart0Clock(LPUART_CLOCK_SEL(lpuart0)); #endif #if DT_HAS_COMPAT_STATUS_OKAY(nxp_kinetis_tpm) diff --git a/soc/nxp/rw/power.c b/soc/nxp/rw/power.c index 1f0255a388f..f4176b6349c 100644 --- a/soc/nxp/rw/power.c +++ b/soc/nxp/rw/power.c @@ -28,11 +28,11 @@ LOG_MODULE_DECLARE(soc, CONFIG_SOC_LOG_LEVEL); power_sleep_config_t slp_cfg; -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pin0), okay) || DT_NODE_HAS_STATUS(DT_NODELABEL(pin1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pin0)) || DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pin1)) pinctrl_soc_pin_t pin_cfg; #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pin0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pin0)) static void pin0_isr(const struct device *dev) { uint8_t level = ~(DT_ENUM_IDX(DT_NODELABEL(pin0), wakeup_level)) & 0x1; @@ -44,7 +44,7 @@ static void pin0_isr(const struct device *dev) } #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pin1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pin1)) static void pin1_isr(const struct device *dev) { uint8_t level = ~(DT_ENUM_IDX(DT_NODELABEL(pin1), wakeup_level)) & 0x1; @@ -61,7 +61,7 @@ __weak void pm_state_set(enum pm_state state, uint8_t substate_id) { ARG_UNUSED(substate_id); -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pin0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pin0)) pin_cfg = IOMUX_GPIO_IDX(24) | IOMUX_TYPE(IOMUX_GPIO); pinctrl_configure_pins(&pin_cfg, 1, 0); POWER_ConfigWakeupPin(kPOWER_WakeupPin0, DT_ENUM_IDX(DT_NODELABEL(pin0), wakeup_level)); @@ -70,7 +70,7 @@ __weak void pm_state_set(enum pm_state state, uint8_t substate_id) EnableIRQ(DT_IRQN(DT_NODELABEL(pin0))); POWER_EnableWakeup(DT_IRQN(DT_NODELABEL(pin0))); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pin1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pin1)) pin_cfg = IOMUX_GPIO_IDX(25) | IOMUX_TYPE(IOMUX_GPIO); pinctrl_configure_pins(&pin_cfg, 1, 0); POWER_ConfigWakeupPin(kPOWER_WakeupPin1, DT_ENUM_IDX(DT_NODELABEL(pin1), wakeup_level)); @@ -119,7 +119,7 @@ void nxp_rw6xx_power_init(void) slp_cfg.memPdCfg = suspend_sleepconfig[3]; slp_cfg.pm3BuckCfg = suspend_sleepconfig[4]; -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pin0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pin0)) /* PIN 0 uses GPIO0_24, confiure the pin as GPIO */ pin_cfg = IOMUX_GPIO_IDX(24) | IOMUX_TYPE(IOMUX_GPIO); pinctrl_configure_pins(&pin_cfg, 1, 0); @@ -131,7 +131,7 @@ void nxp_rw6xx_power_init(void) NULL, 0); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(pin1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pin1)) /* PIN 1 uses GPIO0_25, confiure the pin as GPIO */ pin_cfg = IOMUX_GPIO_IDX(25) | IOMUX_TYPE(IOMUX_GPIO); pinctrl_configure_pins(&pin_cfg, 1, 0); diff --git a/soc/nxp/rw/soc.c b/soc/nxp/rw/soc.c index 1a52626a053..9d3b6c548f1 100644 --- a/soc/nxp/rw/soc.c +++ b/soc/nxp/rw/soc.c @@ -221,7 +221,7 @@ __ramfunc void clock_init(void) #endif #endif /* CONFIG_SPI */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(dmic0), okay) && CONFIG_AUDIO_DMIC_MCUX +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dmic0)) && CONFIG_AUDIO_DMIC_MCUX /* Clock DMIC from Audio PLL. PLL output is sourced from AVPLL * channel 1, which is clocked at 12.288 MHz. We can divide this * by 4 to achieve the desired DMIC bit clk of 3.072 MHz @@ -230,7 +230,7 @@ __ramfunc void clock_init(void) CLOCK_SetClkDiv(kCLOCK_DivDmicClk, 4); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(lcdic), okay) && CONFIG_MIPI_DBI_NXP_LCDIC +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lcdic)) && CONFIG_MIPI_DBI_NXP_LCDIC CLOCK_AttachClk(kMAIN_CLK_to_LCD_CLK); RESET_PeripheralReset(kLCDIC_RST_SHIFT_RSTn); #endif @@ -250,7 +250,7 @@ __ramfunc void clock_init(void) #endif #endif /* CONFIG_COUNTER_MCUX_CTIMER */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(usb_otg), okay) && CONFIG_USB_DC_NXP_EHCI +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usb_otg)) && CONFIG_USB_DC_NXP_EHCI /* Enable system xtal from Analog */ SYSCTL2->ANA_GRP_CTRL |= SYSCTL2_ANA_GRP_CTRL_PU_AG_MASK; /* reset USB */ @@ -261,7 +261,7 @@ __ramfunc void clock_init(void) CLOCK_EnableUsbhsPhyClock(); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) && CONFIG_NET_L2_ETHERNET +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(enet)) && CONFIG_NET_L2_ETHERNET RESET_PeripheralReset(kENET_IPG_RST_SHIFT_RSTn); RESET_PeripheralReset(kENET_IPG_S_RST_SHIFT_RSTn); #endif @@ -289,7 +289,7 @@ void soc_early_init_hook(void) #define PMU_RESET_CAUSES \ COND_CODE_0(IS_EMPTY(PMU_RESET_CAUSES_), (PMU_RESET_CAUSES_), (0)) #define WDT_RESET \ - COND_CODE_1(DT_NODE_HAS_STATUS(wwdt, okay), (kPOWER_ResetSourceWdt), (0)) + COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(wwdt), (kPOWER_ResetSourceWdt), (0)) #define RESET_CAUSES \ (PMU_RESET_CAUSES | WDT_RESET) #else diff --git a/soc/openisa/rv32m1/soc.c b/soc/openisa/rv32m1/soc.c index cfcc6a0387b..5b3b5ec1646 100644 --- a/soc/openisa/rv32m1/soc.c +++ b/soc/openisa/rv32m1/soc.c @@ -197,16 +197,16 @@ static void rv32m1_switch_to_sirc(void) */ static void rv32m1_setup_peripheral_clocks(void) { -#if DT_NODE_HAS_STATUS(DT_NODELABEL(tpm0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(tpm0)) CLOCK_SetIpSrc(kCLOCK_Tpm0, kCLOCK_IpSrcFircAsync); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(tpm1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(tpm1)) CLOCK_SetIpSrc(kCLOCK_Tpm1, kCLOCK_IpSrcFircAsync); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(tpm2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(tpm2)) CLOCK_SetIpSrc(kCLOCK_Tpm2, kCLOCK_IpSrcFircAsync); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(tpm3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(tpm3)) CLOCK_SetIpSrc(kCLOCK_Tpm3, kCLOCK_IpSrcFircAsync); #endif } diff --git a/soc/renesas/ra/ra4m1/soc.c b/soc/renesas/ra/ra4m1/soc.c index 7f021ba17fa..7d8f2744914 100644 --- a/soc/renesas/ra/ra4m1/soc.c +++ b/soc/renesas/ra/ra4m1/soc.c @@ -107,7 +107,7 @@ const struct opt_set_mem ops __attribute__((section(".opt_set_mem"))) = { .LVDAS = 0x1, /* Disable voltage monitor 0 following reset */ .VDSEL1 = 0x3, .RSVD2 = 0x3, - .HOCOEN = !DT_NODE_HAS_STATUS(DT_PATH(clocks, hoco), okay), + .HOCOEN = !DT_NODE_HAS_STATUS_OKAY(DT_PATH(clocks, hoco)), .RSVD3 = 0x7, .HOCOFRQ1 = OFS1_HOCO_FREQ, .RSVD4 = 0x1ffff, diff --git a/soc/renesas/smartbond/da1469x/power.c b/soc/renesas/smartbond/da1469x/power.c index 3e39239bcd1..816cb01419c 100644 --- a/soc/renesas/smartbond/da1469x/power.c +++ b/soc/renesas/smartbond/da1469x/power.c @@ -48,7 +48,7 @@ void pm_state_exit_post_ops(enum pm_state state, uint8_t substate_id) int renesas_da1469x_pm_init(void) { static const struct da1469x_sleep_config sleep_cfg = { - .enable_xtal_on_wakeup = DT_NODE_HAS_STATUS(DT_NODELABEL(xtal32m), okay), + .enable_xtal_on_wakeup = DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(xtal32m)), }; da1469x_sleep_config(&sleep_cfg); diff --git a/soc/snps/emsk/soc_config.c b/soc/snps/emsk/soc_config.c index c43942facb0..5c18898ecd2 100644 --- a/soc/snps/emsk/soc_config.c +++ b/soc/snps/emsk/soc_config.c @@ -17,14 +17,14 @@ void soc_early_init_hook(void) /* On ARC EM Starter kit board, * send the UART the command to clear the interrupt */ -#if DT_NODE_HAS_STATUS(DT_INST(0, ns16550), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_INST(0, ns16550)) sys_write32(0, DT_REG_ADDR(DT_INST(0, ns16550))+0x4); sys_write32(0, DT_REG_ADDR(DT_INST(0, ns16550))+0x10); -#endif /* DT_NODE_HAS_STATUS(DT_INST(0, ns16550), okay) */ -#if DT_NODE_HAS_STATUS(DT_INST(1, ns16550), okay) +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_INST(0, ns16550)) */ +#if DT_NODE_HAS_STATUS_OKAY(DT_INST(1, ns16550)) sys_write32(0, DT_REG_ADDR(DT_INST(1, ns16550))+0x4); sys_write32(0, DT_REG_ADDR(DT_INST(1, ns16550))+0x10); -#endif /* DT_NODE_HAS_STATUS(DT_INST(1, ns16550), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_INST(1, ns16550)) */ } #endif /* CONFIG_UART_NS16550 */ diff --git a/soc/st/stm32/stm32h7x/mpu_regions.c b/soc/st/stm32/stm32h7x/mpu_regions.c index 29825ad226a..8582db60724 100644 --- a/soc/st/stm32/stm32h7x/mpu_regions.c +++ b/soc/st/stm32/stm32h7x/mpu_regions.c @@ -21,8 +21,8 @@ static const struct arm_mpu_region mpu_regions[] = { REGION_512K | MPU_RASR_XN_Msk | P_RW_U_NA_Msk) }), -#if DT_NODE_HAS_STATUS(DT_NODELABEL(mac), okay) -#if DT_NODE_HAS_STATUS(DT_NODELABEL(sram3), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(mac)) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(sram3)) MPU_REGION_ENTRY("SRAM3_ETH_BUF", DT_REG_ADDR(DT_NODELABEL(sram3)), REGION_RAM_NOCACHE_ATTR(REGION_16K)), diff --git a/soc/xlnx/zynq7000/xc7zxxx/soc.c b/soc/xlnx/zynq7000/xc7zxxx/soc.c index 37d30b02426..c1dad84ff36 100644 --- a/soc/xlnx/zynq7000/xc7zxxx/soc.c +++ b/soc/xlnx/zynq7000/xc7zxxx/soc.c @@ -39,13 +39,13 @@ static const struct arm_mmu_region mmu_regions[] = { /* ARM Arch timer, GIC are covered by the MPCore mapping */ /* GEMs */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gem0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gem0)) MMU_REGION_FLAT_ENTRY("gem0", DT_REG_ADDR(DT_NODELABEL(gem0)), DT_REG_SIZE(DT_NODELABEL(gem0)), MT_DEVICE | MATTR_SHARED | MPERM_R | MPERM_W), #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gem1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gem1)) MMU_REGION_FLAT_ENTRY("gem1", DT_REG_ADDR(DT_NODELABEL(gem1)), DT_REG_SIZE(DT_NODELABEL(gem1)), @@ -53,7 +53,7 @@ static const struct arm_mmu_region mmu_regions[] = { #endif /* GPIO controller */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(psgpio), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(psgpio)) MMU_REGION_FLAT_ENTRY("psgpio", DT_REG_ADDR(DT_NODELABEL(psgpio)), DT_REG_SIZE(DT_NODELABEL(psgpio)), @@ -106,7 +106,7 @@ void soc_reset_hook(void) sctlr &= ~SCTLR_A_Msk; __set_SCTLR(sctlr); -#if DT_NODE_HAS_STATUS(DT_NODELABEL(slcr), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(slcr)) mm_reg_t addr = DT_REG_ADDR(DT_NODELABEL(slcr)); /* Unlock System Level Control Registers (SLCR) */ diff --git a/soc/xlnx/zynq7000/xc7zxxxs/soc.c b/soc/xlnx/zynq7000/xc7zxxxs/soc.c index a46d9a21784..982ee094e01 100644 --- a/soc/xlnx/zynq7000/xc7zxxxs/soc.c +++ b/soc/xlnx/zynq7000/xc7zxxxs/soc.c @@ -39,13 +39,13 @@ static const struct arm_mmu_region mmu_regions[] = { /* ARM Arch timer, GIC are covered by the MPCore mapping */ /* GEMs */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gem0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gem0)) MMU_REGION_FLAT_ENTRY("gem0", DT_REG_ADDR(DT_NODELABEL(gem0)), DT_REG_SIZE(DT_NODELABEL(gem0)), MT_DEVICE | MATTR_SHARED | MPERM_R | MPERM_W), #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(gem1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gem1)) MMU_REGION_FLAT_ENTRY("gem1", DT_REG_ADDR(DT_NODELABEL(gem1)), DT_REG_SIZE(DT_NODELABEL(gem1)), @@ -53,7 +53,7 @@ static const struct arm_mmu_region mmu_regions[] = { #endif /* GPIO controller */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(psgpio), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(psgpio)) MMU_REGION_FLAT_ENTRY("psgpio", DT_REG_ADDR(DT_NODELABEL(psgpio)), DT_REG_SIZE(DT_NODELABEL(psgpio)), @@ -106,7 +106,7 @@ void soc_reset_hook(void) sctlr &= ~SCTLR_A_Msk; __set_SCTLR(sctlr); -#if DT_NODE_HAS_STATUS(DT_NODELABEL(slcr), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(slcr)) mm_reg_t addr = DT_REG_ADDR(DT_NODELABEL(slcr)); /* Unlock System Level Control Registers (SLCR) */ diff --git a/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_fem.h b/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_fem.h index b9ada56b5ab..a80de9f85e5 100644 --- a/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_fem.h +++ b/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_fem.h @@ -17,9 +17,9 @@ #if DT_NODE_HAS_PROP(DT_NODELABEL(radio), fem) #define FEM_NODE DT_PHANDLE(DT_NODELABEL(radio), fem) -#if DT_NODE_HAS_STATUS(FEM_NODE, okay) +#if DT_NODE_HAS_STATUS_OKAY(FEM_NODE) #define HAL_RADIO_HAVE_FEM -#endif /* DT_NODE_HAS_STATUS(FEM_NODE, okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(FEM_NODE) */ #endif /* DT_NODE_HAS_PROP(DT_NODELABEL(radio), fem)) */ /* Does FEM_NODE have a particular DT compatible? */ diff --git a/subsys/pm/policy.c b/subsys/pm/policy.c index b13017f1603..39742cdf38c 100644 --- a/subsys/pm/policy.c +++ b/subsys/pm/policy.c @@ -77,8 +77,8 @@ struct pm_state_device_constraint { * @brief Helper macro to define a device pm constraints. */ #define PM_STATE_CONSTRAINT_DEFINE(i, node_id) \ - COND_CODE_1(DT_NODE_HAS_STATUS(DT_PHANDLE_BY_IDX(node_id, \ - zephyr_disabling_power_states, i), okay), \ + COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(DT_PHANDLE_BY_IDX(node_id, \ + zephyr_disabling_power_states, i)), \ (PM_STATE_CONSTRAINT_INIT(DT_PHANDLE_BY_IDX(node_id, \ zephyr_disabling_power_states, i)),), ()) diff --git a/subsys/tracing/sysview/sysview_config.c b/subsys/tracing/sysview/sysview_config.c index e68cb4f8a79..0ef395e4516 100644 --- a/subsys/tracing/sysview/sysview_config.c +++ b/subsys/tracing/sysview/sysview_config.c @@ -97,7 +97,7 @@ void SEGGER_SYSVIEW_Conf(void) SEGGER_SYSVIEW_Init(sys_clock_hw_cycles_per_sec(), sys_clock_hw_cycles_per_sec(), &SYSVIEW_X_OS_TraceAPI, cbSendSystemDesc); -#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_sram), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_sram)) SEGGER_SYSVIEW_SetRAMBase(DT_REG_ADDR(DT_CHOSEN(zephyr_sram))); #else /* Setting RAMBase is just an optimization: this value is subtracted diff --git a/subsys/usb/device/usb_device.c b/subsys/usb/device/usb_device.c index e3a065fae1a..c285817e8ed 100644 --- a/subsys/usb/device/usb_device.c +++ b/subsys/usb/device/usb_device.c @@ -1295,7 +1295,7 @@ static void forward_status_cb(enum usb_dc_status_code status, const uint8_t *par static int usb_vbus_set(bool on) { #define USB_DEV_NODE DT_CHOSEN(zephyr_usb_device) -#if DT_NODE_HAS_STATUS(USB_DEV_NODE, okay) && \ +#if DT_NODE_HAS_STATUS_OKAY(USB_DEV_NODE) && \ DT_NODE_HAS_PROP(USB_DEV_NODE, vbus_gpios) int ret = 0; struct gpio_dt_spec gpio_dev = GPIO_DT_SPEC_GET(USB_DEV_NODE, vbus_gpios); diff --git a/tests/bluetooth/host/id/mocks/zephyr/linker/linker-defs.h b/tests/bluetooth/host/id/mocks/zephyr/linker/linker-defs.h index f2f32310870..7bd7faa7935 100644 --- a/tests/bluetooth/host/id/mocks/zephyr/linker/linker-defs.h +++ b/tests/bluetooth/host/id/mocks/zephyr/linker/linker-defs.h @@ -10,6 +10,10 @@ #undef DT_NODE_HAS_STATUS #endif +#ifdef DT_NODE_HAS_STATUS_OKAY +#undef DT_NODE_HAS_STATUS_OKAY +#endif + #ifdef DT_FOREACH_OKAY_HELPER #undef DT_FOREACH_OKAY_HELPER #endif diff --git a/tests/drivers/adc/adc_api/src/test_adc.c b/tests/drivers/adc/adc_api/src/test_adc.c index 7d778cc6ef7..e7d1958cd5a 100644 --- a/tests/drivers/adc/adc_api/src/test_adc.c +++ b/tests/drivers/adc/adc_api/src/test_adc.c @@ -55,7 +55,7 @@ const struct device *get_adc_device(void) return adc_channels[0].dev; } -#if DT_NODE_HAS_STATUS(DT_NODELABEL(test_counter), okay) && \ +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(test_counter)) && \ defined(CONFIG_COUNTER) static void init_counter(void) { @@ -90,7 +90,7 @@ static void init_adc(void) m_sample_buffer[i] = INVALID_ADC_VALUE; } -#if DT_NODE_HAS_STATUS(DT_NODELABEL(test_counter), okay) && \ +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(test_counter)) && \ defined(CONFIG_COUNTER) init_counter(); #endif diff --git a/tests/drivers/clock_control/stm32_clock_configuration/stm32_common_devices/src/test_stm32_clock_configuration_adc.c b/tests/drivers/clock_control/stm32_clock_configuration/stm32_common_devices/src/test_stm32_clock_configuration_adc.c index fd28729a376..4ff7aec59db 100644 --- a/tests/drivers/clock_control/stm32_clock_configuration/stm32_common_devices/src/test_stm32_clock_configuration_adc.c +++ b/tests/drivers/clock_control/stm32_clock_configuration/stm32_common_devices/src/test_stm32_clock_configuration_adc.c @@ -10,7 +10,7 @@ #include #include -#if DT_NODE_HAS_STATUS(DT_NODELABEL(adc1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(adc1)) #undef DT_DRV_COMPAT #define DT_DRV_COMPAT st_stm32_adc diff --git a/tests/drivers/clock_control/stm32_clock_configuration/stm32_common_devices/src/test_stm32_clock_configuration_i2c.c b/tests/drivers/clock_control/stm32_clock_configuration/stm32_common_devices/src/test_stm32_clock_configuration_i2c.c index 05a6dc0528f..5a1f1998289 100644 --- a/tests/drivers/clock_control/stm32_clock_configuration/stm32_common_devices/src/test_stm32_clock_configuration_i2c.c +++ b/tests/drivers/clock_control/stm32_clock_configuration/stm32_common_devices/src/test_stm32_clock_configuration_i2c.c @@ -11,7 +11,7 @@ #include #if !defined(CONFIG_SOC_SERIES_STM32F4X) -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(i2c1)) #if DT_HAS_COMPAT_STATUS_OKAY(st_stm32_i2c_v1) #define DT_DRV_COMPAT st_stm32_i2c_v1 diff --git a/tests/drivers/clock_control/stm32_clock_configuration/stm32_common_devices/src/test_stm32_clock_configuration_i2s.c b/tests/drivers/clock_control/stm32_clock_configuration/stm32_common_devices/src/test_stm32_clock_configuration_i2s.c index 4235f04207b..c4d9c37726b 100644 --- a/tests/drivers/clock_control/stm32_clock_configuration/stm32_common_devices/src/test_stm32_clock_configuration_i2s.c +++ b/tests/drivers/clock_control/stm32_clock_configuration/stm32_common_devices/src/test_stm32_clock_configuration_i2s.c @@ -10,7 +10,7 @@ #include #include -#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2s2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(i2s2)) #if DT_HAS_COMPAT_STATUS_OKAY(st_stm32_i2s) #define DT_DRV_COMPAT st_stm32_i2s diff --git a/tests/drivers/clock_control/stm32_clock_configuration/stm32_common_devices/src/test_stm32_clock_configuration_lptim.c b/tests/drivers/clock_control/stm32_clock_configuration/stm32_common_devices/src/test_stm32_clock_configuration_lptim.c index 3c85739dce9..0b04e0882e2 100644 --- a/tests/drivers/clock_control/stm32_clock_configuration/stm32_common_devices/src/test_stm32_clock_configuration_lptim.c +++ b/tests/drivers/clock_control/stm32_clock_configuration/stm32_common_devices/src/test_stm32_clock_configuration_lptim.c @@ -10,7 +10,7 @@ #include #include -#if DT_NODE_HAS_STATUS(DT_NODELABEL(lptim1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lptim1)) #undef DT_DRV_COMPAT #define DT_DRV_COMPAT st_stm32_lptim diff --git a/tests/drivers/clock_control/stm32_clock_configuration/stm32h7_devices/src/test_stm32_clock_configuration.c b/tests/drivers/clock_control/stm32_clock_configuration/stm32h7_devices/src/test_stm32_clock_configuration.c index d7b05edd7f6..aaa86026df4 100644 --- a/tests/drivers/clock_control/stm32_clock_configuration/stm32h7_devices/src/test_stm32_clock_configuration.c +++ b/tests/drivers/clock_control/stm32_clock_configuration/stm32h7_devices/src/test_stm32_clock_configuration.c @@ -80,7 +80,7 @@ ZTEST(stm32h7_devices_clocks, test_spi_clk_config) RCC_SPI123CLKSOURCE_CLKP, spi1_actual_domain_clk); /* Check perclk configuration */ -#if DT_NODE_HAS_STATUS(DT_NODELABEL(perck), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(perck)) uint32_t perclk_dt_domain_clk, perclk_actual_domain_clk; perclk_dt_domain_clk = DT_CLOCKS_CELL_BY_IDX(DT_NODELABEL(perck), 0, bus); diff --git a/tests/drivers/eeprom/api/src/main.c b/tests/drivers/eeprom/api/src/main.c index 5a14565cccb..5d311b7567d 100644 --- a/tests/drivers/eeprom/api/src/main.c +++ b/tests/drivers/eeprom/api/src/main.c @@ -185,9 +185,9 @@ void test_main(void) { run_tests_on_eeprom(DEVICE_DT_GET(DT_ALIAS(eeprom_0))); -#if DT_NODE_HAS_STATUS(DT_ALIAS(eeprom_1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_ALIAS(eeprom_1)) run_tests_on_eeprom(DEVICE_DT_GET(DT_ALIAS(eeprom_1))); -#endif /* DT_NODE_HAS_STATUS(DT_ALIAS(eeprom_1), okay) */ +#endif /* DT_NODE_HAS_STATUS_OKAY(DT_ALIAS(eeprom_1)) */ ztest_verify_all_test_suites_ran(); } diff --git a/tests/drivers/gpio/gpio_basic_api/src/main.c b/tests/drivers/gpio/gpio_basic_api/src/main.c index 67326505e98..3e11722cf8c 100644 --- a/tests/drivers/gpio/gpio_basic_api/src/main.c +++ b/tests/drivers/gpio/gpio_basic_api/src/main.c @@ -20,7 +20,7 @@ static void board_setup(void) { -#if DT_NODE_HAS_STATUS(DT_INST(0, test_gpio_basic_api), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_INST(0, test_gpio_basic_api)) /* PIN_IN and PIN_OUT must be on same controller. */ const struct device *const in_dev = DEVICE_DT_GET(DEV_OUT); const struct device *const out_dev = DEVICE_DT_GET(DEV_IN); diff --git a/tests/drivers/gpio/gpio_basic_api/src/test_gpio.h b/tests/drivers/gpio/gpio_basic_api/src/test_gpio.h index ba3d3ae5eba..78709937089 100644 --- a/tests/drivers/gpio/gpio_basic_api/src/test_gpio.h +++ b/tests/drivers/gpio/gpio_basic_api/src/test_gpio.h @@ -12,7 +12,7 @@ #include #include -#if DT_NODE_HAS_STATUS(DT_INST(0, test_gpio_basic_api), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_INST(0, test_gpio_basic_api)) /* Execution of the test requires hardware configuration described in * devicetree. See the test,gpio_basic_api binding local to this test @@ -29,11 +29,11 @@ #define PIN_IN DT_GPIO_PIN(DT_INST(0, test_gpio_basic_api), in_gpios) #define PIN_IN_FLAGS DT_GPIO_FLAGS(DT_INST(0, test_gpio_basic_api), in_gpios) -#elif DT_NODE_HAS_STATUS(DT_ALIAS(gpio_0), okay) +#elif DT_NODE_HAS_STATUS_OKAY(DT_ALIAS(gpio_0)) #define DEV DT_GPIO_CTLR(DT_ALIAS(gpio_0)) -#elif DT_NODE_HAS_STATUS(DT_ALIAS(gpio_1), okay) +#elif DT_NODE_HAS_STATUS_OKAY(DT_ALIAS(gpio_1)) #define DEV DT_GPIO_CTLR(DT_ALIAS(gpio_1)) -#elif DT_NODE_HAS_STATUS(DT_ALIAS(gpio_3), okay) +#elif DT_NODE_HAS_STATUS_OKAY(DT_ALIAS(gpio_3)) #define DEV DT_GPIO_CTLR(DT_ALIAS(gpio_3)) #else #error Unsupported board diff --git a/tests/drivers/gpio/gpio_reserved_ranges/src/main.c b/tests/drivers/gpio/gpio_reserved_ranges/src/main.c index 1a56df9adc0..351a525d2ea 100644 --- a/tests/drivers/gpio/gpio_reserved_ranges/src/main.c +++ b/tests/drivers/gpio/gpio_reserved_ranges/src/main.c @@ -33,12 +33,12 @@ ZTEST(gpio_reserved_ranges, test_path_props) ZTEST(gpio_reserved_ranges, test_has_status) { - zassert_equal(DT_NODE_HAS_STATUS(TEST_GPIO_1, okay), 1, ""); - zassert_equal(DT_NODE_HAS_STATUS(TEST_GPIO_2, okay), 1, ""); - zassert_equal(DT_NODE_HAS_STATUS(TEST_GPIO_3, okay), 1, ""); - zassert_equal(DT_NODE_HAS_STATUS(TEST_GPIO_4, okay), 1, ""); - zassert_equal(DT_NODE_HAS_STATUS(TEST_GPIO_5, okay), 1, ""); - zassert_equal(DT_NODE_HAS_STATUS(TEST_GPIO_6, okay), 1, ""); + zassert_equal(DT_NODE_HAS_STATUS_OKAY(TEST_GPIO_1), 1, ""); + zassert_equal(DT_NODE_HAS_STATUS_OKAY(TEST_GPIO_2), 1, ""); + zassert_equal(DT_NODE_HAS_STATUS_OKAY(TEST_GPIO_3), 1, ""); + zassert_equal(DT_NODE_HAS_STATUS_OKAY(TEST_GPIO_4), 1, ""); + zassert_equal(DT_NODE_HAS_STATUS_OKAY(TEST_GPIO_5), 1, ""); + zassert_equal(DT_NODE_HAS_STATUS_OKAY(TEST_GPIO_6), 1, ""); } ZTEST(gpio_reserved_ranges, test_reserved_ranges) diff --git a/tests/drivers/i2c/i2c_api/src/test_i2c.c b/tests/drivers/i2c/i2c_api/src/test_i2c.c index 9ed4162b04b..ce0256b4500 100644 --- a/tests/drivers/i2c/i2c_api/src/test_i2c.c +++ b/tests/drivers/i2c/i2c_api/src/test_i2c.c @@ -16,11 +16,11 @@ #include #include -#if DT_NODE_HAS_STATUS(DT_ALIAS(i2c_0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_ALIAS(i2c_0)) #define I2C_DEV_NODE DT_ALIAS(i2c_0) -#elif DT_NODE_HAS_STATUS(DT_ALIAS(i2c_1), okay) +#elif DT_NODE_HAS_STATUS_OKAY(DT_ALIAS(i2c_1)) #define I2C_DEV_NODE DT_ALIAS(i2c_1) -#elif DT_NODE_HAS_STATUS(DT_ALIAS(i2c_2), okay) +#elif DT_NODE_HAS_STATUS_OKAY(DT_ALIAS(i2c_2)) #define I2C_DEV_NODE DT_ALIAS(i2c_2) #else #error "Please set the correct I2C device" diff --git a/tests/drivers/i2c/i2c_ram/src/test_i2c_ram.c b/tests/drivers/i2c/i2c_ram/src/test_i2c_ram.c index 3992897d90f..8fb39de2517 100644 --- a/tests/drivers/i2c/i2c_ram/src/test_i2c_ram.c +++ b/tests/drivers/i2c/i2c_ram/src/test_i2c_ram.c @@ -20,7 +20,7 @@ #define RAM_ADDR (0b10100010 >> 1) -#if DT_NODE_HAS_STATUS(DT_ALIAS(i2c_ram), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_ALIAS(i2c_ram)) #define I2C_DEV_NODE DT_ALIAS(i2c_ram) #define TX_DATA_OFFSET 2 static uint8_t tx_data[9] = {0x00, 0x00, 'Z', 'e', 'p', 'h', 'y', 'r', '\n'}; diff --git a/tests/drivers/i2c/i2c_tca954x/src/main.c b/tests/drivers/i2c/i2c_tca954x/src/main.c index 5524b1ed4dd..c5433f93a4a 100644 --- a/tests/drivers/i2c/i2c_tca954x/src/main.c +++ b/tests/drivers/i2c/i2c_tca954x/src/main.c @@ -8,13 +8,13 @@ #include #include -#if DT_NODE_HAS_STATUS(DT_ALIAS(i2c_channel_0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_ALIAS(i2c_channel_0)) #define I2C_0_CTRL_NODE_ID DT_ALIAS(i2c_channel_0) #else #error "I2C 0 controller device not found" #endif -#if DT_NODE_HAS_STATUS(DT_ALIAS(i2c_channel_1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_ALIAS(i2c_channel_1)) #define I2C_1_CTRL_NODE_ID DT_ALIAS(i2c_channel_1) #else #error "I2C 1 controller device not found" diff --git a/tests/drivers/memc/ram/src/main.c b/tests/drivers/memc/ram/src/main.c index c8de856aa46..666f422da51 100644 --- a/tests/drivers/memc/ram/src/main.c +++ b/tests/drivers/memc/ram/src/main.c @@ -32,23 +32,23 @@ static void test_ram_rw(uint32_t *mem, size_t size) } } -#if DT_NODE_HAS_STATUS(DT_NODELABEL(sdram1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(sdram1)) BUF_DEF(sdram1); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(sdram2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(sdram2)) BUF_DEF(sdram2); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(sram1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(sram1)) BUF_DEF(sram1); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(sram2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(sram2)) BUF_DEF(sram2); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(memc), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(memc)) BUF_DEF(psram); #endif -#if DT_NODE_HAS_STATUS(DT_NODELABEL(ram0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ram0)) #define RAM_SIZE DT_REG_SIZE(DT_NODELABEL(ram0)) static uint32_t *buf_ram0 = (uint32_t *)DT_REG_ADDR(DT_NODELABEL(ram0)); #endif @@ -57,7 +57,7 @@ ZTEST_SUITE(test_ram, NULL, NULL, NULL, NULL, NULL); ZTEST(test_ram, test_sdram1) { -#if DT_NODE_HAS_STATUS(DT_NODELABEL(sdram1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(sdram1)) test_ram_rw(buf_sdram1, BUF_SIZE); #else ztest_test_skip(); @@ -66,7 +66,7 @@ ZTEST(test_ram, test_sdram1) ZTEST(test_ram, test_ram0) { -#if DT_NODE_HAS_STATUS(DT_NODELABEL(ram0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(ram0)) test_ram_rw(buf_ram0, RAM_SIZE); #else ztest_test_skip(); @@ -75,7 +75,7 @@ ZTEST(test_ram, test_ram0) ZTEST(test_ram, test_sdram2) { -#if DT_NODE_HAS_STATUS(DT_NODELABEL(sdram2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(sdram2)) test_ram_rw(buf_sdram2, BUF_SIZE); #else ztest_test_skip(); @@ -84,7 +84,7 @@ ZTEST(test_ram, test_sdram2) ZTEST(test_ram, test_sram1) { -#if DT_NODE_HAS_STATUS(DT_NODELABEL(sram1), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(sram1)) test_ram_rw(buf_sram1, BUF_SIZE); #else ztest_test_skip(); @@ -93,7 +93,7 @@ ZTEST(test_ram, test_sram1) ZTEST(test_ram, test_sram2) { -#if DT_NODE_HAS_STATUS(DT_NODELABEL(sram2), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(sram2)) test_ram_rw(buf_sram2, BUF_SIZE); #else ztest_test_skip(); @@ -102,7 +102,7 @@ ZTEST(test_ram, test_sram2) ZTEST(test_ram, test_psram) { -#if DT_NODE_HAS_STATUS(DT_NODELABEL(memc), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(memc)) test_ram_rw(buf_psram, BUF_SIZE); #else ztest_test_skip(); diff --git a/tests/drivers/pwm/pwm_api/src/test_pwm.c b/tests/drivers/pwm/pwm_api/src/test_pwm.c index b5fc72b37e8..69a4dcaeacc 100644 --- a/tests/drivers/pwm/pwm_api/src/test_pwm.c +++ b/tests/drivers/pwm/pwm_api/src/test_pwm.c @@ -29,13 +29,13 @@ #include #include -#if DT_NODE_HAS_STATUS(DT_ALIAS(pwm_0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_ALIAS(pwm_0)) #define PWM_DEV_NODE DT_ALIAS(pwm_0) -#elif DT_NODE_HAS_STATUS(DT_ALIAS(pwm_1), okay) +#elif DT_NODE_HAS_STATUS_OKAY(DT_ALIAS(pwm_1)) #define PWM_DEV_NODE DT_ALIAS(pwm_1) -#elif DT_NODE_HAS_STATUS(DT_ALIAS(pwm_2), okay) +#elif DT_NODE_HAS_STATUS_OKAY(DT_ALIAS(pwm_2)) #define PWM_DEV_NODE DT_ALIAS(pwm_2) -#elif DT_NODE_HAS_STATUS(DT_ALIAS(pwm_3), okay) +#elif DT_NODE_HAS_STATUS_OKAY(DT_ALIAS(pwm_3)) #define PWM_DEV_NODE DT_ALIAS(pwm_3) #elif DT_HAS_COMPAT_STATUS_OKAY(nordic_nrf_pwm) diff --git a/tests/drivers/smbus/smbus_api/src/test_smbus.c b/tests/drivers/smbus/smbus_api/src/test_smbus.c index 5d1dd9ca49a..7743e04fbda 100644 --- a/tests/drivers/smbus/smbus_api/src/test_smbus.c +++ b/tests/drivers/smbus/smbus_api/src/test_smbus.c @@ -14,7 +14,7 @@ #include -BUILD_ASSERT(DT_NODE_HAS_STATUS(DT_NODELABEL(smbus0), okay), +BUILD_ASSERT(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(smbus0)), "SMBus node is disabled!"); #define FAKE_ADDRESS 0x10 diff --git a/tests/drivers/smbus/smbus_api/src/test_smbus_qemu.c b/tests/drivers/smbus/smbus_api/src/test_smbus_qemu.c index 74d8ba4408e..182794e7dc9 100644 --- a/tests/drivers/smbus/smbus_api/src/test_smbus_qemu.c +++ b/tests/drivers/smbus/smbus_api/src/test_smbus_qemu.c @@ -16,7 +16,7 @@ #include #include -BUILD_ASSERT(DT_NODE_HAS_STATUS(DT_NODELABEL(smbus0), okay), +BUILD_ASSERT(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(smbus0)), "SMBus node is disabled!"); /* Qemu q35 has default emulated EEPROM-like devices */ diff --git a/tests/drivers/watchdog/wdt_basic_api/src/test_wdt.c b/tests/drivers/watchdog/wdt_basic_api/src/test_wdt.c index 3166176de43..353d189db54 100644 --- a/tests/drivers/watchdog/wdt_basic_api/src/test_wdt.c +++ b/tests/drivers/watchdog/wdt_basic_api/src/test_wdt.c @@ -66,7 +66,7 @@ * 'watchdog0' property, or one of the following watchdog compatibles * must have an enabled node. */ -#if DT_NODE_HAS_STATUS(DT_ALIAS(watchdog0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_ALIAS(watchdog0)) #define WDT_NODE DT_ALIAS(watchdog0) #elif DT_HAS_COMPAT_STATUS_OKAY(st_stm32_window_watchdog) #define WDT_NODE DT_INST(0, st_stm32_window_watchdog) @@ -148,7 +148,7 @@ static struct wdt_timeout_cfg m_cfg_wdt1; #define DATATYPE uint32_t #endif -#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm)) #define NOINIT_SECTION ".dtcm_noinit.test_wdt" #else #define NOINIT_SECTION ".noinit.test_wdt" diff --git a/tests/drivers/watchdog/wdt_basic_reset_none/src/main.c b/tests/drivers/watchdog/wdt_basic_reset_none/src/main.c index 6a025a1478c..9fa3e0bd752 100644 --- a/tests/drivers/watchdog/wdt_basic_reset_none/src/main.c +++ b/tests/drivers/watchdog/wdt_basic_reset_none/src/main.c @@ -13,7 +13,7 @@ * 'watchdog0' property, or one of the following watchdog compatibles * must have an enabled node. */ -#if DT_NODE_HAS_STATUS(DT_ALIAS(watchdog0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_ALIAS(watchdog0)) #define WDT_NODE DT_ALIAS(watchdog0) #elif DT_HAS_COMPAT_STATUS_OKAY(nxp_s32_swt) #define WDT_NODE DT_INST(0, nxp_s32_swt) diff --git a/tests/drivers/watchdog/wdt_error_cases/src/main.c b/tests/drivers/watchdog/wdt_error_cases/src/main.c index c1adc43eea3..b05bedf01c3 100644 --- a/tests/drivers/watchdog/wdt_error_cases/src/main.c +++ b/tests/drivers/watchdog/wdt_error_cases/src/main.c @@ -13,7 +13,7 @@ * 'watchdog0' property, or one of the following watchdog compatibles * must have an enabled node. */ -#if DT_NODE_HAS_STATUS(DT_ALIAS(watchdog0), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_ALIAS(watchdog0)) #define WDT_NODE DT_ALIAS(watchdog0) #elif DT_HAS_COMPAT_STATUS_OKAY(nordic_nrf_wdt) #define WDT_NODE DT_INST(0, nordic_nrf_wdt) @@ -21,7 +21,7 @@ #define WDT_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(zephyr_counter_watchdog) #endif -#if DT_NODE_HAS_STATUS(DT_CHOSEN(zephyr_dtcm), okay) +#if DT_NODE_HAS_STATUS_OKAY(DT_CHOSEN(zephyr_dtcm)) #define NOINIT_SECTION ".dtcm_noinit.test_wdt" #else #define NOINIT_SECTION ".noinit.test_wdt"