From 2cd4681bd5dcb5a78c845a1676b0aed9915b4001 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Wed, 15 Apr 2020 17:04:03 -0500 Subject: [PATCH] drivers: timer: sam0_rtc_timer: Fix incorrect DT_INST conversion clock-generator is a normal property. To access it we should use DT_INST_PROP(0, clock_generator) and not DT_INST_CLOCKS_CELL(). Fixes: #24399 Signed-off-by: Kumar Gala --- drivers/timer/sam0_rtc_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/timer/sam0_rtc_timer.c b/drivers/timer/sam0_rtc_timer.c index 3a94fb03487..fa3280701b0 100644 --- a/drivers/timer/sam0_rtc_timer.c +++ b/drivers/timer/sam0_rtc_timer.c @@ -186,7 +186,7 @@ int z_clock_driver_init(struct device *device) /* Set up bus clock and GCLK generator. */ PM->APBAMASK.reg |= PM_APBAMASK_RTC; GCLK->CLKCTRL.reg = GCLK_CLKCTRL_ID(RTC_GCLK_ID) | GCLK_CLKCTRL_CLKEN - | GCLK_GEN(DT_INST_CLOCKS_CELL(0, generator)); + | GCLK_GEN(DT_INST_PROP(0, clock_generator)); /* Synchronize GCLK. */ while (GCLK->STATUS.bit.SYNCBUSY) {