zephyr/drivers
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
..
adc adc: common: handle gain of 128 in adc_gain_invert() 2020-02-05 14:28:09 -06:00
audio drivers: audio: tlv320dac310x: Convert to the new GPIO API 2020-02-05 12:00:36 +01:00
bluetooth kernel: overhaul unused stack measurement 2020-02-08 10:02:35 +02:00
can drivers: can: mcp2515: Switch to new GPIO API 2020-02-05 12:00:36 +01:00
clock_control kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
console console: uart: Ifdef an include 2020-01-28 14:02:54 -05:00
counter kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
crypto kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
debug tracing: cleanup and split segger/rtt configuration options 2020-02-07 15:58:05 -05:00
display kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
dma drivers: dma: stm32: Fix compiler warning 2020-02-04 15:49:48 -06:00
eeprom kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
entropy global: Fix up leading/trailing blank lines in files 2020-01-27 17:41:55 -06:00
espi kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
ethernet gpio: rename typedef for devicetree flags 2020-02-05 12:00:36 +01:00
flash kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
gpio drivers: gpio: Add sam4e defines 2020-02-05 08:18:02 -06:00
hwinfo drivers: hwinfo: Use HAL for reading deviceID. 2019-12-17 09:11:37 +01:00
i2c drivers: i2c_slave: eeprom: fixes incorrect declaration 2020-02-05 18:46:35 -05:00
i2s treewide: use full path to clock_control/stm32_clock_control.h header 2020-01-26 17:52:12 +01:00
ieee802154 drivers/ieee802154: Adapt cc1200 driver to new GPIO API 2020-02-05 12:00:36 +01:00
interrupt_controller drivers/interrup_controller: stm32: stm32_exti_enable could be void 2020-02-05 12:00:36 +01:00
ipm treewide: use full path to ipm.h header 2020-01-26 17:52:12 +01:00
kscan kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
led drivers: led: ht16k33: reorder pin interrupt configuration 2020-02-05 12:00:36 +01:00
led_strip kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
lora drivers: lora: build with newlib 2020-02-07 16:00:47 -06:00
modem drivers: modem: Fix gpio compile errors with modem shell 2020-02-06 12:33:20 +02:00
net drivers: modem: Implement uart_pipe interface for GSM modem 2020-01-28 12:44:17 +02:00
neural_net kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
pcie global: Remove leading/trailing blank lines in files 2019-12-11 19:17:27 +01:00
pinmux kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
ps2 drivers: ps2: Compile out PS/2 in terms of an eSPI peripheral 2019-11-20 15:02:08 -05:00
ptp_clock kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
pwm drivers: gpio_esp32: update to use new GPIO API 2020-02-05 12:00:36 +01:00
sensor kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
serial uart_stm32: Fix flow misspelling 2020-02-07 08:08:25 -06:00
spi drivers: spi: spi_mcux_dspi: fix missing context unlock on busy bus 2020-02-08 11:41:21 +02:00
timer native_posix: timer: Improve arch_busy_wait() doc 2020-02-07 11:48:41 +01:00
usb usb_dc_stm32: Convert usb disconnect gpio to new gpio api 2020-02-05 12:00:36 +01:00
video video: mt9m114: Fix integer handling issues 2019-11-15 10:11:05 +01:00
watchdog kconfig: Replace some single-symbol 'if's with 'depends on' 2020-02-08 08:32:42 -05:00
wifi gpio: replace gpio pin write/read with set/get 2020-02-05 12:00:36 +01:00
CMakeLists.txt drivers: Add basic LoRa driver support 2019-12-21 12:20:24 +01:00
Kconfig tracing: cleanup and split segger/rtt configuration options 2020-02-07 15:58:05 -05:00