zephyr/drivers/flash
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: flash: add Nordic JEDEC QSPI NOR flash driver 2020-01-29 15:15:49 +01:00
Kconfig drivers: flash: add Nordic JEDEC QSPI NOR flash driver 2020-01-29 15:15:49 +01:00
Kconfig.gecko
Kconfig.mcux
Kconfig.nios2_qspi
Kconfig.nor
Kconfig.nordic_qspi_nor drivers: flash: add Nordic JEDEC QSPI NOR flash driver 2020-01-29 15:15:49 +01:00
Kconfig.nrf kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
Kconfig.rv32m1
Kconfig.sam kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
Kconfig.sam0 kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
Kconfig.simulator
Kconfig.stm32 kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
Kconfig.w25qxxdv
flash_gecko.c
flash_handlers.c
flash_page_layout.c
flash_priv.h
flash_sam.c
flash_sam0.c flash: sam0: Fix build issue. 2020-02-06 19:18:51 -05:00
flash_shell.c
flash_simulator.c
flash_stm32.c drivers: flash: stm32: Update flash driver implementation 2020-01-28 15:30:12 -06:00
flash_stm32.h drivers: flash: stm32: Update flash driver implementation 2020-01-28 15:30:12 -06:00
flash_stm32f0x.c drivers: flash: stm32: Update flash driver implementation 2020-01-28 15:30:12 -06:00
flash_stm32f1x.c drivers: flash: stm32: Update flash driver implementation 2020-01-28 15:30:12 -06:00
flash_stm32f3x.c drivers: flash: stm32: Update flash driver implementation 2020-01-28 15:30:12 -06:00
flash_stm32f4x.c drivers: flash: stm32: Update flash driver implementation 2020-01-28 15:30:12 -06:00
flash_stm32f7x.c drivers: flash: stm32: Update flash driver implementation 2020-01-28 15:30:12 -06:00
flash_stm32g0x.c drivers: flash: stm32: Update flash driver implementation 2020-01-28 15:30:12 -06:00
flash_stm32g4x.c drivers: flash: stm32: Update flash driver implementation 2020-01-28 15:30:12 -06:00
flash_stm32l4x.c drivers: flash: stm32: Update flash driver implementation 2020-01-28 15:30:12 -06:00
flash_stm32wbx.c drivers/flash: stm32: Fix faulty register access 2020-01-29 15:14:22 -06:00
nrf_qspi_nor.c drivers: flash: add Nordic JEDEC QSPI NOR flash driver 2020-01-29 15:15:49 +01:00
soc_flash_mcux.c
soc_flash_nios2_qspi.c
soc_flash_nrf.c
soc_flash_rv32m1.c
spi_flash_w25qxxdv.c
spi_flash_w25qxxdv.h
spi_flash_w25qxxdv_defs.h
spi_nor.c
spi_nor.h