Browse Source

drivers: watchdog: kconfig option for callback support

Add a non-configurable option which drivers can select to indicate that
they do not support callbacks on watchdog expiry.

Signed-off-by: Jordan Yates <jordan@embeint.com>
pull/83581/head
Jordan Yates 6 months ago committed by Benjamin Cabé
parent
commit
feaf21f80c
  1. 3
      doc/releases/release-notes-4.1.rst
  2. 5
      drivers/watchdog/Kconfig
  3. 1
      drivers/watchdog/Kconfig.gd32
  4. 1
      drivers/watchdog/Kconfig.rpi_pico
  5. 1
      drivers/watchdog/Kconfig.smartbond
  6. 1
      drivers/watchdog/Kconfig.stm32
  7. 1
      drivers/watchdog/Kconfig.tco
  8. 1
      drivers/watchdog/Kconfig.ti_tps382x

3
doc/releases/release-notes-4.1.rst

@ -257,6 +257,9 @@ Drivers and Sensors
* Watchdog * Watchdog
* Added :kconfig:option:`CONFIG_HAS_WDT_NO_CALLBACKS` which drivers select when they do not support
a callback being provided in :c:struct:`wdt_timeout_cfg`.
* Wi-Fi * Wi-Fi
Networking Networking

5
drivers/watchdog/Kconfig

@ -20,6 +20,11 @@ config WDT_DISABLE_AT_BOOT
help help
Disable watchdog at Zephyr system startup. Disable watchdog at Zephyr system startup.
config HAS_WDT_NO_CALLBACKS
bool
help
Watchdog driver does not support callbacks.
module = WDT module = WDT
module-str = watchdog module-str = watchdog
source "subsys/logging/Kconfig.template.log_config" source "subsys/logging/Kconfig.template.log_config"

1
drivers/watchdog/Kconfig.gd32

@ -14,6 +14,7 @@ config WWDGT_GD32
bool "GD32 Window watchdog timer (WWDGT) Driver" bool "GD32 Window watchdog timer (WWDGT) Driver"
default y default y
depends on DT_HAS_GD_GD32_WWDGT_ENABLED depends on DT_HAS_GD_GD32_WWDGT_ENABLED
select HAS_WDT_NO_CALLBACKS
select USE_GD32_WWDGT select USE_GD32_WWDGT
help help
Enable the Window watchdog timer (WWDGT) driver for GD32 SoCs. Enable the Window watchdog timer (WWDGT) driver for GD32 SoCs.

1
drivers/watchdog/Kconfig.rpi_pico

@ -6,6 +6,7 @@ config WDT_RPI_PICO
default y default y
depends on DT_HAS_RASPBERRYPI_PICO_WATCHDOG_ENABLED depends on DT_HAS_RASPBERRYPI_PICO_WATCHDOG_ENABLED
select HAS_WDT_DISABLE_AT_BOOT select HAS_WDT_DISABLE_AT_BOOT
select HAS_WDT_NO_CALLBACKS
config WDT_RPI_PICO_INITIAL_TIMEOUT config WDT_RPI_PICO_INITIAL_TIMEOUT
int "Default watchdog timeout in us" int "Default watchdog timeout in us"

1
drivers/watchdog/Kconfig.smartbond

@ -8,6 +8,7 @@ config WDT_SMARTBOND
default y default y
depends on DT_HAS_RENESAS_SMARTBOND_WATCHDOG_ENABLED depends on DT_HAS_RENESAS_SMARTBOND_WATCHDOG_ENABLED
select HAS_WDT_DISABLE_AT_BOOT select HAS_WDT_DISABLE_AT_BOOT
select HAS_WDT_NO_CALLBACKS if !WDT_SMARTBOND_NMI
help help
Enable watchdog driver for Smartbond line of MCUs Enable watchdog driver for Smartbond line of MCUs

1
drivers/watchdog/Kconfig.stm32

@ -10,6 +10,7 @@ menuconfig IWDG_STM32
default y default y
depends on DT_HAS_ST_STM32_WATCHDOG_ENABLED depends on DT_HAS_ST_STM32_WATCHDOG_ENABLED
select HAS_WDT_DISABLE_AT_BOOT select HAS_WDT_DISABLE_AT_BOOT
select HAS_WDT_NO_CALLBACKS
help help
Enable IWDG driver for STM32 line of MCUs Enable IWDG driver for STM32 line of MCUs

1
drivers/watchdog/Kconfig.tco

@ -8,5 +8,6 @@ config WDT_TCO
default y default y
depends on DT_HAS_INTEL_TCO_WDT_ENABLED depends on DT_HAS_INTEL_TCO_WDT_ENABLED
select HAS_WDT_DISABLE_AT_BOOT select HAS_WDT_DISABLE_AT_BOOT
select HAS_WDT_NO_CALLBACKS
help help
Enable support for Intel TCO WDT driver. Enable support for Intel TCO WDT driver.

1
drivers/watchdog/Kconfig.ti_tps382x

@ -7,6 +7,7 @@ config WDT_TI_TPS382X
default y default y
depends on DT_HAS_TI_TPS382X_ENABLED depends on DT_HAS_TI_TPS382X_ENABLED
depends on GPIO depends on GPIO
select HAS_WDT_NO_CALLBACKS
help help
Enable WDT driver for TI TPS382x. This is an external IC and requires Enable WDT driver for TI TPS382x. This is an external IC and requires
a GPIO connection from the processor. a GPIO connection from the processor.

Loading…
Cancel
Save