All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: "Tilki, Ibrahim" <Ibrahim.Tilki@analog.com>,
	"a.zummo@towertech.it" <a.zummo@towertech.it>,
	"alexandre.belloni@bootlin.com" <alexandre.belloni@bootlin.com>,
	"jdelvare@suse.com" <jdelvare@suse.com>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"krzysztof.kozlowski+dt@linaro.org" 
	<krzysztof.kozlowski+dt@linaro.org>
Cc: "linux-rtc@vger.kernel.org" <linux-rtc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"Arslanbenzer, Zeynep" <Zeynep.Arslanbenzer@analog.com>
Subject: Re: [PATCH 1/2] drivers: rtc: add max313xx series rtc driver
Date: Thu, 20 Oct 2022 11:57:28 -0700	[thread overview]
Message-ID: <ba17a8b0-bd35-d172-fced-222ffa771ace@roeck-us.net> (raw)
In-Reply-To: <DM8PR03MB624786DEF5E135986ECB7B1F962A9@DM8PR03MB6247.namprd03.prod.outlook.com>

On 10/20/22 07:47, Tilki, Ibrahim wrote:
> ...
> 
>>> +
>>> +static int max313xx_wdt_ping(struct watchdog_device *wdd)
>>> +{
>>> +	int ret;
>>> +
>>> +	ret = max313xx_wdt_stop(wdd);
>>> +	if (ret)
>>> +		return ret;
>>> +
>>> +	return max313xx_wdt_start(wdd);
>>
>> Having to stop a watchdog just to ping it is unusual. Is this really
>> necessary ?
>>
> 
> Unfortunately RTCs do not have any other way of resetting timer counter
> other than restarting the timer.
> 

That is a bit too generic. I sampled a couple of rtc drivers implementing
watchdog support, and they all support pinging the watchdog without
stopping it (or, in other words, they have explicit watchdog support).

Looking at one of the chip datasheets, I would argue that the timers
on that chip series are not really suitable (nor intended) to support
watchdog functionality. They are real time alarm timers. They don't
generate an alarm N seconds in the future, but at specific times/dates.
That means that updating the time would interfere with watchdog functionality.
That is way too fragile to be usable as watchdog timer.

I would suggest to drop watchdog support from this driver.

Thanks,
Guenter


  reply	other threads:[~2022-10-20 18:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-19 13:39 [PATCH 1/2] drivers: rtc: add max313xx series rtc driver Ibrahim Tilki
2022-10-19 13:39 ` [PATCH 2/2] dt-bindings: rtc: add bindings for max313xx RTCs Ibrahim Tilki
2022-10-19 14:34   ` Krzysztof Kozlowski
2022-10-19 15:34     ` Guenter Roeck
2022-10-20 14:25       ` Tilki, Ibrahim
2022-10-20 15:33   ` Krzysztof Kozlowski
2022-10-20 21:13   ` Alexandre Belloni
2022-10-21 11:44     ` Tilki, Ibrahim
2022-10-21 12:29       ` Alexandre Belloni
2022-10-21 13:05         ` Tilki, Ibrahim
2022-10-21 13:40           ` Krzysztof Kozlowski
2022-10-21 13:56             ` Tilki, Ibrahim
2022-10-19 15:29 ` [PATCH 1/2] drivers: rtc: add max313xx series rtc driver Guenter Roeck
2022-10-20 14:47   ` Tilki, Ibrahim
2022-10-20 18:57     ` Guenter Roeck [this message]
2022-10-20 21:01 ` Alexandre Belloni
2022-10-21  8:34 ` kernel test robot
2022-10-22  3:15 ` kernel test robot
2022-10-22  6:07 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ba17a8b0-bd35-d172-fced-222ffa771ace@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=Ibrahim.Tilki@analog.com \
    --cc=Zeynep.Arslanbenzer@analog.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.