diff --git a/drivers/timer/nrf_grtc_timer.c b/drivers/timer/nrf_grtc_timer.c index a706c04bae..8ac357864c 100644 --- a/drivers/timer/nrf_grtc_timer.c +++ b/drivers/timer/nrf_grtc_timer.c @@ -7,7 +7,9 @@ #include #include #include +#if defined(CONFIG_CLOCK_CONTROL_NRF) #include +#endif #include #include #include @@ -521,6 +523,7 @@ static int sys_clock_driver_init(void) system_timeout_set(CYC_PER_TICK); } +#if defined(CONFIG_CLOCK_CONTROL_NRF) static const enum nrf_lfclk_start_mode mode = IS_ENABLED(CONFIG_SYSTEM_CLOCK_NO_WAIT) ? CLOCK_CONTROL_NRF_LF_START_NOWAIT @@ -529,6 +532,7 @@ static int sys_clock_driver_init(void) : CLOCK_CONTROL_NRF_LF_START_STABLE); z_nrf_clock_control_lf_on(mode); +#endif return 0; }