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>
This commit is contained in:
Ulf Magnusson 2020-02-08 03:45:50 +01:00 committed by Anas Nashif
parent 1f0089ff45
commit eddd98f811
53 changed files with 90 additions and 272 deletions

View file

@ -10,11 +10,10 @@ config CLOCK_CONTROL_NRF_FORCE_ALT
This option can be enabled to force an alternative implementation
of the clock control driver.
if !CLOCK_CONTROL_NRF_FORCE_ALT
menuconfig CLOCK_CONTROL_NRF
bool "NRF Clock controller support"
depends on SOC_COMPATIBLE_NRF
depends on !CLOCK_CONTROL_NRF_FORCE_ALT
default y
help
Enable support for the Nordic Semiconductor nRFxx series SoC clock
@ -130,5 +129,3 @@ config CLOCK_CONTROL_NRF_K32SRC_20PPM
endchoice
endif # CLOCK_CONTROL_NRF
endif #!CLOCK_CONTROL_NRF_FORCE_ALT

View file

@ -4,17 +4,15 @@
# Copyright (c) 2017 RnDity Sp. z o.o.
# SPDX-License-Identifier: Apache-2.0
if SOC_FAMILY_STM32
menuconfig CLOCK_CONTROL_STM32_CUBE
bool "STM32 Reset & Clock Control"
depends on SOC_FAMILY_STM32
select USE_STM32_LL_UTILS
select USE_STM32_LL_RCC if SOC_SERIES_STM32MP1X
help
Enable driver for Reset & Clock Control subsystem found
in STM32 family of MCUs
if CLOCK_CONTROL_STM32_CUBE
config CLOCK_CONTROL_STM32_DEVICE_INIT_PRIORITY
@ -274,4 +272,3 @@ config CLOCK_STM32_MCO2_DIV
allowed values: 1, 2, 3, 4, 5
endif # CLOCK_CONTROL_STM32_CUBE
endif # SOC_FAMILY_STM32

View file

@ -3,12 +3,9 @@
# Copyright (c) 2016 Linaro Limited
# SPDX-License-Identifier: Apache-2.0
if SOC_FAMILY_ARM
config TIMER_DTMR_CMSDK_APB
bool "ARM CMSDK (Cortex-M System Design Kit) DTMR Timer driver"
depends on SOC_FAMILY_ARM
help
The dualtimer (DTMR) present in the platform is used as a timer.
This option enables the support for the timer.
endif # SOC_FAMILY_ARM

View file

@ -51,24 +51,15 @@ config COUNTER_RTC2
select COUNTER_NRF_RTC
# Internal flag which detects if PPI wrap feature is enabled for any instance
if ($(dt_node_has_bool_prop,rtc-0,ppi-wrap) && COUNTER_RTC0) || \
($(dt_node_has_bool_prop,rtc-1,ppi-wrap) && COUNTER_RTC1) || \
($(dt_node_has_bool_prop,rtc-2,ppi-wrap) && COUNTER_RTC2)
config COUNTER_RTC_WITH_PPI_WRAP
bool
default y
def_bool ($(dt_node_has_bool_prop,rtc-0,ppi-wrap) && COUNTER_RTC0) || \
($(dt_node_has_bool_prop,rtc-1,ppi-wrap) && COUNTER_RTC1) || \
($(dt_node_has_bool_prop,rtc-2,ppi-wrap) && COUNTER_RTC2)
select NRFX_PPI if HAS_HW_NRF_PPI
select NRFX_DPPI if HAS_HW_NRF_DPPIC
endif
# Internal flag which detects if fixed top feature is enabled for any instance
if (!$(dt_node_has_bool_prop,rtc-0,fixed-top) && COUNTER_RTC0) || \
(!$(dt_node_has_bool_prop,rtc-1,fixed-top) && COUNTER_RTC1) || \
(!$(dt_node_has_bool_prop,rtc-2,fixed-top) && COUNTER_RTC2)
config COUNTER_RTC_CUSTOM_TOP_SUPPORT
bool
default y
endif
def_bool (!$(dt_node_has_bool_prop,rtc-0,fixed-top) && COUNTER_RTC0) || \
(!$(dt_node_has_bool_prop,rtc-1,fixed-top) && COUNTER_RTC1) || \
(!$(dt_node_has_bool_prop,rtc-2,fixed-top) && COUNTER_RTC2)

View file

@ -3,12 +3,9 @@
# Copyright (c) 2016 Linaro Limited
# SPDX-License-Identifier: Apache-2.0
if SOC_FAMILY_ARM
config TIMER_TMR_CMSDK_APB
bool "ARM CMSDK (Cortex-M System Design Kit) Timer driver"
depends on SOC_FAMILY_ARM
help
The timers (TMR) present in the platform are used as timers.
This option enables the support for the timers.
endif # SOC_FAMILY_ARM

View file

@ -11,13 +11,10 @@ menuconfig CRYPTO_STM32
help
Enable STM32 HAL-based Cryptographic Accelerator driver.
if CRYPTO_STM32
config CRYPTO_STM32_MAX_SESSION
int "Maximum of sessions STM32 crypto driver can handle"
default 2
depends on CRYPTO_STM32
help
This can be used to tweak the amount of sessions the driver
can handle in parallel.
endif # CRYPTO_STM32

View file

@ -12,15 +12,12 @@ config MICROBIT_DISPLAY
Enable this to be able to display images and text on the 5x5
LED matrix display on the BBC micro:bit.
if MICROBIT_DISPLAY
config MICROBIT_DISPLAY_STR_MAX
int "Maximum length of strings that can be shown on the display"
range 3 255
default 40
depends on MICROBIT_DISPLAY
help
This value specifies the maximum length of strings that can
be displayed using the mb_display_string() and mb_display_print()
APIs.
endif # MICROBIT_DISPLAY

View file

@ -9,11 +9,10 @@ menuconfig ST7789V
help
Enable driver for ST7789V display driver.
if ST7789V
choice ST7789V_PIXEL_FORMAT
prompt "Color pixel format"
default ST7789V_RGB565
depends on ST7789V
help
Specify the color pixel format for the ST7789V display controller.
@ -24,5 +23,3 @@ config ST7789V_RGB565
bool "RGB565"
endchoice
endif # ST7789V

View file

@ -57,10 +57,9 @@ config EEPROM_SIMULATOR
help
Enable Simulated EEPROM driver.
if EEPROM_SIMULATOR
config EEPROM_SIMULATOR_SIMULATE_TIMING
bool "Enable hardware timing simulation"
depends on EEPROM_SIMULATOR
help
Enable Simulated hardware timing.
@ -80,6 +79,4 @@ config EEPROM_SIMULATOR_MIN_WRITE_TIME_US
endif # EEPROM_SIMULATOR_SIMULATE_TIMING
endif # EEPROM_SIMULATOR
endif # EEPROM

View file

@ -40,19 +40,16 @@ config ESPI_VWIRE_CHANNEL
help
eSPI Controller supports virtual wires channel.
if ESPI_VWIRE_CHANNEL
config ESPI_AUTOMATIC_WARNING_ACKNOWLEDGE
bool "Automatic acknowledge for eSPI HOST warnings"
default y
depends on ESPI_VWIRE_CHANNEL
help
Enable automatic acknowledge from eSPI slave towards eSPI host
whenever it receives suspend or reset warning.
If this is disabled, it means the app wants to be give the opportunity
to prepare for either HOST suspend or reset.
endif # ESPI_VWIRE_CHANNEL
config ESPI_OOB_CHANNEL
bool "eSPI Out-of-band channel"
help

View file

@ -7,11 +7,10 @@ config FLASH_NRF_FORCE_ALT
This option can be enabled to force an alternative implementation
of the flash driver.
if !FLASH_NRF_FORCE_ALT
menuconfig SOC_FLASH_NRF
bool "Nordic Semiconductor nRF flash driver"
depends on SOC_FAMILY_NRF
depends on !FLASH_NRF_FORCE_ALT
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_DRIVER_ENABLED
select NRFX_NVMC
@ -19,26 +18,27 @@ menuconfig SOC_FLASH_NRF
help
Enables Nordic Semiconductor nRF flash driver.
if SOC_FLASH_NRF
config SOC_FLASH_NRF_RADIO_SYNC
bool "Nordic nRFx flash driver synchronized with radio"
depends on SOC_FLASH_NRF && BT_CTLR
default y
depends on BT_CTLR
help
Enable synchronization between flash memory driver and radio.
config SOC_FLASH_NRF_UICR
bool "Access to UICR"
depends on SOC_FLASH_NRF && !TRUSTED_EXECUTION_NONSECURE
depends on !TRUSTED_EXECUTION_NONSECURE
help
Enable operations on UICR. Once enabled UICR are written or read as
ordinary flash memory. Erase is possible for whole UICR at once.
config SOC_FLASH_NRF_EMULATE_ONE_BYTE_WRITE_ACCESS
bool "8-bit write block size emulation"
depends on SOC_FLASH_NRF
help
When this option is enabled writing chunks less than minimal write
block size parameter (imposed by manufacturer) is possible but operation
is more complex and requires basic user knowledge about NVMC controller.
endif #!FLASH_NRF_FORCE_ALT
endif # SOC_FLASH_NRF

View file

@ -3,15 +3,12 @@
# Copyright (c) 2018 Aurelien Jarno
# SPDX-License-Identifier: Apache-2.0
if SOC_FAMILY_SAM
config SOC_FLASH_SAM
bool "Atmel SAM flash driver"
default y
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_DRIVER_ENABLED
depends on SOC_FAMILY_SAM
depends on SOC_SERIES_SAME70
help
Enable the Atmel SAM series internal flash driver.
endif

View file

@ -3,11 +3,10 @@
# Copyright (c) 2018 Google LLC.
# SPDX-License-Identifier: Apache-2.0
if SOC_FAMILY_SAM0
menuconfig SOC_FLASH_SAM0
bool "Atmel SAM0 flash driver"
default y
depends on SOC_FAMILY_SAM0
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_DRIVER_ENABLED
help
@ -19,5 +18,3 @@ config SOC_FLASH_SAM0_EMULATE_BYTE_PAGES
help
Emulate a device with byte-sized pages by doing a
read/modify/erase/write.
endif

View file

@ -4,10 +4,9 @@
# Copyright (c) 2017 BayLibre, SAS
# SPDX-License-Identifier: Apache-2.0
if SOC_FAMILY_STM32
config SOC_FLASH_STM32
bool "STM32 flash driver"
depends on SOC_FAMILY_STM32
depends on (SOC_SERIES_STM32F0X || SOC_SERIES_STM32F1X || SOC_SERIES_STM32F3X || SOC_SERIES_STM32F4X || SOC_SERIES_STM32F7X || SOC_SERIES_STM32L4X || SOC_SERIES_STM32WBX || SOC_SERIES_STM32G0X || SOC_SERIES_STM32G4X)
select FLASH_HAS_DRIVER_ENABLED
default y
@ -32,5 +31,3 @@ config SOC_FLASH_STM32
help
Enable STM32F0x, STM32F3x, STM32F4x, STM32F7x, STM32L4x, STM32WBx,
STM32G0x or STM32G4x series flash driver.
endif

View file

@ -7,10 +7,7 @@ menuconfig KSCAN_FT5336
help
Enable driver for the FT5336 capacitive touch panel controller.
if KSCAN_FT5336
config KSCAN_FT5336_PERIOD
int "Sample period (ms)"
default 10
endif # KSCAN_FT5336
depends on KSCAN_FT5336

View file

@ -14,11 +14,10 @@ menuconfig WS2812_STRIP
Enable LED strip driver for daisy chains of WS2812-ish
(or WS2812B, WS2813, SK6812, or compatible) devices.
if WS2812_STRIP
choice WS2812_STRIP_DRIVER
prompt "Driver backend"
default WS2812_STRIP_SPI
prompt "Driver backend"
default WS2812_STRIP_SPI
depends on WS2812_STRIP
config WS2812_STRIP_SPI
bool "Enable the SPI driver"
@ -37,5 +36,3 @@ config WS2812_STRIP_GPIO
and is not available on all SoCs.
endchoice
endif

View file

@ -9,10 +9,7 @@ menuconfig PINMUX_SIFIVE
help
Enable driver for the SiFive Freedom SOC pinmux driver
if PINMUX_SIFIVE
config PINMUX_SIFIVE_0_NAME
string "SIFIVE pinmux 0 driver name"
default "pinmux0"
endif # PINMUX_SIFIVE
depends on PINMUX_SIFIVE

View file

@ -9,12 +9,9 @@ menuconfig AMS_IAQ_CORE
help
Enable driver for iAQ-core Digital VOC sensor.
if AMS_IAQ_CORE
config IAQ_CORE_MAX_READ_RETRIES
int "Number of read retries"
default 4
depends on AMS_IAQ_CORE
help
Number of retries when reading failed or device not ready.
endif # AMS_IAQ_CORE

View file

@ -203,15 +203,12 @@ menuconfig FXOS8700_MOTION
help
Enable motion detection
if FXOS8700_MOTION
config FXOS8700_MOTION_INT1
bool "Motion interrupt to INT1 pin"
depends on FXOS8700_MOTION
help
Say Y to route motion interrupt to INT1 pin. Say N to route to INT2 pin.
endif # FXOS8700_MOTION
endif # FXOS8700_TRIGGER
endif # FXOS8700

View file

@ -8,13 +8,10 @@ menuconfig LPS22HB
Enable driver for LPS22HB I2C-based pressure and temperature
sensor.
if LPS22HB
config LPS22HB_SAMPLING_RATE
int "Output data rate"
default 25
depends on LPS22HB
help
Sensor output data rate expressed in samples per second.
Data rates supported by the chip are 1, 10, 25, 50, 75.
endif # LPS22HB

View file

@ -8,13 +8,10 @@ menuconfig LPS25HB
Enable driver for LPS25HB I2C-based pressure and temperature
sensor.
if LPS25HB
config LPS25HB_SAMPLING_RATE
int "Output data rate"
default 25
depends on LPS25HB
help
Sensor output data rate expressed in samples per second.
Data rates supported by the chip are 1, 7, 13, 25.
endif # LPS25HB

View file

@ -60,10 +60,9 @@ config LSM6DSL_SENSORHUB
help
Enable/disable internal sensorhub
if LSM6DSL_SENSORHUB
choice LSM6DSL_EXTERNAL_SENSOR_0
prompt "External sensor 0"
depends on LSM6DSL_SENSORHUB
help
Choose the external sensor 0 connected to LSM6DS3.
@ -75,8 +74,6 @@ config LSM6DSL_EXT0_LPS22HB
endchoice
endif # LSM6DSL_SENSORHUB
menu "Attributes"
config LSM6DSL_GYRO_FS

View file

@ -79,11 +79,10 @@ config SHT3XD_PERIODIC_MODE
endchoice
if SHT3XD_PERIODIC_MODE
choice
prompt "Measurements per second"
default SHT3XD_MPS_1
depends on SHT3XD_PERIODIC_MODE
help
Number of measurements per second.
@ -104,6 +103,4 @@ config SHT3XD_MPS_10
endchoice
endif # SHT3XD_PERIODIC_MODE
endif # SHT3XD

View file

@ -10,12 +10,9 @@ menuconfig VL53L0X
help
Enable driver for VL53L0X I2C-based time of flight sensor.
if VL53L0X
config VL53L0X_PROXIMITY_THRESHOLD
int "Proximity threshold in millimeters"
default 100
depends on VL53L0X
help
Threshold used for proximity detection when sensor is used with SENSOR_CHAN_PROX.
endif # VL53L0X

View file

@ -3,10 +3,9 @@
# Copyright (c) 2016 Linaro Limited
# SPDX-License-Identifier: Apache-2.0
if SOC_FAMILY_ARM
config WDOG_CMSDK_APB
bool "CMSDK APB Watchdog Driver for ARM family of MCUs"
depends on SOC_FAMILY_ARM
depends on RUNTIME_NMI
help
Enable CMSDK APB Watchdog (WDOG_CMSDK_APB) Driver for ARM
@ -20,5 +19,3 @@ config WDOG_CMSDK_APB_START_AT_BOOT
during device initialization. Note that once WDOG is started
it must be reloaded before the counter reaches 0, otherwise
the MCU will be reset.
endif # SOC_FAMILY_ARM

View file

@ -86,24 +86,18 @@ config LVGL_BITS_PER_PIXEL
help
Number of bits per pixel.
if LVGL_COLOR_DEPTH_16
config LVGL_COLOR_16_SWAP
bool "RGB565 byte swap"
depends on LVGL_COLOR_DEPTH_16
help
Swap the 2 bytes of a RGB565 pixel.
endif
if LVGL_COLOR_DEPTH_32
config LVGL_COLOR_SCREEN_TRANSP
bool "Transparency support"
depends on LVGL_COLOR_DEPTH_32
help
Enable screen transparency. Useful for OSD or other overlapping GUISs.
endif
choice
prompt "Chroma key color"
default LVGL_CHROMA_KEY_GREEN
@ -332,11 +326,10 @@ config LVGL_TEXT_USE_BIDI
Unicode Bidirectional Algorithm:
https://www.w3.org/International/articles/inline-bidi-markup/uba-basics*/
if LVGL_TEXT_USE_BIDI
choice LVGL_TEXT_BIDI_MODE
prompt "Bidirectional text processing direction"
default LVGL_TEXT_BIDI_DIR_AUTO
depends on LVGL_TEXT_USE_BIDI
help
Direction of bidirectional text processing
@ -351,8 +344,6 @@ choice LVGL_TEXT_BIDI_MODE
endchoice
endif
config LVGL_ANTIALIAS
bool "Enable anti-aliasing"
help

View file

@ -81,13 +81,12 @@ config LVGL_OBJ_PAGE
help
Enable page object support
if LVGL_OBJ_PAGE
config LVGL_OBJ_PAGE_DEF_ANIM_TIME
int "Default page focus animation time"
default 400
depends on LVGL_OBJ_PAGE
help
Default page focus animation time in milliseconds
endif
config LVGL_OBJ_WINDOW
bool "Window object"
@ -101,31 +100,26 @@ config LVGL_OBJ_TAB_VIEW
help
Enable tab view object support
if LVGL_OBJ_TAB_VIEW
config LVGL_OBJ_TAB_VIEW_ANIMATION_TIME
int "Tab view animation time"
default 300
depends on LVGL_OBJ_TAB_VIEW
help
Tab view animation time in milliseconds
endif
config LVGL_OBJ_TILE_VIEW
bool "Tile view object"
depends on LVGL_OBJ_PAGE
help
Enable tile view object support
if LVGL_OBJ_TILE_VIEW
config LVGL_OBJ_TILE_VIEW_ANIMATION_TIME
int "Tile view animation time"
default 300
depends on LVGL_OBJ_TILE_VIEW
help
Tile view animation time in milliseconds
endif
config LVGL_OBJ_CALENDAR
bool "Calendar object"
help
@ -194,13 +188,12 @@ config LVGL_OBJ_CHART
help
Enable chart object support
if LVGL_OBJ_CHART
config LVGL_OBJ_CHART_AXIS_TICK_LABEL_MAX_LEN
int "Maximum length of axis label"
default 20
depends on LVGL_OBJ_CHART
help
Maximum length of axis label
endif
config LVGL_OBJ_TABLE
bool "Table object"
@ -208,13 +201,12 @@ config LVGL_OBJ_TABLE
help
Enable table object support
if LVGL_OBJ_TABLE
config LVGL_OBJ_TABLE_COLUMN_MAX
int "Maximum number of table columns"
default 12
depends on LVGL_OBJ_TABLE
help
Maximum number of columns to support in a table
endif
config LVGL_OBJ_LED
bool "LED object"
@ -273,12 +265,11 @@ config LVGL_OBJ_IMG_BUTTON
help
Enable image button object support
if LVGL_OBJ_IMG_BUTTON
config LVGL_OBJ_IMG_BUTTON_TILED
bool "Image button tile support"
depends on LVGL_OBJ_IMG_BUTTON
help
Enable tile support for image button
endif
endif
@ -305,16 +296,13 @@ config LVGL_OBJ_LIST
help
Enable list object support
if LVGL_OBJ_LIST
config LVGL_OBJ_LIST_FOCUS_TIME
int "List focus time"
default 100
depends on LVGL_OBJ_LIST
help
List focus animation time in milliseconds
endif
config LVGL_OBJ_COLOR_PICKER
bool "Color picker object"
help
@ -326,16 +314,13 @@ config LVGL_OBJ_DROP_DOWN_LIST
help
Enable drop down list object support
if LVGL_OBJ_DROP_DOWN_LIST
config LVGL_OBJ_DROP_DOWN_LIST_ANIM_TIME
int "Drop Down list animation time"
default 200
depends on LVGL_OBJ_DROP_DOWN_LIST
help
Drop down list animation time in milliseconds
endif
config LVGL_OBJ_ROLLER
bool "Roller object"
depends on LVGL_OBJ_DROP_DOWN_LIST

View file

@ -89,18 +89,15 @@ config MINIMAL_LIBC_MALLOC
Enable the minimal libc's implementation of malloc, free, and realloc.
Disable if you wish to provide your own implementations of these functions.
if MINIMAL_LIBC_MALLOC
config MINIMAL_LIBC_MALLOC_ARENA_SIZE
int "Size of the minimal libc malloc arena"
default 0
depends on MINIMAL_LIBC_MALLOC
help
Indicate the size of the memory arena used for minimal libc's
malloc() implementation. This size value must be compatible with
a sys_mem_pool definition with nmax of 1 and minsz of 16.
endif
config MINIMAL_LIBC_CALLOC
bool "Enable minimal libc trivial calloc implementation"
default y

View file

@ -84,31 +84,26 @@ config MQUEUE_NAMELEN_MAX
endif
if FILE_SYSTEM
config POSIX_FS
bool "Enable POSIX file system API support"
default y if POSIX_API
depends on FILE_SYSTEM
help
This enables POSIX style file system related APIs.
if POSIX_FS
config POSIX_MAX_OPEN_FILES
int "Maximum number of open file descriptors"
default 16
depends on POSIX_FS
help
Maximum number of open files. Note that this setting
is additionally bounded by CONFIG_POSIX_MAX_FDS.
endif
endif # FILE_SYSTEM
if POSIX_API
# The name of this option is mandated by zephyr_interface_library_named
# cmake directive.
config APP_LINK_WITH_POSIX_SUBSYS
bool "Make POSIX headers available to application"
default y
depends on POSIX_API
help
Add POSIX subsystem header files to the 'app' include path.
endif # POSIX_API

View file

@ -240,16 +240,15 @@ config BT_WHITELIST
if BT_CONN
if BT_HCI_ACL_FLOW_CONTROL
config BT_ACL_RX_COUNT
int "Number of incoming ACL data buffers"
default BT_CTLR_RX_BUFFERS if BT_CTLR
default NET_BUF_RX_COUNT if NET_L2_BT
default 6
range 1 64
depends on BT_HCI_ACL_FLOW_CONTROL
help
Number of buffers available for incoming ACL data.
endif # BT_HCI_ACL_FLOW_CONTROL
config BT_CONN_TX_MAX
int "Maximum number of pending TX buffers with a callback"

View file

@ -5,7 +5,6 @@
menu "L2CAP Options"
if BT_HCI_ACL_FLOW_CONTROL
config BT_L2CAP_RX_MTU
int "Maximum supported L2CAP MTU for incoming data"
default 200 if BT_BREDR
@ -13,9 +12,9 @@ config BT_L2CAP_RX_MTU
default 23
range 65 1300 if BT_SMP
range 23 1300
depends on BT_HCI_ACL_FLOW_CONTROL
help
Maximum size of each incoming L2CAP PDU.
endif # BT_HCI_ACL_FLOW_CONTROL
config BT_L2CAP_TX_BUF_COUNT
int "Number of L2CAP TX buffers"
@ -56,12 +55,11 @@ config BT_L2CAP_DYNAMIC_CHANNEL
This option enables support for LE Connection oriented Channels,
allowing the creation of dynamic L2CAP Channels.
if BT_DEBUG
config BT_DEBUG_L2CAP
bool "Bluetooth L2CAP debug"
depends on BT_DEBUG
help
This option enables debug support for the Bluetooth
L2ACP layer.
endif # BT_DEBUG
endmenu

View file

@ -103,19 +103,16 @@ config BT_MESH_NODE_ID_TIMEOUT
be the appropriate value as well, so just leaving this as the
default is the safest option.
if BT_MESH_PROXY
config BT_MESH_PROXY_FILTER_SIZE
int "Maximum number of filter entries per Proxy Client"
default 3 if BT_MESH_GATT_PROXY
default 1
range 1 32767
depends on BT_MESH_PROXY
help
This option specifies how many Proxy Filter entries the local
node supports.
endif # BT_MESH_PROXY
endif # BT_CONN
config BT_MESH_SELF_TEST

View file

@ -7,13 +7,12 @@ menuconfig BT_GATT_BAS
bool "Enable GATT Battery service"
select SENSOR
if BT_GATT_BAS
config BT_GATT_BAS_LOG_LEVEL
int "Battery service log level"
depends on LOG
range 0 4
default 0
depends on BT_GATT_BAS
help
Sets log level for the Battery service.
Levels are:
@ -22,5 +21,3 @@ config BT_GATT_BAS_LOG_LEVEL
2 WARNING, write LOG_WRN in addition to previous level
3 INFO, write LOG_INF in addition to previous levels
4 DEBUG, write LOG_DBG in addition to previous levels
endif # BT_GATT_BAS

View file

@ -6,13 +6,12 @@
menuconfig BT_GATT_HRS
bool "Enable GATT Heart Rate service"
if BT_GATT_HRS
config BT_GATT_HRS_LOG_LEVEL
int "Heart Rate service log level"
depends on LOG
range 0 4
default 0
depends on BT_GATT_HRS
help
Sets log level for the Heart Rate service.
Levels are:
@ -21,5 +20,3 @@ config BT_GATT_HRS_LOG_LEVEL
2 WARNING, write LOG_WRN in addition to previous level
3 INFO, write LOG_INF in addition to previous levels
4 DEBUG, write LOG_DBG in addition to previous levels
endif # BT_GATT_BAS

View file

@ -119,15 +119,12 @@ config ISOTP_ENABLE_CONTEXT_BUFFERS
This option enables buffered sending contexts. This makes send and
forget possible. A memory slab is used to buffer the context.
if ISOTP_ENABLE_CONTEXT_BUFFERS
config ISOTP_TX_CONTEXT_BUF_COUNT
int "Amount of context buffers for sending data"
default 4
depends on ISOTP_ENABLE_CONTEXT_BUFFERS
help
This defines the size of the memory slab where the buffers are
allocated from.
endif # ISOTP_ENABLE_CONTEXT_BUFFERS
endif # ISOTP

View file

@ -44,10 +44,9 @@ config STD_CPP2A
endchoice
if ! MINIMAL_LIBC
config LIB_CPLUSPLUS
bool "Link with STD C++ library"
depends on !MINIMAL_LIBC
help
Link with STD C++ Library.
@ -65,6 +64,4 @@ config RTTI
endif # LIB_CPLUSPLUS
endif # ! MINIMAL_LIBC
endif # CPLUSPLUS

View file

@ -52,10 +52,10 @@ config ASAN
This behavior can be changes by adding leak_check_at_exit=1 to the
environment variable ASAN_OPTIONS.
if ASAN
config ASAN_NOP_DLCLOSE
bool "Override host OS dlclose() with a NOP"
default y if HAS_SDL
depends on ASAN
help
Override host OS dlclose() with a NOP.
@ -64,7 +64,6 @@ config ASAN_NOP_DLCLOSE
check, "<unknown module>" is reported in the stack traces during the leak
check and these can not be suppressed, see
https://github.com/google/sanitizers/issues/89 for more info.
endif # ASAN
config UBSAN
bool "Build with undefined behavior sanitizer"

View file

@ -29,18 +29,16 @@ config MCUBOOT_IMG_MANAGER
endchoice
if MCUBOOT_IMG_MANAGER
config MCUBOOT_TRAILER_SWAP_TYPE
bool "use trailer's swap_type field"
default y
depends on MCUBOOT_IMG_MANAGER
help
Enables usage swap type field which is required after
"Fix double swap on interrupted revert" mcuboot patch
(https://github.com/JuulLabs-OSS/mcuboot/pull/485)
Disable this option if need to be compatible with earlier version
of MCUBoot.
endif
config IMG_BLOCK_BUF_SIZE
int "Image writer buffer size"

View file

@ -23,16 +23,14 @@ config CHARACTER_FRAMEBUFFER_SHELL
Activate shell module that provides Framebuffer commands to the
console.
if CHARACTER_FRAMEBUFFER_SHELL
config CHARACTER_FRAMEBUFFER_SHELL_DRIVER_NAME
config CHARACTER_FRAMEBUFFER_SHELL_DRIVER_NAME
string
default "SSD16XX" if SSD16XX
default "SSD1306" if SSD1306
depends on CHARACTER_FRAMEBUFFER_SHELL
help
Character Framebuffer Display Driver Name
endif
module = CFB
module-str = cfb
source "subsys/logging/Kconfig.template.log_config"

View file

@ -7,10 +7,10 @@ menuconfig JWT
help
Enable creation of JWT tokens
if JWT
choice
prompt "JWT signature algorithm"
default JWT_SIGN_RSA
depends on JWT
help
Select which algorithm to use for signing JWT tokens.
@ -27,4 +27,3 @@ config JWT_SIGN_ECDSA
select TINYCRYPT_AES
endchoice
endif

View file

@ -127,16 +127,15 @@ config LOG_IMMEDIATE
flawlessly in that mode because one log operation can be interrupted
by another one in the higher priority context.
if LOG_IMMEDIATE
config LOG_IMMEDIATE_CLEAN_OUTPUT
bool "Enable clean log output"
depends on LOG_IMMEDIATE
help
If enabled, interrupts are locked during whole log message processing.
As a result, processing on one log message cannot be interrupted by
another one and output is clean, not interleaved. However, enabling
this option is causing interrupts locking for significant amount of
time (up to multiple milliseconds).
endif
config LOG_ENABLE_FANCY_OUTPUT_FORMATTING
depends on MINIMAL_LIBC
@ -166,20 +165,17 @@ config LOG_BLOCK_IN_THREAD
When enabled logger will block (if in the thread context) when
internal logger buffer is full and new message cannot be allocated.
if LOG_BLOCK_IN_THREAD
config LOG_BLOCK_IN_THREAD_TIMEOUT_MS
int "Maximum time (in milliseconds) thread can be blocked"
default 1000
range -1 10000
depends on LOG_BLOCK_IN_THREAD
help
If new buffer for a log message cannot be allocated in that time, log
message is dropped. Forever blocking (-1) is possible however may lead
to the logger deadlock if logging is enabled in threads used for
logging (e.g. logger or shell thread).
endif # LOG_BLOCK_IN_THREAD
config LOG_PROCESS_TRIGGER_THRESHOLD
int "Amount of buffered logs which triggers processing thread."
default 10
@ -366,17 +362,14 @@ config LOG_BACKEND_RTT_SYST_ENABLE
endchoice
if LOG_BACKEND_RTT_MODE_DROP
config LOG_BACKEND_RTT_MESSAGE_SIZE
int "Size of internal buffer for storing messages."
range 32 256
default 128
depends on LOG_BACKEND_RTT_MODE_DROP
help
This option defines maximum message size transferable to up-buffer.
endif # LOG_BACKEND_RTT_MODE_DROP
if LOG_BACKEND_RTT_MODE_BLOCK
config LOG_BACKEND_RTT_OUTPUT_BUFFER_SIZE
@ -413,17 +406,13 @@ config LOG_BACKEND_RTT_BUFFER
Select index of up-buffer used for logger output, by default it uses
terminal up-buffer and its settings.
if LOG_BACKEND_RTT_BUFFER > 0
config LOG_BACKEND_RTT_BUFFER_SIZE
int "Size of reserved up-buffer for logger output."
default 1024
depends on LOG_BACKEND_RTT_BUFFER > 0
help
Specify reserved size of up-buffer used for logger output.
endif # LOG_BACKEND_RTT_BUFFER
# Enable processing of printk calls using log if terminal buffer is used.
# Same buffer is used by RTT console. If printk would go through RTT console
# that will lead to corruption of RTT data which is not protected against being

View file

@ -33,16 +33,14 @@ config MCUMGR_SMP_SHELL
Enables handling of SMP commands received over shell. This allows
the shell to be use for both mcumgr commands and shell commands.
if MCUMGR_SMP_SHELL
config MCUMGR_SMP_SHELL_MTU
int "Shell SMP MTU"
default 256
depends on MCUMGR_SMP_SHELL
help
Maximum size of SMP frames sent and received over shell. This value
must satisfy the following relation:
MCUMGR_SMP_SHELL_MTU <= MCUMGR_BUF_SIZE + 2
endif
config MCUMGR_SMP_UART
bool "UART mcumgr SMP transport"
@ -55,17 +53,15 @@ config MCUMGR_SMP_UART
commands to be received over UART without requiring an additional
thread.
if MCUMGR_SMP_UART
config MCUMGR_SMP_UART_MTU
int "UART SMP MTU"
default 256
depends on MCUMGR_SMP_UART
help
Maximum size of SMP frames sent and received over UART, in bytes.
This value must satisfy the following relation:
MCUMGR_SMP_UART_MTU <= MCUMGR_BUF_SIZE + 2
endif
source "subsys/mgmt/Kconfig.mcumgr"
if MCUMGR

View file

@ -51,15 +51,14 @@ menuconfig MCUMGR_CMD_IMG_MGMT
help
Enables mcumgr handlers for image management
if MCUMGR_CMD_IMG_MGMT
config IMG_MGMT_UL_CHUNK_SIZE
config IMG_MGMT_UL_CHUNK_SIZE
int "Maximum chunk size for image uploads"
default 512
depends on MCUMGR_CMD_IMG_MGMT
help
Limits the maximum chunk size for image uploads, in bytes. A buffer of
this size gets allocated on the stack during handling of a image upload
command.
endif
menuconfig MCUMGR_CMD_OS_MGMT
bool "Enable mcumgr handlers for OS management"
@ -92,16 +91,16 @@ menuconfig MCUMGR_CMD_STAT_MGMT
help
Enables mcumgr handlers for statistics management.
if MCUMGR_CMD_STAT_MGMT
config STAT_MGMT_MAX_NAME_LEN
int "Maximum stat group name length"
default 32
depends on MCUMGR_CMD_STAT_MGMT
help
Limits the maximum stat group name length in mcumgr requests, in bytes.
A buffer of this size gets allocated on the stack during handling of all
stat read commands. If a stat group's name exceeds this limit, it will
be impossible to retrieve its values with a stat show command.
endif
endmenu
config APP_LINK_WITH_MCUMGR

View file

@ -113,11 +113,10 @@ config NET_LLDP_CHASSIS_ID_MAC5
Byte 5 of the MAC address.
endif
if NET_LLDP_CHASSIS_ID_SUBTYPE != 4
config NET_LLDP_CHASSIS_ID
string "Chassis ID value"
default "CHASSIS_ID_PLACEHOLDER"
endif
depends on NET_LLDP_CHASSIS_ID_SUBTYPE != 4
#
# PORT ID TLV CONFIG
@ -184,10 +183,9 @@ config NET_LLDP_PORT_ID_MAC5
Byte 5 of the MAC address.
endif
if NET_LLDP_PORT_ID_SUBTYPE != 3
config NET_LLDP_PORT_ID
string "Port ID value"
default "PORT_ID_PLACEHOLDER"
endif
depends on NET_LLDP_PORT_ID_SUBTYPE != 3
endif # NET_LLDP

View file

@ -33,11 +33,10 @@ config NET_DEBUG_L2_IEEE802154_DISPLAY_PACKET
Enable printing out in/out 802.15.4 packets. This is extremely
verbose, do not enable this unless you know what you are doing.
if NET_DEBUG_L2_IEEE802154_DISPLAY_PACKET
choice
prompt "Which packet do you want to print-out?"
default NET_DEBUG_L2_IEEE802154_DISPLAY_PACKET_FULL
depends on NET_DEBUG_L2_IEEE802154_DISPLAY_PACKET
config NET_DEBUG_L2_IEEE802154_DISPLAY_PACKET_FULL
bool "Print-out both RX and TX packets"
@ -56,8 +55,6 @@ config NET_DEBUG_L2_IEEE802154_DISPLAY_PACKET_TX
endchoice
endif # NET_DEBUG_L2_IEEE802154_DISPLAY_PACKET
config NET_L2_IEEE802154_ACK_REPLY
bool "Enable IEEE 802.15.4 ACK reply logic"
help

View file

@ -41,17 +41,15 @@ config OPENTHREAD_PLAT
help
This option enables OpenThread platform
if OPENTHREAD_PLAT
menuconfig OPENTHREAD_DEBUG
bool "OpenThread stack log support"
depends on OPENTHREAD_PLAT
help
This option enables log support for OpenThread
if OPENTHREAD_DEBUG
choice
prompt "OpenThread stack log level"
depends on OPENTHREAD_DEBUG
help
This option selects log level for OpenThread stack.
@ -65,10 +63,6 @@ config OPENTHREAD_LOG_LEVEL_DEBUG
bool "Debug"
endchoice
endif
endif
config OPENTHREAD_LOG_LEVEL
int
default 1 if OPENTHREAD_LOG_LEVEL_ERROR
@ -83,6 +77,7 @@ menuconfig OPENTHREAD_L2_DEBUG
This option enables log support for OpenThread
if OPENTHREAD_L2_DEBUG
config OPENTHREAD_L2_DEBUG_DUMP_15_4
bool "Dump 802.15.4 packets"
help

View file

@ -116,15 +116,12 @@ config NET_CONFIG_PEER_IPV4_ADDR
endif # NET_IPV4
if NET_L2_IEEE802154 || IEEE802154_RAW_MODE || NET_L2_OPENTHREAD
config NET_CONFIG_IEEE802154_DEV_NAME
string "IEEE 802.15.4 device name"
depends on NET_L2_IEEE802154 || IEEE802154_RAW_MODE || NET_L2_OPENTHREAD
help
The device name to get bindings from in the sample application.
endif # NET_L2_IEEE802154 || IEEE802154_RAW_MODE || NET_L2_OPENTHREAD
if NET_L2_IEEE802154 || IEEE802154_RAW_MODE
config NET_CONFIG_IEEE802154_PAN_ID
@ -180,17 +177,14 @@ config NET_CONFIG_IEEE802154_SECURITY_LEVEL
endif # NET_L2_IEEE802154 || IEEE802154_RAW_MODE
if NET_L2_BT
config NET_CONFIG_BT_NODE
bool "Enable Bluetooth node support"
depends on NET_L2_BT
select NET_L2_BT_MGMT
help
Enables application to operate in node mode which requires GATT
service to be registered and start advertising as peripheral.
endif # NET_L2_BT
endif # NET_CONFIG_SETTINGS
config NET_CONFIG_CLOCK_SNTP_INIT

View file

@ -196,15 +196,12 @@ config LWM2M_FIRMWARE_UPDATE_PULL_COAP_PROXY_SUPPORT
help
Include support for pulling firmware file via a CoAP-CoAP/HTTP proxy.
if LWM2M_FIRMWARE_UPDATE_PULL_COAP_PROXY_SUPPORT
config LWM2M_FIRMWARE_UPDATE_PULL_COAP_PROXY_ADDR
string "CoAP proxy network address"
depends on LWM2M_FIRMWARE_UPDATE_PULL_COAP_PROXY_SUPPORT
help
Network address of the CoAP proxy server.
endif # LWM2M_FIRMWARE_UPDATE_PULL_COAP_PROXY_SUPPORT
config LWM2M_RW_JSON_SUPPORT
bool "support for JSON writer"
default y

View file

@ -101,16 +101,13 @@ config SHELL_HISTORY
Enable commands history. History can be accessed using up and down
arrows.
if SHELL_HISTORY
config SHELL_HISTORY_BUFFER
int "History buffer in bytes"
default 512
depends on SHELL_HISTORY
help
Number of bytes dedicated for storing executed commands.
endif # SHELL_HISTORY
config SHELL_STATS
bool "Enable shell statistics"
default y

View file

@ -45,17 +45,16 @@ config COVERAGE
For more information see
https://docs.zephyrproject.org/latest/guides/coverage.html
if COVERAGE
config COVERAGE_GCOV
bool "Create Coverage data from hardware platform"
depends on !NATIVE_APPLICATION
default y
depends on COVERAGE
depends on !NATIVE_APPLICATION
help
This option will select the custom gcov library. The reports will
be available over serial. This serial dump can be passed to
gen_gcov_files.py which creates the required .gcda files. These
can be read by gcov utility. For more details see gcovr.com .
endif
config COVERAGE_DUMP
bool "Dump coverage data on exit"

View file

@ -62,12 +62,9 @@ config ZTEST_MOCKING
Enable mocking support for Ztest. This allows the test to set
return values and expected parameters to functions.
if ZTEST_MOCKING
config ZTEST_PARAMETER_COUNT
int "Count of parameters or return values reserved"
default 1
depends on ZTEST_MOCKING
help
Maximum amount of concurrent return values / expected parameters.
endif # ZTEST_MOCKING

View file

@ -59,12 +59,11 @@ config USB_HID_BOOT_PROTOCOL
See Chapter 4.2 of Device Class Definition for Human Interface Devices 1.11
for more information.
if USB_HID_BOOT_PROTOCOL
config USB_HID_PROTOCOL_CODE
int "HID protocol code"
default 0
range 0 2
depends on USB_HID_BOOT_PROTOCOL
help
Sets bIntefaceProtocol in HID instance.
0 = None
@ -73,6 +72,4 @@ config USB_HID_PROTOCOL_CODE
See Chapter 4.3 of Device Class Definition for Human Interface Devices 1.11
for more information.
endif # USB_HID_BOOT_PROTOCOL
endif # USB_DEVICE_HID

View file

@ -57,13 +57,10 @@ config USB_DEVICE_NETWORK_ECM_MAC
endif # USB_DEVICE_NETWORK_ECM
if USB_DEVICE_NETWORK_EEM
config CDC_EEM_BULK_EP_MPS
int
default 64
endif # USB_DEVICE_NETWORK_EEM
depends on USB_DEVICE_NETWORK_EEM
if USB_DEVICE_NETWORK_RNDIS