linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Rob Herring <robh+dt@kernel.org>
Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>,
	"open list:REAL TIME CLOCK (RTC) SUBSYSTEM" 
	<linux-rtc@vger.kernel.org>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Qiang Zhao <qiang.zhao@nxp.com>,
	Bruno Thomsen <bruno.thomsen@gmail.com>
Subject: Re: [PATCH v2 1/3] dt-bindings: rtc: add reset-source property
Date: Thu, 17 Dec 2020 21:28:41 +0100	[thread overview]
Message-ID: <20201217202841.gcr5bxlaqpupiuu2@pengutronix.de> (raw)
In-Reply-To: <CAL_Jsq+z10xMig6HgOBK4bEK9_-MMv_ootBaBZeLuJ7TWEYm=g@mail.gmail.com>

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

On Thu, Dec 17, 2020 at 01:02:32PM -0600, Rob Herring wrote:
> On Thu, Dec 17, 2020 at 12:12 PM Uwe Kleine-König
> <u.kleine-koenig@pengutronix.de> wrote:
> >
> > On Thu, Dec 17, 2020 at 10:51:08AM -0600, Rob Herring wrote:
> > > On Fri, Dec 11, 2020 at 5:10 PM Rasmus Villemoes
> > > <rasmus.villemoes@prevas.dk> wrote:
> > > >
> > > > On 11/12/2020 23.30, Rob Herring wrote:
> > > > > On Fri, Dec 11, 2020 at 3:56 PM Rasmus Villemoes
> > > > > <rasmus.villemoes@prevas.dk> wrote:
> > > > >>
> > > > >> Some RTCs, e.g. the pcf2127, can be used as a hardware watchdog. But
> > > > >> if the reset pin is not actually wired up, the driver exposes a
> > > > >> watchdog device that doesn't actually work.
> > > > >>
> > > > >> Provide a standard binding that can be used to indicate that a given
> > > > >> RTC can perform a reset of the machine, similar to wakeup-source.
> > > > >
> > > > > Why not use the watchdog 'timeout-sec' property?
> > > >
> > > > Wouldn't that be overloading that property? AFAIU, that is used to ask
> > > > the kernel to program an initial timeout value into the watchdog device.
> > > > But what if one doesn't want to start the watchdog device at kernel
> > > > boot, but just indicate that the RTC has that capability?
> > >
> > > Yeah, I guess you're right.
> >
> > I agree, too. The initial suggestion looks fine.
> >
> > > > It's quite possible that if it can act as a watchdog device (and
> > > > has-watchdog was also suggested), one would also want timeout-sec and
> > > > other watchdog bindings to apply. But that can be added later, by those
> > > > who actually want that.
> > > >
> > > > For now, I'd really like to get my board booting again (or rather, not
> > > > get reset by the real watchdog just because the pcf2127 driver now
> > > > exposes something as /dev/wathdog0, pushing the real one to
> > > > /dev/wathcdog1 which doesn't get pinged from userspace).
> > >
> > > I'm wondering how you solve which wdog to ping when there are multiple
> > > without relying on numbering. I guess 'reset-source' will solve that
> > > even if that's not your current fix. So I guess I'm fine with this.
> >
> > I guess you'd need some udev magic that ensures that the right watchdog
> > always gets the same number.
> 
> Why involve udev and keep the magic numbering important? Provide
> enough details on watchdogs' features so an intelligent decision can
> be made. It's the same thing every time folks try to number things in
> DT.

Note that it was you wanted to solve the more complicated problem about
selecting the right watchdog from a set of several working watchdogs.
The problem here is easier: We have machines with two watchdog devices
and only one of them is actually working. So the straight forward thing
to do is to not provide the watchdog device for the rtc chip that cannot
reset the system.

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 --]

  reply	other threads:[~2020-12-17 20:29 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-21  5:48 [Patch v2 1/3] dt-bindings: rtc: pcf2127: Add bindings for nxp,pcf2127 Qiang Zhao
2020-09-21  5:48 ` [Patch v2 2/3] rtc: pcf2127: add "no-watchdog" property Qiang Zhao
2020-09-21  5:48 ` [Patch v2 3/3] arm64: dts: lx2160a: Add "no-watchdog" property to pcf2127 Qiang Zhao
2020-09-23  9:44 ` [Patch v2 1/3] dt-bindings: rtc: pcf2127: Add bindings for nxp,pcf2127 Alexandre Belloni
2020-09-24  3:20   ` Qiang Zhao
2020-09-24  7:04     ` Uwe Kleine-König
2020-09-24  7:23       ` Qiang Zhao
2020-09-24  7:47         ` Alexandre Belloni
2020-09-24 10:52           ` [PATCH 0/2] rtc: pcf2127: only use watchdog when explicitly available Uwe Kleine-König
2020-09-24 10:52             ` [PATCH 1/2] rtc: pcf2127: move watchdog initialisation to a separate function Uwe Kleine-König
2020-09-27  7:50               ` Bruno Thomsen
2020-09-24 10:52             ` [PATCH 2/2] [RFC] rtc: pcf2127: only use watchdog when explicitly available Uwe Kleine-König
2020-09-27  8:09               ` Bruno Thomsen
2020-09-27 15:54                 ` Guenter Roeck
2020-09-28  8:43                   ` Uwe Kleine-König
2020-09-28 16:26                     ` Guenter Roeck
2020-10-26  7:23             ` [PATCH 0/2] " Qiang Zhao
2020-10-26 20:48               ` Alexandre Belloni
2020-10-26 21:29                 ` Guenter Roeck
2020-11-30  9:51             ` Rasmus Villemoes
2020-12-04  9:27               ` Alexandre Belloni
2020-12-11 21:56                 ` [PATCH v2 0/3] add reset-source RTC binding, update pcf2127 driver Rasmus Villemoes
2020-12-11 21:56                   ` [PATCH v2 1/3] dt-bindings: rtc: add reset-source property Rasmus Villemoes
2020-12-11 22:30                     ` Rob Herring
2020-12-11 23:10                       ` Rasmus Villemoes
2020-12-17 16:51                         ` Rob Herring
2020-12-17 18:12                           ` Uwe Kleine-König
2020-12-17 18:23                             ` Rasmus Villemoes
2020-12-17 19:02                             ` Rob Herring
2020-12-17 20:28                               ` Uwe Kleine-König [this message]
2020-12-12  9:25                     ` Uwe Kleine-König
2020-12-11 21:56                   ` [PATCH v2 2/3] rtc: pcf2127: move watchdog initialisation to a separate function Rasmus Villemoes
2020-12-11 21:56                   ` [PATCH v2 3/3] rtc: pcf2127: only use watchdog when explicitly available Rasmus Villemoes
2020-12-18 10:10                   ` [PATCH v3 0/2] add reset-source RTC binding, update pcf2127 driver Rasmus Villemoes
2020-12-18 10:10                     ` [PATCH v3 1/2] dt-bindings: rtc: add reset-source property Rasmus Villemoes
2020-12-18 21:19                       ` Rob Herring
2020-12-18 10:10                     ` [PATCH v3 2/2] rtc: pcf2127: only use watchdog when explicitly available Rasmus Villemoes
2020-12-19  0:58                     ` [PATCH v3 0/2] add reset-source RTC binding, update pcf2127 driver Alexandre Belloni
2020-09-24 16:59           ` [Patch v2 1/3] dt-bindings: rtc: pcf2127: Add bindings for nxp,pcf2127 Bruno Thomsen

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=20201217202841.gcr5bxlaqpupiuu2@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=alexandre.belloni@bootlin.com \
    --cc=bruno.thomsen@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=qiang.zhao@nxp.com \
    --cc=rasmus.villemoes@prevas.dk \
    --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 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).