zephyr/drivers/watchdog
Ulf Magnusson eddd98f811 kconfig: Replace some single-symbol 'if's with 'depends on'
I think people might be reading differences into 'if' and 'depends on'
that aren't there, like maybe 'if' being needed to "hide" a symbol,
while 'depends on' just adds a dependency.

There are no differences between 'if' and 'depends on'. 'if' is just a
shorthand for 'depends on'. They work the same when it comes to creating
implicit menus too.

The way symbols get "hidden" is through their dependencies not being
satisfied ('if'/'depends on' get copied up as a dependency on the
prompt).

Since 'if' and 'depends on' are the same, an 'if' with just a single
symbol in it can be replaced with a 'depends on'. IMO, it's best to
avoid 'if' there as a style choice too, because it confuses people into
thinking there's deep Kconfig magic going on that requires 'if'.

Going for 'depends on' can also remove some nested 'if's, which
generates nicer symbol information and docs, because nested 'if's really
are so simple/dumb that they just add the dependencies from both 'if's
to all symbols within.

Replace a bunch of single-symbol 'if's with 'depends on' to despam the
Kconfig files a bit and make it clearer how things work. Also do some
other minor related dependency refactoring.

The replacement isn't complete. Will fix up the rest later. Splitting it
a bit to make it more manageable.

(Everything above is true for choices, menus, and comments as well.)

Detected by tweaking the Kconfiglib parsing code. It's impossible to
detect after parsing, because 'if' turns into 'depends on'.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2020-02-08 08:32:42 -05:00
..
CMakeLists.txt drivers/watchdog: Add support for SiLabs Gecko Watchdog 2020-02-03 11:25:40 -08:00
Kconfig drivers/watchdog: Add support for SiLabs Gecko Watchdog 2020-02-03 11:25:40 -08:00
Kconfig.cmsdk_apb kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
Kconfig.esp32
Kconfig.gecko drivers/watchdog: Add support for SiLabs Gecko Watchdog 2020-02-03 11:25:40 -08:00
Kconfig.mcux
Kconfig.nrfx drivers: wdt_nrfx: Add multi-instance support 2019-11-08 14:54:12 +01:00
Kconfig.sam
Kconfig.sam0
Kconfig.stm32
Kconfig.xec
wdt_cmsdk_apb.c
wdt_esp32.c
wdt_gecko.c drivers/watchdog: Add support for SiLabs Gecko Watchdog 2020-02-03 11:25:40 -08:00
wdt_handlers.c drivers: watchdog: fix system call handlers build 2020-01-06 21:36:54 -08:00
wdt_iwdg_stm32.c
wdt_iwdg_stm32.h
wdt_mchp_xec.c
wdt_mcux_wdog.c drivers: watchdog: Refactor mcux wdog driver to use generated dts macros 2020-01-15 18:02:19 -05:00
wdt_mcux_wdog32.c
wdt_nrfx.c drivers: wdt_nrfx: Handle PM callback properly 2019-12-18 12:10:19 +01:00
wdt_sam.c
wdt_sam0.c
wdt_wwdg_stm32.c treewide: use full path to watchdog.h header 2020-01-26 17:52:12 +01:00
wdt_wwdg_stm32.h treewide: use full path to clock_control/stm32_clock_control.h header 2020-01-26 17:52:12 +01:00