Skip to content

Commit 7abb9d7

Browse files
ananglcarlescufi
authored andcommitted
drivers: watchdog: Allow WDT_DISABLE_AT_BOOT only when supported
Introduce a hidden Kconfig option named HAS_WDT_DISABLE_AT_BOOT and allow users to enable WDT_DISABLE_AT_BOOT only when that hidden option is selected by a watchdog driver, i.e. disabling at boot is supported. Select this new hidden option for all existing watchdog drivers that refer to WDT_DISABLE_AT_BOOT. Signed-off-by: Andrzej Głąbek <[email protected]>
1 parent fa716d9 commit 7abb9d7

20 files changed

+23
-1
lines changed

drivers/watchdog/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@ menuconfig WATCHDOG
1111

1212
if WATCHDOG
1313

14+
config HAS_WDT_DISABLE_AT_BOOT
15+
bool
16+
1417
config WDT_DISABLE_AT_BOOT
1518
bool "Disable at boot"
19+
depends on HAS_WDT_DISABLE_AT_BOOT
1620
help
1721
Disable watchdog at Zephyr system startup.
1822

drivers/watchdog/Kconfig.andes_atcwdt200

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ config WDT_ANDES_ATCWDT200
99
bool "Andes Watchdog driver"
1010
default y
1111
depends on DT_HAS_ANDESTECH_ATCWDT200_ENABLED
12+
select HAS_WDT_DISABLE_AT_BOOT
1213
select COUNTER
1314
help
1415
Enable driver for the Andes Watchdog driver.

drivers/watchdog/Kconfig.cc13xx_cc26xx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ config WDT_CC13XX_CC26XX
55
bool "Watchdog Driver for CC13xx / CC26xx family of MCUs"
66
default y
77
depends on DT_HAS_TI_CC13XX_CC26XX_WATCHDOG_ENABLED
8+
select HAS_WDT_DISABLE_AT_BOOT
89
help
910
Enable watchdog for CC13xx / CC26xx family of MCUs
1011

drivers/watchdog/Kconfig.cc32xx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ config WDT_CC32XX
55
bool "Watchdog Driver for cc32xx family of MCUs"
66
default y
77
depends on DT_HAS_TI_CC32XX_WATCHDOG_ENABLED
8+
select HAS_WDT_DISABLE_AT_BOOT
89
help
910
Watchdog for cc32xx family of MCUs
1011

drivers/watchdog/Kconfig.dw

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ config WDT_DW
77
bool "Synopsys DesignWare Watchdog driver"
88
default y
99
depends on DT_HAS_SNPS_DESIGNWARE_WATCHDOG_ENABLED
10+
select HAS_WDT_DISABLE_AT_BOOT
1011
help
1112
Synopsys DesignWare Watchdog driver.

drivers/watchdog/Kconfig.ene

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ config WDT_ENE_KB1200
55
bool "ENE KB1200 watchdog driver"
66
default y
77
depends on DT_HAS_ENE_KB1200_WATCHDOG_ENABLED
8+
select HAS_WDT_DISABLE_AT_BOOT
89
help
910
This option enables the KB1200 watchdog driver.

drivers/watchdog/Kconfig.esp32

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ config WDT_ESP32
77
bool "ESP32 Watchdog (WDT) Driver"
88
default y
99
depends on DT_HAS_ESPRESSIF_ESP32_WATCHDOG_ENABLED
10+
select HAS_WDT_DISABLE_AT_BOOT
1011
help
1112
Enable WDT driver for ESP32.

drivers/watchdog/Kconfig.gd32

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ config FWDGT_GD32
55
bool "GD32 Free watchdog timer (FWDGT) driver"
66
default y
77
depends on DT_HAS_GD_GD32_FWDGT_ENABLED
8+
select HAS_WDT_DISABLE_AT_BOOT
89
select USE_GD32_FWDGT
910
help
1011
Enable the Free watchdog timer (FWDGT) driver for GD32 SoCs.

drivers/watchdog/Kconfig.gecko

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ config WDT_GECKO
99
bool "Gecko series Watchdog (WDOG) Driver"
1010
default y
1111
depends on DT_HAS_SILABS_GECKO_WDOG_ENABLED
12+
select HAS_WDT_DISABLE_AT_BOOT
1213
select SOC_GECKO_WDOG
13-
default y
1414
help
1515
Enable WDOG driver for Silicon Labs Gecko MCUs.

drivers/watchdog/Kconfig.it8xxx2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ config WDT_ITE_IT8XXX2
55
bool "ITE it8xxx2 Watchdog Timer (WDT) driver"
66
default y
77
depends on DT_HAS_ITE_IT8XXX2_WATCHDOG_ENABLED
8+
select HAS_WDT_DISABLE_AT_BOOT
89
help
910
This option enables the Watchdog Timer driver for ITE it8xxx2.
1011
This driver supports only one channel that id is 0 and 16-bits

0 commit comments

Comments
 (0)