[PATCH] watchdog: prevent the STPMIC1 watchdog probe from modifying the global turn-OFF behaviour
sha at pengutronix.de
Fri Feb 12 03:50:54 EST 2021
On Thu, Feb 11, 2021 at 04:03:48PM +0100, Leonard Göhrs wrote:
> According to Table 12 in the STPMIC1-datasheet (Rev 7 - December 2020)
> there are the following turn-OFF conditions:
> - Software switch-OFF*
> - PONKEYn long key press*
> - Thermal shutdown
> - Overcurrent protection
> - Watchdog*
> - VIN_OK_Fall*
> The conditions marked with an * can be re-configured from turn-Off conditions
> to restart requests using the RREQ_EN-bit in the CR register
> (Called RESTART_REQUEST_ENABLED in Linux/Barebox).
> The watchdog code enabled this bit in it's probe function to trigger a restart
> on a watchdog event. This may however result in unexpected behaviour,
> like a long-press of the PONKEY resulting in a restart instead of a turn-off
> when the watchdog is enabled vs. when it is not.
> This change does not affect the restart and poweroff functionality provided by
> the wdt driver, as the restart-/poweroff-handlers explicitly set/clear the
> RESTART_REQUEST_ENABLED flag when triggering a software turn-OFF.
> To prevent unexpected behaviour of the PONKEYn and other turn-OFF sources the
> RESTART_REQUEST_ENABLED configuration in the probe function can and should thus be removed.
> Signed-off-by: Leonard Göhrs <l.goehrs at pengutronix.de>
> drivers/watchdog/stpmic1_wdt.c | 4 ----
> 1 file changed, 4 deletions(-)
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox