From bb065262bc8ea42ab56eda1d4e142b2e9c0ec617 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20G=C5=82=C4=85bek?= Date: Wed, 31 Jan 2024 15:30:27 +0100 Subject: [PATCH] drivers: timer: nrf_grtc_timer: Add dependency on nRF clock control MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... in the related parts, so that the driver can be used on nRF54H20 where the clock control is not present yet. Signed-off-by: Andrzej Głąbek --- drivers/timer/nrf_grtc_timer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/timer/nrf_grtc_timer.c b/drivers/timer/nrf_grtc_timer.c index a706c04bae0..8ac357864cc 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; }