Skip to contentSkip to conversation

rtc: ds1374: fix RTC_DRV_DS1374_WDT dependencies

PATCH In review Alexandre Belloni 2 participants 3 messages Jul 20, 2020 – Jul 21, 2020 Real time clock (RTC)

lore
Share & tools
lore

Alexandre Belloni

author maintainer
#0 lore raw

PATCH 1/2 rtc: ds1374: fix RTC_DRV_DS1374_WDT dependencies

It is not enough to select WATCHDOG_CORE, the watchdog part of the driver now also depends on WATCHDOG. This is currently the best we can do because alarm support and watchdog support are mutually exclusive.

---
 drivers/rtc/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/rtc/Kconfig +2 -2
index c25d51f35f0c..2753e0f54cc3 100644
@@ -281,8 +281,8 @@ config RTC_DRV_DS1374
 
 config RTC_DRV_DS1374_WDT
 	bool "Dallas/Maxim DS1374 watchdog timer"
-	depends on RTC_DRV_DS1374
-	select WATCHDOG_CORE if WATCHDOG
+	depends on RTC_DRV_DS1374 && WATCHDOG
+	select WATCHDOG_CORE
 	help
 	  If you say Y here you will get support for the
 	  watchdog timer in the Dallas Semiconductor DS1374
Signature · 1 line
2.26.2
author maintainer
#1 lore raw

PATCH 2/2 rtc: ds1374: remove unused define

Remove unused define and fix typo where it should have been used.

---
 drivers/rtc/rtc-ds1374.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/rtc/rtc-ds1374.c +1 -3
index c71065d26cd2..177d870bda0d 100644
@@ -377,8 +377,6 @@ static const struct rtc_class_ops ds1374_rtc_ops = {
 #define TIMER_MARGIN_MIN	1
 #define TIMER_MARGIN_MAX	4095 /* 24-bit value */
 
-#define DRV_NAME "DS1374 Watchdog"
-
 static int wdt_margin;
 module_param(wdt_margin, int, 0);
 MODULE_PARM_DESC(wdt_margin, "Watchdog timeout in seconds (default 32s)");
@@ -389,7 +387,7 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default ="
 		__MODULE_STRING(WATCHDOG_NOWAYOUT)")");
 
 static const struct watchdog_info ds1374_wdt_info = {
-	.identity       = "DS1374 WTD",
+	.identity       = "DS1374 Watchdog",
 	.options        = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING |
 						WDIOF_MAGICCLOSE,
 };
Signature · 1 line
2.26.2
Acked-by on v1 1/2
#2 lore raw
In reply to Alexandre Belloni
Quoted 6 lines · Alexandre Belloni

It is not enough to select WATCHDOG_CORE, the watchdog part of the driver now also depends on WATCHDOG. This is currently the best we can do because alarm support and watchdog support are mutually exclusive.

Thanks.

Quoted 20 lines
---
 drivers/rtc/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/rtc/Kconfig +2 -2
index c25d51f35f0c..2753e0f54cc3 100644
@@ -281,8 +281,8 @@ config RTC_DRV_DS1374
 
 config RTC_DRV_DS1374_WDT
 	bool "Dallas/Maxim DS1374 watchdog timer"
-	depends on RTC_DRV_DS1374
-	select WATCHDOG_CORE if WATCHDOG
+	depends on RTC_DRV_DS1374 && WATCHDOG
+	select WATCHDOG_CORE
 	help
 	  If you say Y here you will get support for the
 	  watchdog timer in the Dallas Semiconductor DS1374
Signature · 1 line
~Randy