drivers/sensor: fix some ST drivers dependency to HAL_ST module
In order to avoid build failures as described in issue #67242, make all ST drivers using HAL_ST module dependent to HAL_STMEMSC and HAS_STLIB libs, which need to be configured in all samples referring to them. Signed-off-by: Armando Visconti <armando.visconti@st.com>
This commit is contained in:
parent
76f547e763
commit
765519ea92
|
@ -4066,7 +4066,7 @@ West:
|
||||||
collaborators:
|
collaborators:
|
||||||
- erwango
|
- erwango
|
||||||
files:
|
files:
|
||||||
- modules/Kconfig.st
|
- modules/hal_st/Kconfig
|
||||||
labels:
|
labels:
|
||||||
- "area: Sensors"
|
- "area: Sensors"
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ menuconfig HTS221
|
||||||
bool "HTS221 temperature and humidity sensor"
|
bool "HTS221 temperature and humidity sensor"
|
||||||
default y
|
default y
|
||||||
depends on DT_HAS_ST_HTS221_ENABLED
|
depends on DT_HAS_ST_HTS221_ENABLED
|
||||||
|
depends on ZEPHYR_HAL_ST_MODULE
|
||||||
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_HTS221),i2c)
|
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_HTS221),i2c)
|
||||||
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_HTS221),spi)
|
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_HTS221),spi)
|
||||||
select HAS_STMEMSC
|
select HAS_STMEMSC
|
||||||
|
|
|
@ -7,6 +7,7 @@ config I3G4250D
|
||||||
bool "I3G4250D three-axis digital output gyroscope"
|
bool "I3G4250D three-axis digital output gyroscope"
|
||||||
default y
|
default y
|
||||||
depends on DT_HAS_ST_I3G4250D_ENABLED
|
depends on DT_HAS_ST_I3G4250D_ENABLED
|
||||||
|
depends on ZEPHYR_HAL_ST_MODULE
|
||||||
select SPI
|
select SPI
|
||||||
select HAS_STMEMSC
|
select HAS_STMEMSC
|
||||||
select USE_STDC_I3G4250D
|
select USE_STDC_I3G4250D
|
||||||
|
|
|
@ -7,6 +7,7 @@ menuconfig IIS2DH
|
||||||
bool "IIS2DH I2C/SPI accelerometer sensor driver"
|
bool "IIS2DH I2C/SPI accelerometer sensor driver"
|
||||||
default y
|
default y
|
||||||
depends on DT_HAS_ST_IIS2DH_ENABLED
|
depends on DT_HAS_ST_IIS2DH_ENABLED
|
||||||
|
depends on ZEPHYR_HAL_ST_MODULE
|
||||||
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_IIS2DH),i2c)
|
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_IIS2DH),i2c)
|
||||||
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_IIS2DH),spi)
|
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_IIS2DH),spi)
|
||||||
select HAS_STMEMSC
|
select HAS_STMEMSC
|
||||||
|
|
|
@ -7,6 +7,7 @@ menuconfig IIS2DLPC
|
||||||
bool "IIS2DLPC I2C/SPI accelerometer sensor driver"
|
bool "IIS2DLPC I2C/SPI accelerometer sensor driver"
|
||||||
default y
|
default y
|
||||||
depends on DT_HAS_ST_IIS2DLPC_ENABLED
|
depends on DT_HAS_ST_IIS2DLPC_ENABLED
|
||||||
|
depends on ZEPHYR_HAL_ST_MODULE
|
||||||
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_IIS2DLPC),i2c)
|
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_IIS2DLPC),i2c)
|
||||||
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_IIS2DLPC),spi)
|
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_IIS2DLPC),spi)
|
||||||
select HAS_STMEMSC
|
select HAS_STMEMSC
|
||||||
|
|
|
@ -7,6 +7,7 @@ menuconfig IIS2ICLX
|
||||||
bool "IIS2ICLX I2C/SPI accelerometer Chip"
|
bool "IIS2ICLX I2C/SPI accelerometer Chip"
|
||||||
default y
|
default y
|
||||||
depends on DT_HAS_ST_IIS2ICLX_ENABLED
|
depends on DT_HAS_ST_IIS2ICLX_ENABLED
|
||||||
|
depends on ZEPHYR_HAL_ST_MODULE
|
||||||
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_IIS2ICLX),i2c)
|
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_IIS2ICLX),i2c)
|
||||||
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_IIS2ICLX),spi)
|
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_IIS2ICLX),spi)
|
||||||
select HAS_STMEMSC
|
select HAS_STMEMSC
|
||||||
|
|
|
@ -5,6 +5,7 @@ menuconfig IIS2MDC
|
||||||
bool "IIS2MDC Magnetometer"
|
bool "IIS2MDC Magnetometer"
|
||||||
default y
|
default y
|
||||||
depends on DT_HAS_ST_IIS2MDC_ENABLED
|
depends on DT_HAS_ST_IIS2MDC_ENABLED
|
||||||
|
depends on ZEPHYR_HAL_ST_MODULE
|
||||||
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_IIS2MDC),i2c)
|
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_IIS2MDC),i2c)
|
||||||
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_IIS2MDC),spi)
|
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_IIS2MDC),spi)
|
||||||
select HAS_STMEMSC
|
select HAS_STMEMSC
|
||||||
|
|
|
@ -7,6 +7,7 @@ menuconfig IIS3DHHC
|
||||||
bool "IIS3DHHC accelerometer sensor"
|
bool "IIS3DHHC accelerometer sensor"
|
||||||
default y
|
default y
|
||||||
depends on DT_HAS_ST_IIS3DHHC_ENABLED
|
depends on DT_HAS_ST_IIS3DHHC_ENABLED
|
||||||
|
depends on ZEPHYR_HAL_ST_MODULE
|
||||||
select SPI
|
select SPI
|
||||||
select HAS_STMEMSC
|
select HAS_STMEMSC
|
||||||
select USE_STDC_IIS3DHHC
|
select USE_STDC_IIS3DHHC
|
||||||
|
|
|
@ -7,6 +7,7 @@ menuconfig ISM330DHCX
|
||||||
bool "ISM330DHCX I2C/SPI accelerometer and gyroscope Chip"
|
bool "ISM330DHCX I2C/SPI accelerometer and gyroscope Chip"
|
||||||
default y
|
default y
|
||||||
depends on DT_HAS_ST_ISM330DHCX_ENABLED
|
depends on DT_HAS_ST_ISM330DHCX_ENABLED
|
||||||
|
depends on ZEPHYR_HAL_ST_MODULE
|
||||||
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_ISM330DHCX),i2c)
|
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_ISM330DHCX),i2c)
|
||||||
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_ISM330DHCX),spi)
|
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_ISM330DHCX),spi)
|
||||||
select HAS_STMEMSC
|
select HAS_STMEMSC
|
||||||
|
|
|
@ -7,6 +7,7 @@ menuconfig LIS2DS12
|
||||||
bool "LIS2DS12 I2C/SPI accelerometer sensor driver"
|
bool "LIS2DS12 I2C/SPI accelerometer sensor driver"
|
||||||
default y
|
default y
|
||||||
depends on DT_HAS_ST_LIS2DS12_ENABLED
|
depends on DT_HAS_ST_LIS2DS12_ENABLED
|
||||||
|
depends on ZEPHYR_HAL_ST_MODULE
|
||||||
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LIS2DS12),i2c)
|
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LIS2DS12),i2c)
|
||||||
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_LIS2DS12),spi)
|
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_LIS2DS12),spi)
|
||||||
select HAS_STMEMSC
|
select HAS_STMEMSC
|
||||||
|
|
|
@ -7,6 +7,7 @@ menuconfig LIS2DU12
|
||||||
bool "LIS2DU12 I2C/SPI smartxl Chip"
|
bool "LIS2DU12 I2C/SPI smartxl Chip"
|
||||||
default y
|
default y
|
||||||
depends on DT_HAS_ST_LIS2DU12_ENABLED
|
depends on DT_HAS_ST_LIS2DU12_ENABLED
|
||||||
|
depends on ZEPHYR_HAL_ST_MODULE
|
||||||
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LIS2DU12),i2c)
|
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LIS2DU12),i2c)
|
||||||
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_LIS2DU12),spi)
|
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_LIS2DU12),spi)
|
||||||
select HAS_STMEMSC
|
select HAS_STMEMSC
|
||||||
|
|
|
@ -7,6 +7,7 @@ menuconfig LIS2DW12
|
||||||
bool "LIS2DW12 I2C/SPI accelerometer sensor driver"
|
bool "LIS2DW12 I2C/SPI accelerometer sensor driver"
|
||||||
default y
|
default y
|
||||||
depends on DT_HAS_ST_LIS2DW12_ENABLED
|
depends on DT_HAS_ST_LIS2DW12_ENABLED
|
||||||
|
depends on ZEPHYR_HAL_ST_MODULE
|
||||||
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LIS2DW12),i2c)
|
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LIS2DW12),i2c)
|
||||||
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_LIS2DW12),spi)
|
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_LIS2DW12),spi)
|
||||||
select HAS_STMEMSC
|
select HAS_STMEMSC
|
||||||
|
|
|
@ -5,6 +5,7 @@ menuconfig LIS2MDL
|
||||||
bool "LIS2MDL Magnetometer"
|
bool "LIS2MDL Magnetometer"
|
||||||
default y
|
default y
|
||||||
depends on DT_HAS_ST_LIS2MDL_ENABLED
|
depends on DT_HAS_ST_LIS2MDL_ENABLED
|
||||||
|
depends on ZEPHYR_HAL_ST_MODULE
|
||||||
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LIS2MDL),i2c)
|
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LIS2MDL),i2c)
|
||||||
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_LIS2MDL),spi)
|
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_LIS2MDL),spi)
|
||||||
select HAS_STMEMSC
|
select HAS_STMEMSC
|
||||||
|
|
|
@ -7,6 +7,7 @@ menuconfig LPS22HH
|
||||||
bool "LPS22HH pressure and temperature"
|
bool "LPS22HH pressure and temperature"
|
||||||
default y
|
default y
|
||||||
depends on DT_HAS_ST_LPS22HH_ENABLED
|
depends on DT_HAS_ST_LPS22HH_ENABLED
|
||||||
|
depends on ZEPHYR_HAL_ST_MODULE
|
||||||
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LPS22HH),i2c)
|
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LPS22HH),i2c)
|
||||||
select I3C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LPS22HH),i3c)
|
select I3C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LPS22HH),i3c)
|
||||||
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_LPS22HH),spi)
|
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_LPS22HH),spi)
|
||||||
|
|
|
@ -8,6 +8,7 @@ menuconfig LPS2XDF
|
||||||
bool "LPS2xDF pressure and temperature"
|
bool "LPS2xDF pressure and temperature"
|
||||||
default y
|
default y
|
||||||
depends on DT_HAS_ST_LPS22DF_ENABLED || DT_HAS_ST_LPS28DFW_ENABLED
|
depends on DT_HAS_ST_LPS22DF_ENABLED || DT_HAS_ST_LPS28DFW_ENABLED
|
||||||
|
depends on ZEPHYR_HAL_ST_MODULE
|
||||||
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LPS22DF),i2c) ||\
|
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LPS22DF),i2c) ||\
|
||||||
$(dt_compat_on_bus,$(DT_COMPAT_ST_LPS28DFW),i2c)
|
$(dt_compat_on_bus,$(DT_COMPAT_ST_LPS28DFW),i2c)
|
||||||
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LPS22DF),i3c) ||\
|
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LPS22DF),i3c) ||\
|
||||||
|
|
|
@ -7,6 +7,7 @@ menuconfig LSM6DSO
|
||||||
bool "LSM6DSO I2C/SPI accelerometer and gyroscope Chip"
|
bool "LSM6DSO I2C/SPI accelerometer and gyroscope Chip"
|
||||||
default y
|
default y
|
||||||
depends on DT_HAS_ST_LSM6DSO_ENABLED
|
depends on DT_HAS_ST_LSM6DSO_ENABLED
|
||||||
|
depends on ZEPHYR_HAL_ST_MODULE
|
||||||
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LSM6DSO),i2c)
|
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LSM6DSO),i2c)
|
||||||
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_LSM6DSO),spi)
|
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_LSM6DSO),spi)
|
||||||
select HAS_STMEMSC
|
select HAS_STMEMSC
|
||||||
|
|
|
@ -7,6 +7,7 @@ menuconfig LSM6DSO16IS
|
||||||
bool "LSM6DSO16IS I2C/SPI accelerometer and gyroscope Chip"
|
bool "LSM6DSO16IS I2C/SPI accelerometer and gyroscope Chip"
|
||||||
default y
|
default y
|
||||||
depends on DT_HAS_ST_LSM6DSO16IS_ENABLED
|
depends on DT_HAS_ST_LSM6DSO16IS_ENABLED
|
||||||
|
depends on ZEPHYR_HAL_ST_MODULE
|
||||||
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LSM6DSO16IS),i2c)
|
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LSM6DSO16IS),i2c)
|
||||||
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_LSM6DSO16IS),spi)
|
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_LSM6DSO16IS),spi)
|
||||||
select HAS_STMEMSC
|
select HAS_STMEMSC
|
||||||
|
|
|
@ -7,6 +7,7 @@ menuconfig LSM6DSV16X
|
||||||
bool "LSM6DSV16X I2C/SPI accelerometer and gyroscope Chip"
|
bool "LSM6DSV16X I2C/SPI accelerometer and gyroscope Chip"
|
||||||
default y
|
default y
|
||||||
depends on DT_HAS_ST_LSM6DSV16X_ENABLED
|
depends on DT_HAS_ST_LSM6DSV16X_ENABLED
|
||||||
|
depends on ZEPHYR_HAL_ST_MODULE
|
||||||
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LSM6DSV16X),i2c)
|
select I2C if $(dt_compat_on_bus,$(DT_COMPAT_ST_LSM6DSV16X),i2c)
|
||||||
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_LSM6DSV16X),spi)
|
select SPI if $(dt_compat_on_bus,$(DT_COMPAT_ST_LSM6DSV16X),spi)
|
||||||
select HAS_STMEMSC
|
select HAS_STMEMSC
|
||||||
|
|
|
@ -7,6 +7,7 @@ menuconfig STTS751
|
||||||
bool "STTS751 temperature sensor"
|
bool "STTS751 temperature sensor"
|
||||||
default y
|
default y
|
||||||
depends on DT_HAS_ST_STTS751_ENABLED
|
depends on DT_HAS_ST_STTS751_ENABLED
|
||||||
|
depends on ZEPHYR_HAL_ST_MODULE
|
||||||
select I2C
|
select I2C
|
||||||
select HAS_STMEMSC
|
select HAS_STMEMSC
|
||||||
select USE_STDC_STTS751
|
select USE_STDC_STTS751
|
||||||
|
|
|
@ -7,6 +7,7 @@ menuconfig VL53L0X
|
||||||
bool "VL53L0X time of flight sensor"
|
bool "VL53L0X time of flight sensor"
|
||||||
default y
|
default y
|
||||||
depends on DT_HAS_ST_VL53L0X_ENABLED
|
depends on DT_HAS_ST_VL53L0X_ENABLED
|
||||||
|
depends on ZEPHYR_HAL_ST_MODULE
|
||||||
select I2C
|
select I2C
|
||||||
select HAS_STLIB
|
select HAS_STLIB
|
||||||
help
|
help
|
||||||
|
|
|
@ -7,6 +7,7 @@ menuconfig VL53L1X
|
||||||
bool "VL53L1X time of flight sensor"
|
bool "VL53L1X time of flight sensor"
|
||||||
default y
|
default y
|
||||||
depends on DT_HAS_ST_VL53L1X_ENABLED
|
depends on DT_HAS_ST_VL53L1X_ENABLED
|
||||||
|
depends on ZEPHYR_HAL_ST_MODULE
|
||||||
select I2C
|
select I2C
|
||||||
select HAS_STLIB
|
select HAS_STLIB
|
||||||
help
|
help
|
||||||
|
|
|
@ -31,7 +31,6 @@ source "modules/Kconfig.nxp_s32"
|
||||||
source "modules/Kconfig.silabs"
|
source "modules/Kconfig.silabs"
|
||||||
source "modules/Kconfig.simplelink"
|
source "modules/Kconfig.simplelink"
|
||||||
source "modules/Kconfig.sof"
|
source "modules/Kconfig.sof"
|
||||||
source "modules/Kconfig.st"
|
|
||||||
source "modules/Kconfig.stm32"
|
source "modules/Kconfig.stm32"
|
||||||
source "modules/Kconfig.syst"
|
source "modules/Kconfig.syst"
|
||||||
source "modules/Kconfig.telink"
|
source "modules/Kconfig.telink"
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
# STLIB config
|
# Copyright (c) 2024 STMicroelectronics
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
# Copyright (c) 2017 STMicroelectronics
|
config ZEPHYR_HAL_ST_MODULE
|
||||||
|
bool
|
||||||
|
|
||||||
config HAS_STLIB
|
config HAS_STLIB
|
||||||
bool
|
bool
|
Loading…
Reference in a new issue