All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] watchdog: factorize reboot notifier registration
@ 2015-11-20 21:54 Damien Riegel
  2015-11-20 21:54 ` [PATCH v2 1/6] watchdog: core: add reboot notifier support Damien Riegel
                   ` (6 more replies)
  0 siblings, 7 replies; 20+ messages in thread
From: Damien Riegel @ 2015-11-20 21:54 UTC (permalink / raw)
  To: linux-watchdog
  Cc: Wim Van Sebroeck, Guenter Roeck, Mike Looijmans, kernel,
	Damien Riegel

Many drivers implements the exact same piece of code to register a
reboot notifier. It can be nice to factorize this in the watchdog core.

The first patch adds a new helper function, watchdog_stop_on_reboot,
which registers a reboot notifier block for this device. If used, the
watchdog core will care about stopping the watchdog when receiving a
reboot notification.

The following patches bring this change to the current watchdog drivers
that use watchdog_core.

This action is done only when the reboot code is SYS_HALT or SYS_DOWN,
since that is what most of the drivers are doing.

Only 3 drivers, including gpio_wdt, do not stop the watchdog on
SYS_DOWN. So for this watchdog, it will now stop on reboot if
"always-running" is not set, whereas it did not prior to this patchset.

This change has been compile-tested with allyesconfig on arm.
It has been tested with (not mainlined yet) ts-4800's watchdog driver.


Changes in v2:
 - call ops->stop only if watchdog is active
 - squashed gpio_wdt-related commits to keep a consistent behaviour.

Damien Riegel (6):
  watchdog: core: add reboot notifier support
  watchdog: bcm47xx_wdt: use core reboot notifier
  watchdog: cadence_wdt: use core reboot notifier
  watchdog: gpio_wdt: use core reboot notifier
  watchdog: softdog: use core reboot notifier
  watchdog: w83627hf_wdt: use core reboot notifier

 Documentation/watchdog/watchdog-kernel-api.txt |  8 ++++++
 drivers/watchdog/bcm47xx_wdt.c                 | 24 ++---------------
 drivers/watchdog/cadence_wdt.c                 | 36 +------------------------
 drivers/watchdog/gpio_wdt.c                    | 35 ++----------------------
 drivers/watchdog/softdog.c                     | 30 ++-------------------
 drivers/watchdog/w83627hf_wdt.c                | 32 ++--------------------
 drivers/watchdog/watchdog_core.c               | 37 ++++++++++++++++++++++++++
 include/linux/bcm47xx_wdt.h                    |  2 --
 include/linux/watchdog.h                       |  9 +++++++
 9 files changed, 63 insertions(+), 150 deletions(-)

-- 
2.5.0

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2015-12-27 16:50 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-20 21:54 [PATCH v2 0/6] watchdog: factorize reboot notifier registration Damien Riegel
2015-11-20 21:54 ` [PATCH v2 1/6] watchdog: core: add reboot notifier support Damien Riegel
2015-11-21  1:10   ` Guenter Roeck
2015-11-23 15:02   ` In-reply-to: <1448056496-2335-1-git-send-email-damien.riegel@savoirfairelinux.com> Harald Geyer
2015-11-23 15:37     ` Damien Riegel
2015-11-23 18:20       ` Harald Geyer
2015-11-23 23:31         ` Damien Riegel
2015-11-25 17:04           ` Harald Geyer
2015-11-25 18:37             ` Guenter Roeck
2015-11-25 21:56               ` Harald Geyer
2015-11-25 22:10                 ` Guenter Roeck
2015-11-23 15:57     ` Guenter Roeck
2015-11-20 21:54 ` [PATCH v2 2/6] watchdog: bcm47xx_wdt: use core reboot notifier Damien Riegel
2015-11-20 21:54 ` [PATCH v2 3/6] watchdog: cadence_wdt: " Damien Riegel
2015-11-20 21:54 ` [PATCH v2 4/6] watchdog: gpio_wdt: " Damien Riegel
2015-11-21  1:11   ` Guenter Roeck
2015-11-20 21:54 ` [PATCH v2 5/6] watchdog: softdog: " Damien Riegel
2015-11-20 21:54 ` [PATCH v2 6/6] watchdog: w83627hf_wdt: " Damien Riegel
2015-11-21  1:10   ` Guenter Roeck
2015-12-27 16:50 ` [PATCH v2 0/6] watchdog: factorize reboot notifier registration Wim Van Sebroeck

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.