Skip to content

Commit

Permalink
drivers: rtc: Fix failing RV8803 driver build when int-gpios not used
Browse files Browse the repository at this point in the history
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 <elektromarcin@gmail.com>
  • Loading branch information
Lefucjusz authored and kartben committed Jan 14, 2025
1 parent f7df2a7 commit f0a70b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/rtc/rtc_rv8803.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit f0a70b0

Please sign in to comment.