watchdog: add watchdog pretimeout governor framework
authorVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Fri, 7 Oct 2016 12:39:54 +0000 (15:39 +0300)
committerWim Van Sebroeck <wim@iguana.be>
Sat, 8 Oct 2016 08:27:10 +0000 (10:27 +0200)
commitff84136cb6a4943f489ad037fe93f43be0573c23
treebde99dc52bf4066e666681d280011d37d17d269a
parentfc113d54e9d7ef3296cdf2eff49c8ca0a3e5a482
watchdog: add watchdog pretimeout governor framework

The change adds a simple watchdog pretimeout framework infrastructure,
its purpose is to allow users to select a desired handling of watchdog
pretimeout events, which may be generated by some watchdog devices.

A user selects a default watchdog pretimeout governor during
compilation stage.

Watchdogs with WDIOF_PRETIMEOUT capability now have one more device
attribute in sysfs, pretimeout_governor attribute is intended to display
the selected watchdog pretimeout governor.

The framework has no impact at runtime on watchdog devices with no
WDIOF_PRETIMEOUT capability set.

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Documentation/watchdog/watchdog-kernel-api.txt
drivers/watchdog/Kconfig
drivers/watchdog/Makefile
drivers/watchdog/watchdog_dev.c
drivers/watchdog/watchdog_pretimeout.c [new file with mode: 0644]
drivers/watchdog/watchdog_pretimeout.h [new file with mode: 0644]
include/linux/watchdog.h