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: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
Kconfig.mcux drivers: soc_flash_mcux enabled for LPC 2020-01-16 08:19:46 -06:00
Kconfig.nios2_qspi
Kconfig.nor drivers: spi_nor: improve documentation and validation on flash layout size 2019-11-09 15:26:06 +01:00
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: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
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: Remove redundant 'default n' and 'prompt' properties 2019-12-09 16:14:50 +01:00
Kconfig.stm32 kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
Kconfig.w25qxxdv kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
flash_gecko.c drivers: fix printf formatting in flash drivers 2019-08-01 11:33:17 -07:00
flash_handlers.c drivers: flash_handlers fixes stray semicolon 2019-11-28 13:39:00 -05:00
flash_page_layout.c cleanup: include/: move flash.h to drivers/flash.h 2019-06-27 22:55:49 -04:00
flash_priv.h
flash_sam.c drivers: fix printf formatting in flash drivers 2019-08-01 11:33:17 -07:00
flash_sam0.c flash: sam0: Fix build issue. 2020-02-06 19:18:51 -05:00
flash_shell.c cleanup: include/: move flash.h to drivers/flash.h 2019-06-27 22:55:49 -04:00
flash_simulator.c drivers/flash/flash_simulator: erase posix flash in initialization 2020-01-23 10:51:42 -05:00
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 drivers: soc_flash_mcux enabled for LPC 2020-01-16 08:19:46 -06:00
soc_flash_nios2_qspi.c drivers/flash: nios2_qspi byte read access 2019-12-19 12:53:22 -05:00
soc_flash_nrf.c drivers: flash: nrfx: Change write_block_size parameter to 32-bits 2020-01-21 15:26:23 +01:00
soc_flash_rv32m1.c global: Remove leading/trailing blank lines in files 2019-12-11 19:17:27 +01:00
spi_flash_w25qxxdv.c cleanup: include/: move spi.h to drivers/spi.h 2019-06-27 22:55:49 -04:00
spi_flash_w25qxxdv.h
spi_flash_w25qxxdv_defs.h
spi_nor.c drivers: spi_nor: improve documentation and validation on flash layout size 2019-11-09 15:26:06 +01:00
spi_nor.h drivers: spi_nor: support deep-power-down mode 2019-11-09 15:26:06 +01:00