watchdog: pretimeout: add option to select a pretimeout governor in runtime
The change converts watchdog device attribute "pretimeout_governor" from
read-only to read-write type to allow users to select a desirable
watchdog pretimeout governor in runtime, e.g.
% echo -n panic > /sys/..../watchdog/watchdog0/pretimeout
To get this working a list of registered pretimeout governors is created
and a new helper function watchdog_pretimeout_governor_set() is exported
to watchdog_dev.c.
If a selected governor is gone, a watchdog device pretimeout notification
is delegated to a default built-in pretimeout governor.
Signed-off-by: Vladimir Zapolskiy <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Reviewed-by: Wolfram Sang <[email protected]>
Tested-by: Wolfram Sang <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Wim Van Sebroeck <[email protected]>
3 files changed