rtc: ds1307: provide an indication that the watchdog has fired
authorChris Packham <chris.packham@alliedtelesis.co.nz>
Mon, 27 Jul 2020 03:46:14 +0000 (15:46 +1200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 4 Aug 2020 23:07:09 +0000 (01:07 +0200)
commit9bf1306257589b3a5ad46175538af9922d94e26f
tree86354542968affd37500b1b85f03b74a9977ed65
parent3d6cfb36ed719e5efdc2a6a8e8ee07f185c88da1
rtc: ds1307: provide an indication that the watchdog has fired

There's not much feedback when the ds1388 watchdog fires. Generally it
yanks on the reset line and the board reboots. Capture the fact that the
watchdog has fired in the past so that userspace can retrieve it via
WDIOC_GETBOOTSTATUS. This should help distinguish a watchdog triggered
reset from a power interruption.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20200727034615.19755-1-chris.packham@alliedtelesis.co.nz
drivers/rtc/rtc-ds1307.c