Kconfig: Support Enable/Disable lis2dw on chips with small flash size

Signed-off-by: Alan.Ma from BigTreeTech tech@biqu3d.com
This commit is contained in:
bigtreetech 2023-08-10 09:49:37 +08:00 committed by KevinOConnor
parent 073665cebb
commit 5f990f93d5
4 changed files with 11 additions and 1 deletions

View File

@ -100,6 +100,10 @@ config WANT_SENSORS
bool bool
depends on HAVE_GPIO_I2C || HAVE_GPIO_SPI depends on HAVE_GPIO_I2C || HAVE_GPIO_SPI
default y default y
config WANT_LIS2DW
bool
depends on HAVE_GPIO_SPI
default y
config WANT_SOFTWARE_I2C config WANT_SOFTWARE_I2C
bool bool
depends on HAVE_GPIO && HAVE_GPIO_I2C depends on HAVE_GPIO && HAVE_GPIO_I2C
@ -119,6 +123,9 @@ config WANT_DISPLAYS
config WANT_SENSORS config WANT_SENSORS
bool "Support external sensor devices" bool "Support external sensor devices"
depends on HAVE_GPIO_I2C || HAVE_GPIO_SPI depends on HAVE_GPIO_I2C || HAVE_GPIO_SPI
config WANT_LIS2DW
bool "Support lis2dw 3-axis accelerometer"
depends on HAVE_GPIO_SPI
config WANT_SOFTWARE_I2C config WANT_SOFTWARE_I2C
bool "Support software based I2C \"bit-banging\"" bool "Support software based I2C \"bit-banging\""
depends on HAVE_GPIO && HAVE_GPIO_I2C depends on HAVE_GPIO && HAVE_GPIO_I2C

View File

@ -15,6 +15,7 @@ src-$(CONFIG_WANT_DISPLAYS) += lcd_st7920.c lcd_hd44780.c
src-$(CONFIG_WANT_SOFTWARE_SPI) += spi_software.c src-$(CONFIG_WANT_SOFTWARE_SPI) += spi_software.c
src-$(CONFIG_WANT_SOFTWARE_I2C) += i2c_software.c src-$(CONFIG_WANT_SOFTWARE_I2C) += i2c_software.c
sensors-src-$(CONFIG_HAVE_GPIO_SPI) := thermocouple.c sensor_adxl345.c \ sensors-src-$(CONFIG_HAVE_GPIO_SPI) := thermocouple.c sensor_adxl345.c \
sensor_angle.c sensor_lis2dw.c sensor_angle.c
src-$(CONFIG_WANT_LIS2DW) += sensor_lis2dw.c
sensors-src-$(CONFIG_HAVE_GPIO_I2C) += sensor_mpu9250.c sensors-src-$(CONFIG_HAVE_GPIO_I2C) += sensor_mpu9250.c
src-$(CONFIG_WANT_SENSORS) += $(sensors-src-y) src-$(CONFIG_WANT_SENSORS) += $(sensors-src-y)

View File

@ -3,3 +3,4 @@ CONFIG_MACH_AR100=y
CONFIG_WANT_DISPLAYS=n CONFIG_WANT_DISPLAYS=n
CONFIG_WANT_SOFTWARE_I2C=n CONFIG_WANT_SOFTWARE_I2C=n
CONFIG_WANT_SOFTWARE_SPI=n CONFIG_WANT_SOFTWARE_SPI=n
CONFIG_WANT_LIS2DW=n

View File

@ -2,3 +2,4 @@
CONFIG_MACH_STM32=y CONFIG_MACH_STM32=y
CONFIG_MACH_STM32F042=y CONFIG_MACH_STM32F042=y
CONFIG_WANT_SOFTWARE_I2C=n CONFIG_WANT_SOFTWARE_I2C=n
CONFIG_WANT_LIS2DW=n