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:
parent
e6357ae160
commit
342f74a792
23 changed files with 138 additions and 0 deletions
|
|
@ -40,4 +40,14 @@ endchoice
|
|||
|
||||
endif # LSM6DSL
|
||||
|
||||
if SENSOR
|
||||
|
||||
config I2C
|
||||
default y
|
||||
|
||||
config SPI
|
||||
default y
|
||||
|
||||
endif # SENSOR
|
||||
|
||||
endif # BOARD_96B_ARGONKEY
|
||||
|
|
|
|||
|
|
@ -11,4 +11,7 @@ config BOARD
|
|||
config REGULATOR
|
||||
default y if LORA
|
||||
|
||||
config I2C
|
||||
default y if SENSOR
|
||||
|
||||
endif # BOARD_96B_WISTRIO
|
||||
|
|
|
|||
|
|
@ -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-
|
||||
|
|
|
|||
|
|
@ -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-
|
||||
|
|
|
|||
|
|
@ -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-
|
||||
|
|
|
|||
|
|
@ -25,6 +25,13 @@ choice LSM6DSL_TRIGGER_MODE
|
|||
depends on LSM6DSL
|
||||
endchoice
|
||||
|
||||
if SENSOR
|
||||
|
||||
config I2C
|
||||
default y
|
||||
|
||||
endif # SENSOR
|
||||
|
||||
if BT
|
||||
|
||||
config SPI
|
||||
|
|
|
|||
|
|
@ -11,4 +11,7 @@ config BOARD
|
|||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config I2C
|
||||
default SENSOR
|
||||
|
||||
endif # BOARD_BLUECLOVER_PLT_DEMO_V2_NRF52832
|
||||
|
|
|
|||
|
|
@ -15,4 +15,7 @@ config IEEE802154_NRF5
|
|||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config I2C
|
||||
default SENSOR
|
||||
|
||||
endif # BOARD_BT510
|
||||
|
|
|
|||
|
|
@ -9,4 +9,7 @@ if BOARD_CC1352R_SENSORTAG
|
|||
config BOARD
|
||||
default "cc1352r_sensortag"
|
||||
|
||||
config SPI
|
||||
default SENSOR
|
||||
|
||||
endif # BOARD_CC1352R_SENSORTAG
|
||||
|
|
|
|||
|
|
@ -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-
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@ config BOARD
|
|||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config I2C
|
||||
default SENSOR
|
||||
|
||||
config SPI
|
||||
default y
|
||||
depends on IEEE802154
|
||||
|
|
|
|||
|
|
@ -30,6 +30,13 @@ choice LSM6DSL_TRIGGER_MODE
|
|||
depends on LSM6DSL
|
||||
endchoice
|
||||
|
||||
if SENSOR
|
||||
|
||||
config I2C
|
||||
default y
|
||||
|
||||
endif # SENSOR
|
||||
|
||||
if BT
|
||||
|
||||
config SPI
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -8,6 +8,13 @@ if BOARD_LPCXPRESSO55S28
|
|||
config BOARD
|
||||
default "lpcxpresso55S28"
|
||||
|
||||
if SENSOR
|
||||
|
||||
config I2C
|
||||
default y
|
||||
|
||||
endif # SENSOR
|
||||
|
||||
if FXOS8700
|
||||
|
||||
choice FXOS8700_MODE
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -14,4 +14,7 @@ config MODEM_QUECTEL_BG9X
|
|||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config I2C
|
||||
default SENSOR
|
||||
|
||||
endif # BOARD_RAK5010_NRF52840
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
10
boards/shields/boostxl_ulpsense/Kconfig.defconfig
Normal file
10
boards/shields/boostxl_ulpsense/Kconfig.defconfig
Normal 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
|
||||
10
boards/shields/x_nucleo_iks01a2/Kconfig.defconfig
Normal file
10
boards/shields/x_nucleo_iks01a2/Kconfig.defconfig
Normal 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
|
||||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in a new issue