From: Isaac True <isaac.true@canonical.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Rob Herring <robh@kernel.org>,
linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org,
wim@linux-watchdog.org
Subject: Re: [PATCH 2/2] watchdog: gpio: add configurable minimum interval
Date: Mon, 4 Jul 2022 13:05:04 +0200 [thread overview]
Message-ID: <CALkPoPYKNxAeP6HM1cMh1zzW6jw4fktCp42b7+79Qf8DVJis-w@mail.gmail.com> (raw)
In-Reply-To: <0d045bb8-a519-39d4-17fa-123f90969bd9@roeck-us.net>
On Fri, 1 Jul 2022 at 19:48, Guenter Roeck <linux@roeck-us.net> wrote:
>
> On 7/1/22 10:18, Rob Herring wrote:
> > On Wed, Jun 29, 2022 at 01:06:26PM +0200, Isaac True wrote:
> >> Add the "min_hw_margin_ms" parameter to gpio_wdt devices, allowing a
> >> minimum interval to be specified, stopping watchdog devices from being
> >> fed too quickly if they require a certain interval between feeds.
> >
> > I assume there is some real platform with a real problem you are trying
> > to solve? Details please.
> >
>
> Agreed, this should be explained in more detail.
Yes this is a real platform using a TI TPS3850 watchdog chip. With
this chip you can configure a "window" which can detect early faults
(i.e. too frequent) in addition to the standard watchdog features. I
needed to add this minimum timeout to avoid watchdog resets in
situations such as where first U-Boot and then the Linux kernel feed
the watchdog with too short of an interval between them, or when
systemd was configured to use the watchdog device and was feeding it
too soon after taking over from the kernel.
> > Can you just hardcode some min? Maybe 10% of the max or something. Is
> > there a downside to a larger than necessary min?
> >
>
> That would result in extra overhead in the watchdog core which would not
> be required for all other hardware using this driver. I'd rather avoid that.
>
In the case of the TI TPS3850, the minimum timeout is configurable, so
I didn't want to add a hard-coded value to the driver.
> > Wouldn't be better to fix this without requiring a DT change and that
> > could work on stable kernels if needed.
> >
>
> Presumably that is some new hardware. Most of the watchdog drivers
> needing this value can derive it from the compatible property. The
> gpio watchdog driver is a bit different since it is supposed to work
> on a variety of hardware using gpio pins for watchdog control.
>
Yes this is new hardware. This use case is also not very common as
most watchdog chips don't have this window function or a minimum
interval, at least in my experience, so I did not want to make it the
default for everything.
next prev parent reply other threads:[~2022-07-04 11:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-29 11:06 [PATCH 1/2] dt-bindings: watchdog: gpio: add minimum interval Isaac True
2022-06-29 11:06 ` [PATCH 2/2] watchdog: gpio: add configurable " Isaac True
2022-07-01 17:18 ` Rob Herring
2022-07-01 17:48 ` Guenter Roeck
2022-07-04 11:05 ` Isaac True [this message]
2022-07-05 19:56 ` Rob Herring
2022-07-07 9:00 ` Isaac True
2022-07-08 11:44 ` Guenter Roeck
2022-07-12 21:04 ` Rob Herring
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=CALkPoPYKNxAeP6HM1cMh1zzW6jw4fktCp42b7+79Qf8DVJis-w@mail.gmail.com \
--to=isaac.true@canonical.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=robh@kernel.org \
--cc=wim@linux-watchdog.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).