From 34b1f7c737c1e31adf0236962bcb05f558a5d6a8 Mon Sep 17 00:00:00 2001 From: Erwan Gouriou Date: Fri, 12 May 2023 09:55:27 +0200 Subject: [PATCH] boards: shields: Clean up Kconfig.defconfig files Shield's Kconfig.defconfig files should only be used to configure components options, or drivers specific (eg init priority, ..), depending on driver activation which remains application responsibility. High level components (such as DISPLAY) should not be enabled by default on boards activation (which is similar to policy used for boards). Additionally, clean up busses activation (SPI, I2C), which is not required as bus activation is already done automatically on bus devices activation. Signed-off-by: Erwan Gouriou --- .../Kconfig.defconfig | 3 --- .../adafruit_data_logger/Kconfig.defconfig | 16 --------------- boards/shields/dac80508_evm/Kconfig.defconfig | 13 ------------ boards/shields/frdm_cr20a/Kconfig.defconfig | 3 --- boards/shields/lmp90100_evb/Kconfig.defconfig | 3 --- boards/shields/max3421e/Kconfig.defconfig | 9 --------- boards/shields/mcp2515/Kconfig.defconfig | 6 ------ .../mikroe_adc_click/Kconfig.defconfig | 3 --- boards/shields/npm1100_ek/Kconfig.defconfig | 9 --------- boards/shields/npm1300_ek/Kconfig.defconfig | 15 -------------- boards/shields/npm6001_ek/Kconfig.defconfig | 15 -------------- .../semtech_sx1262mb2das/Kconfig.defconfig | 13 ------------ .../semtech_sx1272mb2das/Kconfig.defconfig | 13 ------------ .../st_b_lcd40_dsi1_mb1166/Kconfig.defconfig | 12 ----------- boards/shields/v2c_daplink/Kconfig.defconfig | 20 ------------------- .../shields/x_nucleo_53l0a1/Kconfig.defconfig | 11 +--------- 16 files changed, 1 insertion(+), 163 deletions(-) delete mode 100644 boards/shields/adafruit_data_logger/Kconfig.defconfig delete mode 100644 boards/shields/dac80508_evm/Kconfig.defconfig delete mode 100644 boards/shields/max3421e/Kconfig.defconfig delete mode 100644 boards/shields/npm1100_ek/Kconfig.defconfig delete mode 100644 boards/shields/npm1300_ek/Kconfig.defconfig delete mode 100644 boards/shields/npm6001_ek/Kconfig.defconfig delete mode 100644 boards/shields/semtech_sx1262mb2das/Kconfig.defconfig delete mode 100644 boards/shields/semtech_sx1272mb2das/Kconfig.defconfig delete mode 100644 boards/shields/st_b_lcd40_dsi1_mb1166/Kconfig.defconfig delete mode 100644 boards/shields/v2c_daplink/Kconfig.defconfig diff --git a/boards/shields/adafruit_2_8_tft_touch_v2/Kconfig.defconfig b/boards/shields/adafruit_2_8_tft_touch_v2/Kconfig.defconfig index 3bb489e6627..fa180f92b4d 100644 --- a/boards/shields/adafruit_2_8_tft_touch_v2/Kconfig.defconfig +++ b/boards/shields/adafruit_2_8_tft_touch_v2/Kconfig.defconfig @@ -3,9 +3,6 @@ if SHIELD_ADAFRUIT_2_8_TFT_TOUCH_V2 || SHIELD_ADAFRUIT_2_8_TFT_TOUCH_V2_NANO -config GPIO - default y - if DISPLAY if INPUT diff --git a/boards/shields/adafruit_data_logger/Kconfig.defconfig b/boards/shields/adafruit_data_logger/Kconfig.defconfig deleted file mode 100644 index e93139d7b64..00000000000 --- a/boards/shields/adafruit_data_logger/Kconfig.defconfig +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) 2019-2023 Henrik Brix Andersen -# SPDX-License-Identifier: Apache-2.0 - -if SHIELD_ADAFRUIT_DATA_LOGGER - -if DISK_ACCESS - -config SPI - default y - -config DISK_DRIVER_SDMMC - default y - -endif # DISK_ACCESS - -endif # SHIELD_ADAFRUIT_DATA_LOGGER diff --git a/boards/shields/dac80508_evm/Kconfig.defconfig b/boards/shields/dac80508_evm/Kconfig.defconfig deleted file mode 100644 index c6c0c6849db..00000000000 --- a/boards/shields/dac80508_evm/Kconfig.defconfig +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2020 M2I Corporation -# SPDX-License-Identifier: Apache-2.0 - -if SHIELD_DAC80508_EVM - -if DAC - -config SPI - default y - -endif # DAC - -endif # SHIELD_DAC80508_EVM diff --git a/boards/shields/frdm_cr20a/Kconfig.defconfig b/boards/shields/frdm_cr20a/Kconfig.defconfig index 146933b57cd..66853a55161 100644 --- a/boards/shields/frdm_cr20a/Kconfig.defconfig +++ b/boards/shields/frdm_cr20a/Kconfig.defconfig @@ -8,9 +8,6 @@ if SHIELD_FRDM_CR20A if IEEE802154 -config SPI - default y - rsource "boards/*.defconfig" endif # IEEE802154 diff --git a/boards/shields/lmp90100_evb/Kconfig.defconfig b/boards/shields/lmp90100_evb/Kconfig.defconfig index 477432bee14..6f7417ff8d0 100644 --- a/boards/shields/lmp90100_evb/Kconfig.defconfig +++ b/boards/shields/lmp90100_evb/Kconfig.defconfig @@ -5,9 +5,6 @@ if SHIELD_LMP90100_EVB if ADC -config SPI - default y - config ADC_LMP90XXX_GPIO default y diff --git a/boards/shields/max3421e/Kconfig.defconfig b/boards/shields/max3421e/Kconfig.defconfig deleted file mode 100644 index cf6f2075f9b..00000000000 --- a/boards/shields/max3421e/Kconfig.defconfig +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -if SHIELD_SPARKFUN_MAX3421E - -config UHC_DRIVER - default y - -endif # SHIELD_SPARKFUN_MAX3421E diff --git a/boards/shields/mcp2515/Kconfig.defconfig b/boards/shields/mcp2515/Kconfig.defconfig index 89c1bfe03b6..fddd5ae1fb4 100644 --- a/boards/shields/mcp2515/Kconfig.defconfig +++ b/boards/shields/mcp2515/Kconfig.defconfig @@ -5,12 +5,6 @@ if SHIELD_DFROBOT_CAN_BUS_V2_0 || SHIELD_KEYESTUDIO_CAN_BUS_KS0411 if CAN -config GPIO - default y - -config SPI - default y - config CAN_INIT_PRIORITY default 80 diff --git a/boards/shields/mikroe_adc_click/Kconfig.defconfig b/boards/shields/mikroe_adc_click/Kconfig.defconfig index 454c9251bf6..3d8ec2317ec 100644 --- a/boards/shields/mikroe_adc_click/Kconfig.defconfig +++ b/boards/shields/mikroe_adc_click/Kconfig.defconfig @@ -5,9 +5,6 @@ if SHIELD_MIKROE_ADC_CLICK if ADC -config SPI - default y - config ADC_INIT_PRIORITY default 80 diff --git a/boards/shields/npm1100_ek/Kconfig.defconfig b/boards/shields/npm1100_ek/Kconfig.defconfig deleted file mode 100644 index fdf12215596..00000000000 --- a/boards/shields/npm1100_ek/Kconfig.defconfig +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -if SHIELD_NPM1100_EK - -config REGULATOR - default y - -endif # SHIELD_NPM1100_EK diff --git a/boards/shields/npm1300_ek/Kconfig.defconfig b/boards/shields/npm1300_ek/Kconfig.defconfig deleted file mode 100644 index 72b27a4f290..00000000000 --- a/boards/shields/npm1300_ek/Kconfig.defconfig +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2023 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -if SHIELD_NPM1300_EK - -config REGULATOR - default y - -config GPIO - default y - -config SENSOR - default y - -endif # SHIELD_NPM1300_EK diff --git a/boards/shields/npm6001_ek/Kconfig.defconfig b/boards/shields/npm6001_ek/Kconfig.defconfig deleted file mode 100644 index 2260fc36a99..00000000000 --- a/boards/shields/npm6001_ek/Kconfig.defconfig +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2022 Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 - -if SHIELD_NPM6001_EK - -config GPIO - default y - -config REGULATOR - default y - -config WATCHDOG - default y - -endif # SHIELD_NPM6001_EK diff --git a/boards/shields/semtech_sx1262mb2das/Kconfig.defconfig b/boards/shields/semtech_sx1262mb2das/Kconfig.defconfig deleted file mode 100644 index 812f95fed88..00000000000 --- a/boards/shields/semtech_sx1262mb2das/Kconfig.defconfig +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2022 Konstantinos Papadopoulos -# SPDX-License-Identifier: Apache-2.0 - -if SHIELD_SEMTECH_SX1262MB2DAS - -if LORA - -config SPI - default y - -endif # LORA - -endif # SHIELD_SEMTECH_SX1262MB2DAS diff --git a/boards/shields/semtech_sx1272mb2das/Kconfig.defconfig b/boards/shields/semtech_sx1272mb2das/Kconfig.defconfig deleted file mode 100644 index 0baed7bad62..00000000000 --- a/boards/shields/semtech_sx1272mb2das/Kconfig.defconfig +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2020 Lemonbeat GmbH -# SPDX-License-Identifier: Apache-2.0 - -if SHIELD_SEMTECH_SX1272MB2DAS - -if LORA - -config SPI - default y - -endif # LORA - -endif # SHIELD_SEMTECH_SX1272MB2DAS diff --git a/boards/shields/st_b_lcd40_dsi1_mb1166/Kconfig.defconfig b/boards/shields/st_b_lcd40_dsi1_mb1166/Kconfig.defconfig deleted file mode 100644 index 1989a2444a7..00000000000 --- a/boards/shields/st_b_lcd40_dsi1_mb1166/Kconfig.defconfig +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) 2023 bytes at work AG -# SPDX-License-Identifier: Apache-2.0 - -if SHIELD_ST_B_LCD40_DSI1_MB1166 - -config DISPLAY - default y - -config GPIO - default y - -endif # SHIELD_ST_B_LCD40_DSI1_MB1166 diff --git a/boards/shields/v2c_daplink/Kconfig.defconfig b/boards/shields/v2c_daplink/Kconfig.defconfig deleted file mode 100644 index 43fc01967bc..00000000000 --- a/boards/shields/v2c_daplink/Kconfig.defconfig +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) 2020 Henrik Brix Andersen -# SPDX-License-Identifier: Apache-2.0 - -if SHIELD_V2C_DAPLINK || SHIELD_V2C_DAPLINK_CFG - -if BOARD_ARTY_A7_ARM_DESIGNSTART_M1 || BOARD_ARTY_A7_ARM_DESIGNSTART_M3 - -if DISK_ACCESS - -config SPI - default y - -config DISK_DRIVER_SDMMC - default y - -endif # DISK_ACCESS - -endif # BOARD_ARTY_A7_ARM_DESIGNSTART_M1 || BOARD_ARTY_A7_ARM_DESIGNSTART_M3 - -endif # SHIELD_V2C_DAPLINK || SHIELD_V2C_DAPLINK_CFG diff --git a/boards/shields/x_nucleo_53l0a1/Kconfig.defconfig b/boards/shields/x_nucleo_53l0a1/Kconfig.defconfig index 99f7f917b1d..e5087c1a0ed 100644 --- a/boards/shields/x_nucleo_53l0a1/Kconfig.defconfig +++ b/boards/shields/x_nucleo_53l0a1/Kconfig.defconfig @@ -3,16 +3,7 @@ if SHIELD_X_NUCLEO_53L0A1 -config GPIO - default y - -config I2C - default y - -config SENSOR - default y - config VL53L0X_RECONFIGURE_ADDRESS - default y + default y if SENSOR endif # SHIELD_X_NUCLEO_53L0A1