Skip to content

Commit 8d46fca

Browse files
M-Vaittinengregkh
authored andcommitted
rtc: bd70528: fix driver dependencies
[ Upstream commit 41a8e19 ] With CONFIG_BD70528_WATCHDOG=m, a built-in rtc driver cannot call into the low-level functions that are part of the watchdog module: drivers/rtc/rtc-bd70528.o: In function `bd70528_set_time': rtc-bd70528.c:(.text+0x22c): undefined reference to `bd70528_wdt_lock' rtc-bd70528.c:(.text+0x2a8): undefined reference to `bd70528_wdt_unlock' drivers/rtc/rtc-bd70528.o: In function `bd70528_set_rtc_based_timers': rtc-bd70528.c:(.text+0x50c): undefined reference to `bd70528_wdt_set' Add a Kconfig dependency which forces RTC to be a module if watchdog is a module. If watchdog is not compiled at all the stub functions for watchdog control are used. compiling the RTC without watchdog is fine. Fixes: 32a4a4e ("rtc: bd70528: Initial support for ROHM bd70528 RTC") Suggested-by: Arnd Bergmann <arnd@arndb.de> Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Link: https://lore.kernel.org/r/84462e01e43d39024948a3bdd24087ff87dc2255.1565591387.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent afa6eca commit 8d46fca

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/rtc/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,7 @@ config RTC_DRV_M41T80_WDT
500500
watchdog timer in the ST M41T60 and M41T80 RTC chips series.
501501
config RTC_DRV_BD70528
502502
tristate "ROHM BD70528 PMIC RTC"
503+
depends on MFD_ROHM_BD70528 && (BD70528_WATCHDOG || !BD70528_WATCHDOG)
503504
help
504505
If you say Y here you will get support for the RTC
505506
on ROHM BD70528 Power Management IC.

0 commit comments

Comments
 (0)