All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>,
	Stefan Roese <sr@denx.de>, Tom Rini <trini@konsulko.com>
Subject: Re: [PATCH v2 08/10] watchdog: add gpio watchdog driver
Date: Tue, 22 Jun 2021 07:31:51 -0600	[thread overview]
Message-ID: <CAPnjgZ0Eg=XEpaVRP-PWWvAUc5OQ0hVv_OhMzzqW-M7e8daHjw@mail.gmail.com> (raw)
In-Reply-To: <20210527220017.1266765-9-rasmus.villemoes@prevas.dk>

On Thu, 27 May 2021 at 16:00, Rasmus Villemoes
<rasmus.villemoes@prevas.dk> wrote:
>
> A rather common kind of external watchdog circuit is one that is kept
> alive by toggling a gpio. Add a driver for handling such a watchdog.
>
> The corresponding linux driver apparently has support for some
> watchdog circuits which can be disabled by tri-stating the gpio, but I
> have never actually encountered such a chip in the wild; the whole
> point of adding an external watchdog is usually that it is not in any
> way under software control. For forward-compatibility, and to make DT
> describe the hardware, the current driver only supports devices that
> have the always-running property. I went a little back and forth on
> whether I should fail ->probe or only ->start, and ended up deciding
> ->start was the right place.
>
> The compatible string is probably a little odd as it has nothing to do
> with linux per se - however, I chose that to make .dts snippets
> reusable between device trees used with U-Boot and linux, and this is
> the (only) compatible string that linux' corresponding driver and DT
> binding accepts. I have asked whether one should/could add "wdt-gpio"
> to that binding, but the answer was no:
>
>   https://lore.kernel.org/lkml/CAL_JsqKEGaFpiFV_oAtE+S_bnHkg4qry+bhx2EDs=NSbVf_giA@mail.gmail.com/
>
> If someone feels strongly about this, I can certainly remove the
> "linux," part from the string - it probably wouldn't the only place where
> one can't reuse a DT snippet as-is between linux and U-Boot.
>
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
> ---
>  .../watchdog/gpio-wdt.txt                     | 19 +++++
>  drivers/watchdog/Kconfig                      |  9 +++
>  drivers/watchdog/Makefile                     |  1 +
>  drivers/watchdog/gpio_wdt.c                   | 69 +++++++++++++++++++
>  4 files changed, 98 insertions(+)
>  create mode 100644 doc/device-tree-bindings/watchdog/gpio-wdt.txt
>  create mode 100644 drivers/watchdog/gpio_wdt.c
>

Reviewed-by: Simon Glass <sjg@chromium.org>

  reply	other threads:[~2021-06-22 13:34 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-27 22:00 [PATCH v2 00/10] handling all DM watchdogs in watchdog_reset() Rasmus Villemoes
2021-05-27 22:00 ` [PATCH v2 01/10] watchdog: wdt-uclass.c: use wdt_start() in wdt_expire_now() Rasmus Villemoes
2021-06-22 13:31   ` Simon Glass
2021-06-29  5:54   ` Stefan Roese
2021-05-27 22:00 ` [PATCH v2 02/10] watchdog: wdt-uclass.c: introduce struct wdt_priv Rasmus Villemoes
2021-06-22 13:31   ` Simon Glass
2021-06-29  5:56   ` Stefan Roese
2021-05-27 22:00 ` [PATCH v2 03/10] watchdog: wdt-uclass.c: neaten UCLASS_DRIVER definition Rasmus Villemoes
2021-06-22 13:31   ` Simon Glass
2021-06-29  5:57   ` Stefan Roese
2021-05-27 22:00 ` [PATCH v2 04/10] watchdog: wdt-uclass.c: refactor initr_watchdog() Rasmus Villemoes
2021-06-22 13:31   ` Simon Glass
2021-06-29  5:59   ` Stefan Roese
2021-05-27 22:00 ` [PATCH v2 05/10] watchdog: wdt-uclass.c: keep track of each device's running state Rasmus Villemoes
2021-06-22 13:31   ` Simon Glass
2021-06-29  6:04   ` Stefan Roese
2021-05-27 22:00 ` [PATCH v2 06/10] sandbox: disable CONFIG_WATCHDOG_AUTOSTART Rasmus Villemoes
2021-06-22 13:31   ` Simon Glass
2021-06-29  6:05   ` Stefan Roese
2021-05-27 22:00 ` [PATCH v2 07/10] watchdog: wdt-uclass.c: handle all DM watchdogs in watchdog_reset() Rasmus Villemoes
2021-06-22 13:31   ` Simon Glass
2021-06-22 20:28     ` Rasmus Villemoes
2021-06-23  5:53       ` Stefan Roese
2021-06-26 18:32       ` Simon Glass
2021-06-28  7:44         ` Rasmus Villemoes
2021-06-29  6:11           ` Stefan Roese
2021-07-05 15:29           ` Simon Glass
2021-05-27 22:00 ` [PATCH v2 08/10] watchdog: add gpio watchdog driver Rasmus Villemoes
2021-06-22 13:31   ` Simon Glass [this message]
2021-06-29  6:07   ` Stefan Roese
2021-05-27 22:00 ` [PATCH v2 09/10] sandbox: add test of wdt_gpio driver Rasmus Villemoes
2021-06-22 13:31   ` Simon Glass
2021-06-29  6:08   ` Stefan Roese
2021-05-27 22:00 ` [PATCH v2 10/10] sandbox: add test of wdt-uclass' watchdog_reset() Rasmus Villemoes
2021-06-22 13:31   ` Simon Glass
2021-06-22 20:29     ` Rasmus Villemoes
2021-06-26 18:32       ` Simon Glass
2021-06-29  6:08   ` Stefan Roese
2021-06-08 22:41 ` [PATCH v2 00/10] handling all DM watchdogs in watchdog_reset() Rasmus Villemoes
2021-06-10  5:28   ` Stefan Roese

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='CAPnjgZ0Eg=XEpaVRP-PWWvAUc5OQ0hVv_OhMzzqW-M7e8daHjw@mail.gmail.com' \
    --to=sjg@chromium.org \
    --cc=rasmus.villemoes@prevas.dk \
    --cc=sr@denx.de \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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.