From 6d0a94d234100f91f28cef29205dc3fd757097f4 Mon Sep 17 00:00:00 2001 From: Marcin Lyda Date: Fri, 10 Jan 2025 10:56:51 +0100 Subject: [PATCH] drivers: rtc: Fix failing RV8803 driver build when int-gpios not used This PR fixes the issue that building the driver with either CONFIG_RTC_CALIBRATION=y or CONFIG_RTC_ALARM=y and without 'int-gpios' used will cause 'undefined reference to `rv8803_write_reg8'' error. Signed-off-by: Marcin Lyda --- drivers/rtc/rtc_rv8803.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc_rv8803.c b/drivers/rtc/rtc_rv8803.c index 01fbb157f893..2a2b910b333e 100644 --- a/drivers/rtc/rtc_rv8803.c +++ b/drivers/rtc/rtc_rv8803.c @@ -205,7 +205,7 @@ static int rv8803_write_regs(const struct device *dev, uint8_t addr, const void return err; } -#ifdef RV8803_INT_GPIOS_IN_USE +#if defined(RV8803_INT_GPIOS_IN_USE) || defined(CONFIG_RTC_ALARM) || defined(CONFIG_RTC_CALIBRATION) static int rv8803_write_reg8(const struct device *dev, uint8_t addr, uint8_t val) { return rv8803_write_regs(dev, addr, &val, sizeof(val));