Skip to content

Commit

Permalink
Kconfig: Use 'default' instead of 'def_bool' in Kconfig.defconfig files
Browse files Browse the repository at this point in the history
This can help find unused symbols. Those end up without a type if
'default' is used instead of 'def_bool', which generates a warning.

Search for "Kconfig.defconfig" in
https://docs.zephyrproject.org/latest/application/kconfig-tips.html for
a longer explanation.

Keep the 'def_bool' for the following symbols, which seem to be
deliberately defined only in Kconfig.defconfig files:

 - ALTERA_AVALON_I2C
 - ALTERA_AVALON_MSGDMA
 - ALTERA_AVALON_PIO
 - ALTERA_AVALON_QSPI
 - ALTERA_AVALON_SYSID
 - CLOCK_CONTROL_IMX_CCM
 - CPU_EM4_DMIPS
 - CPU_EM4_FPUDA
 - CPU_EM4_FPUS
 - FP_FPU_DA
 - I2C_GECKO

Signed-off-by: Ulf Magnusson <[email protected]>
  • Loading branch information
ulfalizer authored and nashif committed Nov 13, 2018
1 parent fc210ab commit 4638652
Show file tree
Hide file tree
Showing 118 changed files with 678 additions and 678 deletions.
2 changes: 1 addition & 1 deletion boards/arc/arduino_101_sss/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ config BOARD
if FLASH && SPI

config SPI_FLASH_W25QXXDV
def_bool y
default y

config SPI_FLASH_W25QXXDV_SPI_NAME
default "SPI_2"
Expand Down
30 changes: 15 additions & 15 deletions boards/arc/em_starterkit/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@ config BOARD
default "em_starterkit"

config CPU_ARCEM4
def_bool y
default y

if GPIO

config GPIO_DW
def_bool y
default y

if GPIO_DW

config GPIO_DW_0
def_bool y
default y

config GPIO_DW_1
def_bool y
default y

config GPIO_DW_2
def_bool y
default y

config GPIO_DW_3
def_bool y
default y

endif # GPIO_DW

Expand All @@ -33,18 +33,18 @@ endif # GPIO
if I2C

config I2C_DW
def_bool y
default y

if I2C_DW

config I2C_DW_CLOCK_SPEED
default 100

config I2C_0
def_bool y
default y

config I2C_1
def_bool y
default y

endif # I2C_DW

Expand All @@ -53,35 +53,35 @@ endif # I2C
if SERIAL

config UART_NS16550
def_bool y
default y

endif # SERIAL

if UART_CONSOLE

config UART_NS16550_PORT_1
def_bool y
default y

endif # UART_CONSOLE

if SPI

config SPI_DW
def_bool y
default y

if SPI_DW

config SPI_DW_FIFO_DEPTH
default 32

config SPI_DW_ARC_AUX_REGS
def_bool n
default n

config SPI_0
def_bool y
default y

config SPI_1
def_bool y
default y

endif # SPI_DW

Expand Down
4 changes: 2 additions & 2 deletions boards/arc/nsim_em/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ config BOARD
default "nsim_em"

config CPU_ARCEM4
def_bool y
default y

if SERIAL

config UART_NSIM
def_bool y
default y

config UART_NSIM_PORT_0_BASE_ADDR
default 0xf0000000
Expand Down
26 changes: 13 additions & 13 deletions boards/arm/96b_argonkey/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,47 +13,47 @@ config BOARD
if UART_CONSOLE

config UART_STM32_PORT_1
def_bool y
default y

endif # UART_CONSOLE

if I2C

config I2C_1
def_bool y
default y

config I2C_2
def_bool y
default y

config I2C_3
def_bool y
default y

config I2C_STM32_INTERRUPT
def_bool y
default y

endif # I2C

if SPI

config SPI_1
def_bool y
default y

config SPI_2
def_bool y
default y

config SPI_STM32_INTERRUPT
def_bool y
default y

endif # SPI

if I2S

config I2S_STM32
def_bool y
default y

# configure PLLI2S to generate a I2SxCLK=128MHz
config I2S_STM32_USE_PLLI2S_ENABLE
def_bool y
default y

config I2S_STM32_PLLI2S_PLLM
default 8
Expand All @@ -65,14 +65,14 @@ config I2S_STM32_PLLI2S_PLLR
default 3

config I2S_5
def_bool y
default y

endif # I2S

if DMA

config DMA_STM32F4X
def_bool y
default y

endif # DMA

Expand All @@ -87,7 +87,7 @@ choice LSM6DSL_TRIGGER_MODE
endchoice

config LSM6DSL_SENSORHUB
def_bool y
default y

choice LSM6DSL_EXTERNAL_SENSOR_0
default LSM6DSL_EXT0_LIS2MDL
Expand Down
22 changes: 11 additions & 11 deletions boards/arm/96b_carbon/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,47 +14,47 @@ if UART_CONSOLE

config UART_STM32_PORT_1
default y
def_bool y
default y

endif # UART_CONSOLE

if SERIAL

config UART_STM32_PORT_2
def_bool y
default y

config UART_STM32_PORT_6
def_bool y
default y

endif # SERIAL

if I2C

config I2C_1
def_bool y
default y

config I2C_2
def_bool y
default y

endif # I2C

if SPI

config SPI_1
def_bool y
default y

config SPI_2
def_bool y
default y

config SPI_STM32_INTERRUPT
def_bool y
default y

endif # SPI

if BT

config SPI
def_bool y
default y

choice BT_HCI_BUS_TYPE
default BT_SPI
Expand All @@ -69,11 +69,11 @@ if NETWORKING

config NET_L2_BT
depends on NET_IPV6
def_bool y
default y

config NET_L2_BT_ZEP1656
depends on NET_IPV6
def_bool y
default y

endif # NETWORKING

Expand Down
14 changes: 7 additions & 7 deletions boards/arm/96b_neonkey/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,33 @@ config BOARD
if UART_CONSOLE

config UART_STM32_PORT_1
def_bool y
default y

endif # UART_CONSOLE

if I2C

config I2C_1
def_bool y
default y

config I2C_2
def_bool y
default y

config I2C_3
def_bool y
default y

config I2C_STM32_INTERRUPT
def_bool y
default y

endif # I2C

if SPI

config SPI_1
def_bool y
default y

config SPI_STM32_INTERRUPT
def_bool y
default y

endif # SPI

Expand Down
8 changes: 4 additions & 4 deletions boards/arm/96b_nitrogen/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ config BOARD
if I2C

config I2C_NRFX
def_bool y
default y

if I2C_NRFX

config I2C_0
def_bool y
default y

endif # I2C_NRFX

Expand All @@ -26,12 +26,12 @@ endif # I2C
if SPI

config SPI_NRFX
def_bool y
default y

if SPI_NRFX

config SPI_0
def_bool y
default y

endif # SPI_NRFX

Expand Down
4 changes: 2 additions & 2 deletions boards/arm/arduino_due/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ config BOARD
if GPIO

config GPIO_ATMEL_SAM3
def_bool y
default y

config GPIO_ATMEL_SAM3_PORTA
default y
Expand All @@ -31,7 +31,7 @@ endif # GPIO
if I2C

config I2C_SAM_TWI
def_bool y
default y

config I2C_0
default y
Expand Down
6 changes: 3 additions & 3 deletions boards/arm/b_l072z_lrwan1/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ endif # UART_CONSOLE

if I2C
config I2C_1
def_bool y
default y

endif # I2C

if SPI
config SPI_1
def_bool y
default y

config SPI_2
def_bool y
default y
endif # SPI

endif # BOARD_B_L072Z_LRWAN1
4 changes: 2 additions & 2 deletions boards/arm/bbc_microbit/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ config BOARD
if I2C

config I2C_NRFX
def_bool y
default y

if I2C_NRFX

config I2C_0
def_bool y
default y

endif #I2C_NRFX

Expand Down
Loading

0 comments on commit 4638652

Please sign in to comment.