kconfig: Replace defconfig singe-symbol 'if's with 'depends on'

Same deal as in commit eddd98f ("kconfig: Replace some single-symbol
'if's with 'depends on'"), for all symbols defined within defconfig
files. See that commit for an explanation.

Maybe 'if's were used originally to mirror the 'if's in the main Kconfig
files, and then it got copied around by people assuming 'if' must work
differently from 'depends on'. It doesn't match in every spot at least.
Better to keep it simple and just consistently use 'depends on' when
it's a single symbol/choice I think. Helps reinforce that 'if' isn't
magic too.

Verified by printing all Kconfig menu nodes (symbols, choices, menus,
etc.) before and after the change and diffing (should show no
difference).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit is contained in:
Ulf Magnusson 2020-02-10 04:18:50 +01:00 committed by Kumar Gala
commit a42a42cd5a
272 changed files with 752 additions and 2949 deletions

View file

@ -11,32 +11,20 @@ config SOC
config FLOAT
default y
if GPIO
config GPIO_IMX
default y
endif # GPIO
if SERIAL
depends on GPIO
config UART_IMX
default y
endif # SERIAL
if IPM
depends on SERIAL
config IPM_IMX
default y
endif # IPM
if COUNTER
depends on IPM
config COUNTER_IMX_EPIT
default y
endif # COUNTER
depends on COUNTER
endif # SOC_MCIMX6X_M4

View file

@ -14,39 +14,24 @@ config SYS_CLOCK_HW_CYCLES_PER_SEC
config GPIO
default y
if GPIO
config GPIO_IMX
default y
endif # GPIO
if SERIAL
depends on GPIO
config UART_IMX
default y
endif # SERIAL
if I2C
depends on SERIAL
config I2C_IMX
default y
endif # I2C
if PWM
depends on I2C
config PWM_IMX
default y
endif # PWM
if IPM
depends on PWM
config IPM_IMX
default y
endif # IPM
depends on IPM
endif # SOC_MCIMX7_M4

View file

@ -11,68 +11,41 @@ config SOC_SERIES
config TEXT_SECTION_OFFSET
default 0x2000 if BOOT_FLEXSPI_NOR || BOOT_SEMC_NOR
if CLOCK_CONTROL
config CLOCK_CONTROL_MCUX_CCM
default y if HAS_MCUX_CCM
endif # CLOCK_CONTROL
if DISK_ACCESS_SDHC
depends on CLOCK_CONTROL
config DISK_ACCESS_USDHC
default y if (HAS_MCUX_USDHC1 || HAS_MCUX_USDHC2)
endif # DISK_ACCESS_SDHC
if DISPLAY
depends on DISK_ACCESS_SDHC
config DISPLAY_MCUX_ELCDIF
default y if HAS_MCUX_ELCDIF
endif # DISPLAY
if GPIO
depends on DISPLAY
config GPIO_MCUX_IGPIO
default y if HAS_MCUX_IGPIO
endif # GPIO
if ENTROPY_GENERATOR
depends on GPIO
config ENTROPY_MCUX_TRNG
default y if HAS_MCUX_TRNG
endif # ENTROPY_GENERATOR
if I2C
depends on ENTROPY_GENERATOR
config I2C_MCUX_LPI2C
default y if HAS_MCUX_LPI2C
endif # I2C
if PWM
depends on I2C
config PWM_MCUX
default y if HAS_MCUX_PWM
endif # PWM
if NET_L2_ETHERNET
depends on PWM
config ETH_MCUX
default y if HAS_MCUX_ENET
endif # NET_L2_ETHERNET
if SERIAL
depends on NET_L2_ETHERNET
config UART_MCUX_LPUART
default y if HAS_MCUX_LPUART
endif # SERIAL
depends on SERIAL
if COUNTER
@ -87,12 +60,9 @@ config COUNTER_MCUX_GPT2
endif # COUNTER
if SPI
config SPI_MCUX_LPSPI
default y if HAS_MCUX_LPSPI
endif # SPI
depends on SPI
if CODE_ITCM
@ -154,19 +124,13 @@ config SRAM_BASE_ADDRESS
endif # DATA_OCRAM
if USB
config USB_DC_NXP_EHCI
default y
endif # USB
if VIDEO
depends on USB
config VIDEO_MCUX_CSI
default y if HAS_MCUX_CSI
endif
depends on VIDEO
source "soc/arm/nxp_imx/rt/Kconfig.defconfig.mimxrt*"