drivers/watchdog: fix capture automonitor notifier context

Provide per-instance capture automonitor lookup for watchdog lower halves
that pass callback context, and avoid selecting an unrelated watchdog when
legacy lower halves provide no context. Update STM32 WWDG lower halves to pass
their instance context so multiple watchdog devices remain distinguishable.

Signed-off-by: hanzhijian <hanzhijian@zepp.com>
Assisted-by: OpenAI Codex
This commit is contained in:
hanzhijian 2026-07-15 14:41:42 +08:00 committed by Xiang Xiao
parent 20c280724a
commit 2bf7d987ed
6 changed files with 206 additions and 10 deletions

View file

@ -258,9 +258,12 @@ void watchdog_notifier_chain_unregister(FAR struct notifier_block *nb);
* Name: watchdog_automonitor_timeout
*
* Description:
* This function can be called in the watchdog timeout interrupt handler.
* If so, callbacks on the watchdog timer notify chain are called when the
* watchdog timer times out.
* Notify callbacks registered on the watchdog timeout notifier chain.
* The action identifies the automonitor keepalive mechanism selected by
* CONFIG_WATCHDOG_AUTOMONITOR_BY_*. The callback data argument is NULL.
*
* This function is intended to be called from a watchdog timeout interrupt
* handler. Callback functions must obey interrupt-context restrictions.
*
****************************************************************************/