From: Stijn Tintel Date: Sun, 7 Apr 2019 22:39:34 +0000 (+0300) Subject: kernel: add kmod-iio-bme680 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4b9a07336ae7d5da179c85aae8db9de739c4c5a2;p=oweals%2Fopenwrt.git kernel: add kmod-iio-bme680 This driver supports the Bosch Sensortec BME680 gas, humidity, pressure and temperature sensor. Tested I2C and SPI modes on a Raspberry Pi Zero W. Signed-off-by: Stijn Tintel --- diff --git a/package/kernel/linux/modules/iio.mk b/package/kernel/linux/modules/iio.mk index 2d5cd6e11e..1ec3c968d3 100644 --- a/package/kernel/linux/modules/iio.mk +++ b/package/kernel/linux/modules/iio.mk @@ -129,6 +129,51 @@ endef $(eval $(call KernelPackage,iio-dht11)) + +define KernelPackage/iio-bme680 + SUBMENU:=$(IIO_MENU) + TITLE:=BME680 gas/humidity/pressure/temperature sensor + DEPENDS:=@LINUX_4_19 +kmod-iio-core +kmod-regmap-core + KCONFIG:=CONFIG_BME680 + FILES:=$(LINUX_DIR)/drivers/iio/chemical/bme680_core.ko +endef + +define KernelPackage/iio-bme680/description + This driver adds support for Bosch Sensortec BME680 sensor with gas, + humidity, pressure and temperatue sensing capability. +endef + +$(eval $(call KernelPackage,iio-bme680)) + +define KernelPackage/iio-bme680-i2c + SUBMENU:=$(IIO_MENU) + TITLE:=BME680 gas/humidity/pressure/temperature sensor (I2C) + DEPENDS:=+kmod-iio-bme680 +kmod-regmap-i2c + KCONFIG:=CONFIG_BME680_I2C + FILES:=$(LINUX_DIR)/drivers/iio/chemical/bme680_i2c.ko + AUTOLOAD:=$(call AutoProbe,bme680-i2c) +endef +define KernelPackage/iio-bme680-i2c/description + This driver adds support for Bosch Sensortec's BME680 connected via I2C. +endef + +$(eval $(call KernelPackage,iio-bme680-i2c)) + +define KernelPackage/iio-bme680-spi + SUBMENU:=$(IIO_MENU) + TITLE:=BME680 gas/humidity/pressure/temperature sensor (SPI) + DEPENDS:=+kmod-iio-bme680 +kmod-regmap-spi + KCONFIG:=CONFIG_BME680_SPI + FILES:=$(LINUX_DIR)/drivers/iio/chemical/bme680_spi.ko + AUTOLOAD:=$(call AutoProbe,bme680-spi) +endef +define KernelPackage/iio-bme680-spi/description + This driver adds support for Bosch Sensortec's BME680 connected via SPI. +endef + +$(eval $(call KernelPackage,iio-bme680-spi)) + + define KernelPackage/iio-bmp280 SUBMENU:=$(IIO_MENU) TITLE:=BMP180/BMP280/BME280 pressure/temperatur sensor