* [PATCH 0/2] rtc: m41t93: fix missing subsystem dependencies
@ 2026-11-30 13:38 Pengpeng Hou
2026-11-30 13:38 ` [PATCH 1/2] rtc: m41t93: select REGMAP_SPI Pengpeng Hou
2026-11-30 13:38 ` [PATCH 2/2] rtc: m41t93: select the watchdog core when enabled Pengpeng Hou
0 siblings, 2 replies; 3+ messages in thread
From: Pengpeng Hou @ 2026-11-30 13:38 UTC (permalink / raw)
To: alexandre.belloni
Cc: linux-rtc, wim, linux, linux-watchdog, linux-kernel, hppiscas
The M41T93 driver creates an SPI regmap and, when WATCHDOG is enabled,
registers with the watchdog core. Neither provider is selected by the RTC
configuration.
Select the SPI backend first, then select the watchdog core conditionally
without silently disabling the watchdog functionality.
The issues were found by our static-analysis tool and manually reviewed.
AI assistance: gpt 5 (patch preparation and review).
Pengpeng Hou (2):
rtc: m41t93: select REGMAP_SPI
rtc: m41t93: select the watchdog core when enabled
drivers/rtc/Kconfig | 2 ++
1 file changed, 2 insertions(+)
base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] rtc: m41t93: select REGMAP_SPI
2026-11-30 13:38 [PATCH 0/2] rtc: m41t93: fix missing subsystem dependencies Pengpeng Hou
@ 2026-11-30 13:38 ` Pengpeng Hou
2026-11-30 13:38 ` [PATCH 2/2] rtc: m41t93: select the watchdog core when enabled Pengpeng Hou
1 sibling, 0 replies; 3+ messages in thread
From: Pengpeng Hou @ 2026-11-30 13:38 UTC (permalink / raw)
To: alexandre.belloni
Cc: linux-rtc, wim, linux, linux-watchdog, linux-kernel, hppiscas
rtc-m41t93.c initializes an SPI regmap using devm_regmap_init_spi(),
but RTC_DRV_M41T93 does not select REGMAP_SPI. The driver can
therefore be enabled without the required register-transport
implementation and fail to build.
Select REGMAP_SPI so the backend is enabled at the linkage level
required by this consumer, rather than relying on another driver to
pull it in.
The issue was found by our static-analysis tool and manually reviewed.
Fixes: d86e8682593c ("rtc: m41t93: migrate to regmap api for register access")
Signed-off-by: Pengpeng Hou <hppiscas@163.com>
---
AI assistance: gpt 5 (patch preparation and review).
drivers/rtc/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 73ec923..8f9e59a 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -816,6 +816,7 @@ if SPI_MASTER
config RTC_DRV_M41T93
tristate "ST M41T93"
+ select REGMAP_SPI
help
If you say yes here you will get support for the
ST M41T93 SPI RTC chip.
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH 2/2] rtc: m41t93: select the watchdog core when enabled
2026-11-30 13:38 [PATCH 0/2] rtc: m41t93: fix missing subsystem dependencies Pengpeng Hou
2026-11-30 13:38 ` [PATCH 1/2] rtc: m41t93: select REGMAP_SPI Pengpeng Hou
@ 2026-11-30 13:38 ` Pengpeng Hou
1 sibling, 0 replies; 3+ messages in thread
From: Pengpeng Hou @ 2026-11-30 13:38 UTC (permalink / raw)
To: alexandre.belloni
Cc: linux-rtc, wim, linux, linux-watchdog, linux-kernel, hppiscas
The M41T93 driver compiles its watchdog data, operations and
registration under CONFIG_WATCHDOG. That top-level switch does not
ensure that WATCHDOG_CORE is linked at the level required by the RTC
driver. RTC_DRV_M41T93=y with WATCHDOG_CORE=m therefore leaves an
unresolved devm_watchdog_register_device() reference.
Select WATCHDOG_CORE when WATCHDOG is enabled. This preserves
watchdog registration when requested, rather than silently omitting
it from a built-in RTC driver. The DS1307, ABX80X and PCF2127 RTC
drivers already use the same conditional selection.
The issue was found by our static-analysis tool and manually reviewed.
Fixes: 15ec2ce19962 ("rtc: m41t93: Add watchdog support")
Signed-off-by: Pengpeng Hou <hppiscas@163.com>
---
AI assistance: gpt 5 (patch preparation and review).
drivers/rtc/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 8f9e59a..bfbe7e4 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -817,6 +817,7 @@ if SPI_MASTER
config RTC_DRV_M41T93
tristate "ST M41T93"
select REGMAP_SPI
+ select WATCHDOG_CORE if WATCHDOG
help
If you say yes here you will get support for the
ST M41T93 SPI RTC chip.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-30 13:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-30 13:38 [PATCH 0/2] rtc: m41t93: fix missing subsystem dependencies Pengpeng Hou
2026-11-30 13:38 ` [PATCH 1/2] rtc: m41t93: select REGMAP_SPI Pengpeng Hou
2026-11-30 13:38 ` [PATCH 2/2] rtc: m41t93: select the watchdog core when enabled Pengpeng Hou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®