All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>, Rob Herring <robh+dt@kernel.org>
Cc: Guenter Roeck <linux@roeck-us.net>,
	devicetree@vger.kernel.org, linux-watchdog@vger.kernel.org,
	kernel@pengutronix.de, Wim Van Sebroeck <wim@linux-watchdog.org>,
	Frank Rowand <frowand.list@gmail.com>
Subject: dt-binding to define default watchdog and machine reset (Was: Re: [RFC] Using a watchdog as system reset)
Date: Wed, 7 Oct 2020 12:18:35 +0200	[thread overview]
Message-ID: <20201007101835.yhlbjfpklepfodgw@pengutronix.de> (raw)
In-Reply-To: <04e33d49-4210-9dcd-040c-35059e0619ba@pengutronix.de>

[-- Attachment #1: Type: text/plain, Size: 1904 bytes --]

Hello,

[promoted Rob from Cc: to To: and adapted the subject in the hope to get
some feedback]

On Wed, Oct 07, 2020 at 09:25:30AM +0200, Ahmad Fatoum wrote:
> On 10/7/20 9:12 AM, Uwe Kleine-König wrote:
> > On Tue, Oct 06, 2020 at 02:04:10PM -0700, Guenter Roeck wrote:
> >> With that in mind, your other option kind of makes sense. The only
> >> question would be how to express this in devicetree. I am certainly
> >> open to accepting a patch introducing such a property/functionality
> >> into the watchdog core.
> > 
> > OK, will try to come up with a patch.
> 
> Instead of having a `provide-system-reset' property, how about providing
> it unconditionally, but with a very low priority?
> 
> This can be coupled with Guenther's suggestion of having a dynamic
> way to set the priority, e.g. a `watchdog-priority' property in the device
> tree that's common to all watchdogs? That's the way barebox is handling
> multiple watchdogs (default value in driver overridable in DT and at runtime).

OK, I'll try to put this in more verbose words:

Let's introduce a generic watchdog property `watchdog-priority' that
provides a u32 to order the watchdogs for systems having two or more.
The value 0 means the watchdog is unusable/broken/disabled and the
watchdog with the biggest value is the one supposed to be used by
default.

Analogous a property `watchdog-restart-priority` is used to define if a
watchdog is supposed to be used to restart the machine. Again a value of
0 means "Don't use" and otherwise the highest-value watchdog is used to
reset the machine.

Maybe `restart-priority` is a better name that can also be used by
PMICs?!

> What's the DT folks opinion on that?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2020-10-07 10:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-06 10:29 [RFC] Using a watchdog as system reset Uwe Kleine-König
2020-10-06 11:56 ` Guenter Roeck
2020-10-06 14:29   ` Guenter Roeck
2020-10-06 18:41     ` Uwe Kleine-König
2020-10-06 21:04       ` Guenter Roeck
2020-10-07  7:12         ` Uwe Kleine-König
2020-10-07  7:25           ` Ahmad Fatoum
2020-10-07  7:32             ` Ahmad Fatoum
2020-10-07 10:18             ` Uwe Kleine-König [this message]
2020-10-07 11:04               ` dt-binding to define default watchdog and machine reset (Was: Re: [RFC] Using a watchdog as system reset) Guenter Roeck
2020-10-07 11:35                 ` Ahmad Fatoum

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=20201007101835.yhlbjfpklepfodgw@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=robh+dt@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 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.