boards: Configure I2C/SPI default for boards with accelerometer

For boards with an accelerometer, configure the appropriate bus
(I2C or SPI) default to be enabled if the sensor driver class was enabled.

This change makes no need to add a bunch of board-specific configuration
overlays to the application.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
This commit is contained in:
TOKITA Hiroshi 2022-07-22 01:36:19 +09:00 committed by Maureen Helm
parent e6357ae160
commit 342f74a792
23 changed files with 138 additions and 0 deletions

View file

@ -40,4 +40,14 @@ endchoice
endif # LSM6DSL
if SENSOR
config I2C
default y
config SPI
default y
endif # SENSOR
endif # BOARD_96B_ARGONKEY

View file

@ -11,4 +11,7 @@ config BOARD
config REGULATOR
default y if LORA
config I2C
default y if SENSOR
endif # BOARD_96B_WISTRIO

View file

@ -8,6 +8,13 @@ if BOARD_ACTINIUS_ICARUS || BOARD_ACTINIUS_ICARUS_NS
config BOARD
default "actinius_icarus"
if SENSOR
config I2C
default y
endif # SENSOR
# For the secure version of the board the firmware is linked at the beginning
# of the flash, or into the code-partition defined in DT if it is intended to
# be loaded by MCUboot. If the secure firmware is to be combined with a non-

View file

@ -8,6 +8,13 @@ if BOARD_ACTINIUS_ICARUS_BEE || BOARD_ACTINIUS_ICARUS_BEE_NS
config BOARD
default "actinius_icarus_bee"
if SENSOR
config I2C
default y
endif # SENSOR
# For the secure version of the board the firmware is linked at the beginning
# of the flash, or into the code-partition defined in DT if it is intended to
# be loaded by MCUboot. If the secure firmware is to be combined with a non-

View file

@ -8,6 +8,13 @@ if BOARD_ACTINIUS_ICARUS_SOM || BOARD_ACTINIUS_ICARUS_SOM_NS
config BOARD
default "actinius_icarus_som"
if SENSOR
config I2C
default y
endif # SENSOR
# For the secure version of the board the firmware is linked at the beginning
# of the flash, or into the code-partition defined in DT if it is intended to
# be loaded by MCUboot. If the secure firmware is to be combined with a non-

View file

@ -25,6 +25,13 @@ choice LSM6DSL_TRIGGER_MODE
depends on LSM6DSL
endchoice
if SENSOR
config I2C
default y
endif # SENSOR
if BT
config SPI

View file

@ -11,4 +11,7 @@ config BOARD
config BT_CTLR
default BT
config I2C
default SENSOR
endif # BOARD_BLUECLOVER_PLT_DEMO_V2_NRF52832

View file

@ -15,4 +15,7 @@ config IEEE802154_NRF5
config BT_CTLR
default BT
config I2C
default SENSOR
endif # BOARD_BT510

View file

@ -9,4 +9,7 @@ if BOARD_CC1352R_SENSORTAG
config BOARD
default "cc1352r_sensortag"
config SPI
default SENSOR
endif # BOARD_CC1352R_SENSORTAG

View file

@ -9,6 +9,13 @@ if BOARD_CIRCUITDOJO_FEATHER_NRF9160 || BOARD_CIRCUITDOJO_FEATHER_NRF9160_NS
config BOARD
default "circuitdojo_feather_nrf9160"
if SENSOR
config I2C
default y
endif # SENSOR
# For the secure version of the board the firmware is linked at the beginning
# of the flash, or into the code-partition defined in DT if it is intended to
# be loaded by MCUboot. If the secure firmware is to be combined with a non-

View file

@ -11,6 +11,9 @@ config BOARD
config BT_CTLR
default BT
config I2C
default SENSOR
config SPI
default y
depends on IEEE802154

View file

@ -30,6 +30,13 @@ choice LSM6DSL_TRIGGER_MODE
depends on LSM6DSL
endchoice
if SENSOR
config I2C
default y
endif # SENSOR
if BT
config SPI

View file

@ -23,6 +23,13 @@ config MCG_FRDIV
config MCG_FCRDIV
default 0
if SENSOR
config I2C
default y
endif # SENSOR
if FXOS8700
choice FXOS8700_MODE

View file

@ -8,6 +8,13 @@ if BOARD_LPCXPRESSO55S28
config BOARD
default "lpcxpresso55S28"
if SENSOR
config I2C
default y
endif # SENSOR
if FXOS8700
choice FXOS8700_MODE

View file

@ -9,6 +9,13 @@ config BOARD
default "lpcxpresso55S69_cpu0" if BOARD_LPCXPRESSO55S69_CPU0
default "lpcxpresso55S69_cpu1" if BOARD_LPCXPRESSO55S69_CPU1
if SENSOR
config I2C
default y
endif # SENSOR
if FXOS8700
choice FXOS8700_MODE

View file

@ -45,4 +45,7 @@ config BT_HCI_VS
config REGULATOR
default y if SENSOR
config I2C
default y if SENSOR
endif # BOARD_NRF9160_INNBLUE21 || BOARD_NRF9160_INNBLUE21_NS

View file

@ -45,4 +45,7 @@ config BT_HCI_VS
config REGULATOR
default y if SENSOR
config I2C
default y if SENSOR
endif # BOARD_NRF9160_INNBLUE22 || BOARD_NRF9160_INNBLUE22_NS

View file

@ -14,4 +14,7 @@ config MODEM_QUECTEL_BG9X
config BT_CTLR
default BT
config I2C
default SENSOR
endif # BOARD_RAK5010_NRF52840

View file

@ -26,6 +26,13 @@ config FLASH_LOAD_SIZE
default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
depends on BOARD_SPARKFUN_THING_PLUS_NRF9160 && TRUSTED_EXECUTION_SECURE
if SENSOR
config I2C
default y
endif # SENSOR
if BOARD_SPARKFUN_THING_PLUS_NRF9160_NS
config FLASH_LOAD_OFFSET

View file

@ -13,6 +13,13 @@ choice STM32_LPTIM_CLOCK
depends on STM32_LPTIM_TIMER
endchoice
if SENSOR
config I2C
default y
endif # SENSOR
if BT
config SPI

View file

@ -0,0 +1,10 @@
# Copyright (c) 2022 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
#
# SPDX-License-Identifier: Apache-2.0
if SHIELD_BOOSTXL_ULPSENSE
config SPI
default y if SENSOR
endif # SHIELD_BOOSTXL_ULPSENSE

View file

@ -0,0 +1,10 @@
# Copyright (c) 2022 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
#
# SPDX-License-Identifier: Apache-2.0
if SHIELD_X_NUCLEO_IKS01A2
config I2C
default y if SENSOR
endif # SHIELD_X_NUCLEO_IKS01A2

View file

@ -2,4 +2,11 @@
#
# SPDX-License-Identifier: Apache-2.0
if SHIELD_X_NUCLEO_IKS02A1
config I2C
default y if SENSOR
endif # SHIELD_X_NUCLEO_IKS02A1
rsource "boards/*.defconfig"