From: Tim Harvey Date: Fri, 28 Feb 2020 16:56:24 +0000 (-0800) Subject: kernel: iio: add st-accel driver modules X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=2d8f4c4fbd4699d579c4886fb6fa8f992b35c432;p=openwrt%2Fstaging%2Faparcar.git kernel: iio: add st-accel driver modules Adds kernel modules for various STMicroelectronics accelerometers. Signed-off-by: Tim Harvey [added missing commit description] Signed-off-by: Petr Štetiar --- diff --git a/package/kernel/linux/modules/iio.mk b/package/kernel/linux/modules/iio.mk index cd46697168..aaccbdee7d 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