[OpenWrt-Devel] [PATCH] kernel: iio: add st-accel driver modules

Tim Harvey tharvey at gateworks.com
Fri Feb 28 11:56:24 EST 2020


Signed-off-by: Tim Harvey <tharvey at gateworks.com>
---
 package/kernel/linux/modules/iio.mk | 54 +++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/package/kernel/linux/modules/iio.mk b/package/kernel/linux/modules/iio.mk
index cd46697..aaccbde 100644
--- a/package/kernel/linux/modules/iio.mk
+++ b/package/kernel/linux/modules/iio.mk
@@ -278,6 +278,60 @@ endef
 $(eval $(call KernelPackage,iio-si7020))
 
 
+define KernelPackage/iio-st_accel
+  SUBMENU:=$(IIO_MENU)
+  TITLE:=STMicroelectronics accelerometer 3-Axis Driver
+  DEPENDS:=+kmod-iio-core
+  KCONFIG:= \
+	CONFIG_IIO_ST_ACCEL_3AXIS \
+	CONFIG_IIO_ST_SENSORS_CORE
+  FILES:= \
+	$(LINUX_DIR)/drivers/iio/accel/st_accel.ko \
+	$(LINUX_DIR)/drivers/iio/common/st_sensors/st_sensors.ko
+endef
+
+define KernelPackage/iio-st_accel/description
+ This package adds support for STMicroelectronics accelerometers:
+  LSM303DLH, LSM303DLHC, LIS3DH, LSM330D, LSM330DL, LSM330DLC,
+  LIS331DLH, LSM303DL, LSM303DLM, LSM330, LIS2DH12, H3LIS331DL,
+  LNG2DM, LIS3DE, LIS2DE12
+endef
+
+$(eval $(call KernelPackage,iio-st_accel))
+
+
+define KernelPackage/iio-st_sensors-i2c
+  SUBMENU:=$(IIO_MENU)
+  TITLE:=STMicroelectronics accelerometer 3-Axis Driver (I2C)
+  DEPENDS:=+kmod-iio-st_accel +kmod-i2c-core
+  KCONFIG:= CONFIG_IIO_ST_ACCEL_I2C_3AXIS
+  FILES:=$(LINUX_DIR)/drivers/iio/common/st_sensors/st_sensors_i2c.ko
+  AUTOLOAD:=$(call AutoLoad,56,st_sensors_i2c)
+endef
+
+define KernelPackage/iio-st_sensors-i2c/description
+ This package adds support for STMicroelectronics I2C based accelerometers
+endef
+
+$(eval $(call KernelPackage,iio-st_sensors-i2c))
+
+
+define KernelPackage/iio-st_sensors-spi
+  SUBMENU:=$(IIO_MENU)
+  TITLE:=STMicroelectronics accelerometer 3-Axis Driver (SPI)
+  DEPENDS:=+kmod-iio-st_accel
+  KCONFIG:= CONFIG_IIO_ST_ACCEL_SPI_3AXIS
+  FILES:=$(LINUX_DIR)/drivers/iio/common/st_sensors/st_sensors_spi.ko
+  AUTOLOAD:=$(call AutoLoad,56,st_sensors_spi)
+endef
+
+define KernelPackage/iio-st_sensors-spi/description
+ This package adds support for STMicroelectronics SPI based accelerometers
+endef
+
+$(eval $(call KernelPackage,iio-st_sensors-spi))
+
+
 define KernelPackage/iio-tsl4531
   SUBMENU:=$(IIO_MENU)
   DEPENDS:=+kmod-i2c-core +kmod-iio-core
-- 
2.7.4


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list