diff --git a/src/Kconfig b/src/Kconfig index 915af2956a75..aaf506539493 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -100,6 +100,10 @@ config WANT_SENSORS bool depends on HAVE_GPIO_I2C || HAVE_GPIO_SPI default y +config WANT_LIS2DW + bool + depends on HAVE_GPIO_SPI + default y config WANT_SOFTWARE_I2C bool depends on HAVE_GPIO && HAVE_GPIO_I2C @@ -119,6 +123,9 @@ config WANT_DISPLAYS config WANT_SENSORS bool "Support external sensor devices" 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 bool "Support software based I2C \"bit-banging\"" depends on HAVE_GPIO && HAVE_GPIO_I2C diff --git a/src/Makefile b/src/Makefile index 0fcfacecd583..8d771f9eb484 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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_I2C) += i2c_software.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 src-$(CONFIG_WANT_SENSORS) += $(sensors-src-y) diff --git a/test/configs/ar100.config b/test/configs/ar100.config index a717fe3d0a73..6c9174824b5e 100644 --- a/test/configs/ar100.config +++ b/test/configs/ar100.config @@ -3,3 +3,4 @@ CONFIG_MACH_AR100=y CONFIG_WANT_DISPLAYS=n CONFIG_WANT_SOFTWARE_I2C=n CONFIG_WANT_SOFTWARE_SPI=n +CONFIG_WANT_LIS2DW=n diff --git a/test/configs/stm32f042.config b/test/configs/stm32f042.config index 85338f2e77f6..7f1e879fbb18 100644 --- a/test/configs/stm32f042.config +++ b/test/configs/stm32f042.config @@ -2,3 +2,4 @@ CONFIG_MACH_STM32=y CONFIG_MACH_STM32F042=y CONFIG_WANT_SOFTWARE_I2C=n +CONFIG_WANT_LIS2DW=n