public inbox for linux-watchdog@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] watchdog: factorize reboot notifier registration
@ 2015-11-18 21:02 Damien Riegel
  2015-11-18 21:02 ` [PATCH 1/7] watchdog: core: add reboot notifier support Damien Riegel
                   ` (6 more replies)
  0 siblings, 7 replies; 19+ messages in thread
From: Damien Riegel @ 2015-11-18 21:02 UTC (permalink / raw)
  To: linux-watchdog
  Cc: Wim Van Sebroeck, Guenter Roeck, Vivien Didelot, 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, stop the watchdog on SYS_POWER_OFF.
So gpio_wdt is the only driver whose behaviour is affected by 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.

Damien Riegel (7):
  watchdog: core: add reboot notifier support
  watchdog: bcm47xx_wdt: use core reboot notifier
  watchdog: cadence_wdt: use core reboot notifier
  watchdog: gpio_wdt: stop on SYS_DOWN instead of SYS_POWER_OFF
  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               | 35 +++++++++++++++++++++++++
 include/linux/bcm47xx_wdt.h                    |  2 --
 include/linux/watchdog.h                       |  9 +++++++
 9 files changed, 61 insertions(+), 150 deletions(-)

-- 
2.5.0

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

end of thread, other threads:[~2015-11-20 16:09 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-18 21:02 [PATCH 0/7] watchdog: factorize reboot notifier registration Damien Riegel
2015-11-18 21:02 ` [PATCH 1/7] watchdog: core: add reboot notifier support Damien Riegel
2015-11-20  3:18   ` Guenter Roeck
2015-11-18 21:02 ` [PATCH 2/7] watchdog: bcm47xx_wdt: use core reboot notifier Damien Riegel
2015-11-20  4:13   ` Guenter Roeck
2015-11-18 21:02 ` [PATCH 3/7] watchdog: cadence_wdt: " Damien Riegel
2015-11-20  4:15   ` Guenter Roeck
2015-11-18 21:02 ` [PATCH 4/7] watchdog: gpio_wdt: stop on SYS_DOWN instead of SYS_POWER_OFF Damien Riegel
2015-11-20  4:16   ` Guenter Roeck
2015-11-18 21:02 ` [PATCH 5/7] watchdog: gpio_wdt: use core reboot notifier Damien Riegel
2015-11-20  3:27   ` Guenter Roeck
2015-11-20  7:15     ` Mike Looijmans
2015-11-20 15:21       ` Damien Riegel
2015-11-20 15:35         ` Guenter Roeck
2015-11-20 15:54           ` Damien Riegel
2015-11-20 16:09             ` Guenter Roeck
2015-11-18 21:02 ` [PATCH 6/7] watchdog: softdog: " Damien Riegel
2015-11-20  4:16   ` Guenter Roeck
2015-11-18 21:02 ` [PATCH 7/7] watchdog: w83627hf_wdt: " Damien Riegel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox