Linux-RTC Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 1/2] rtc: ds1374: fix RTC_DRV_DS1374_WDT dependencies
@ 2020-07-20  7:52 Alexandre Belloni
  2020-07-20  7:52 ` [PATCH 2/2] rtc: ds1374: remove unused define Alexandre Belloni
  2020-07-21  2:39 ` [PATCH 1/2] rtc: ds1374: fix RTC_DRV_DS1374_WDT dependencies Randy Dunlap
  0 siblings, 2 replies; 3+ messages in thread
From: Alexandre Belloni @ 2020-07-20  7:52 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni; +Cc: Randy Dunlap, linux-rtc, linux-kernel

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.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/rtc/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index c25d51f35f0c..2753e0f54cc3 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -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
-- 
2.26.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] rtc: ds1374: remove unused define
  2020-07-20  7:52 [PATCH 1/2] rtc: ds1374: fix RTC_DRV_DS1374_WDT dependencies Alexandre Belloni
@ 2020-07-20  7:52 ` Alexandre Belloni
  2020-07-21  2:39 ` [PATCH 1/2] rtc: ds1374: fix RTC_DRV_DS1374_WDT dependencies Randy Dunlap
  1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Belloni @ 2020-07-20  7:52 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni; +Cc: linux-rtc, linux-kernel

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

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/rtc/rtc-ds1374.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/rtc/rtc-ds1374.c b/drivers/rtc/rtc-ds1374.c
index c71065d26cd2..177d870bda0d 100644
--- a/drivers/rtc/rtc-ds1374.c
+++ b/drivers/rtc/rtc-ds1374.c
@@ -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,
 };
-- 
2.26.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] rtc: ds1374: fix RTC_DRV_DS1374_WDT dependencies
  2020-07-20  7:52 [PATCH 1/2] rtc: ds1374: fix RTC_DRV_DS1374_WDT dependencies Alexandre Belloni
  2020-07-20  7:52 ` [PATCH 2/2] rtc: ds1374: remove unused define Alexandre Belloni
@ 2020-07-21  2:39 ` Randy Dunlap
  1 sibling, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2020-07-21  2:39 UTC (permalink / raw)
  To: Alexandre Belloni, Alessandro Zummo; +Cc: linux-rtc, linux-kernel

On 7/20/20 12:52 AM, Alexandre Belloni wrote:
> 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.
> 
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested

Thanks.

> ---
>  drivers/rtc/Kconfig | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
> index c25d51f35f0c..2753e0f54cc3 100644
> --- a/drivers/rtc/Kconfig
> +++ b/drivers/rtc/Kconfig
> @@ -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
> 


-- 
~Randy


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-20  7:52 [PATCH 1/2] rtc: ds1374: fix RTC_DRV_DS1374_WDT dependencies Alexandre Belloni
2020-07-20  7:52 ` [PATCH 2/2] rtc: ds1374: remove unused define Alexandre Belloni
2020-07-21  2:39 ` [PATCH 1/2] rtc: ds1374: fix RTC_DRV_DS1374_WDT dependencies Randy Dunlap

Linux-RTC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rtc/0 linux-rtc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rtc linux-rtc/ https://lore.kernel.org/linux-rtc \
		linux-rtc@vger.kernel.org
	public-inbox-index linux-rtc

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rtc


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git