aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/linux/modules/iio.mk
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2020-02-23 21:45:05 +0100
committerPetr Štetiar <ynezz@true.cz>2020-03-08 15:10:55 +0100
commitea1823a8673a3f10aca418ca64b765f5c5a6e58f (patch)
tree294231285594e59b195bd0c99c2685827299017b /package/kernel/linux/modules/iio.mk
parentddf1832207d462c5b95f3d7de26f8cdf83d3a1f4 (diff)
downloadupstream-ea1823a8673a3f10aca418ca64b765f5c5a6e58f.tar.gz
upstream-ea1823a8673a3f10aca418ca64b765f5c5a6e58f.tar.bz2
upstream-ea1823a8673a3f10aca418ca64b765f5c5a6e58f.zip
kernel: iio: split buffer modules into separate packages
Otherwise we would need to enable IIO_TRIGGERED_BUFFER symbol in all kernels in order to be able to use any of the IIO modules which are utilizing triggered buffer based data acquisition method. Acked-by: Stijn Tintel <stijn@linux-ipv6.be> Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'package/kernel/linux/modules/iio.mk')
-rw-r--r--package/kernel/linux/modules/iio.mk56
1 files changed, 42 insertions, 14 deletions
diff --git a/package/kernel/linux/modules/iio.mk b/package/kernel/linux/modules/iio.mk
index 986838c0ae..430f318951 100644
--- a/package/kernel/linux/modules/iio.mk
+++ b/package/kernel/linux/modules/iio.mk
@@ -12,14 +12,9 @@ define KernelPackage/iio-core
KCONFIG:= \
CONFIG_IIO \
CONFIG_IIO_BUFFER=y \
- CONFIG_IIO_KFIFO_BUF \
- CONFIG_IIO_TRIGGER=y \
- CONFIG_IIO_TRIGGERED_BUFFER
- FILES:= \
- $(LINUX_DIR)/drivers/iio/industrialio.ko \
- $(if $(CONFIG_IIO_TRIGGERED_BUFFER),$(LINUX_DIR)/drivers/iio/buffer/industrialio-triggered-buffer.ko) \
- $(LINUX_DIR)/drivers/iio/buffer/kfifo_buf.ko
- AUTOLOAD:=$(call AutoLoad,55,industrialio kfifo_buf industrialio-triggered-buffer)
+ CONFIG_IIO_TRIGGER=y
+ FILES:=$(LINUX_DIR)/drivers/iio/industrialio.ko
+ AUTOLOAD:=$(call AutoLoad,55,industrialio)
endef
define KernelPackage/iio-core/description
@@ -31,9 +26,42 @@ endef
$(eval $(call KernelPackage,iio-core))
+define KernelPackage/iio-kfifo-buf
+ SUBMENU:=$(IIO_MENU)
+ TITLE:=Industrial I/O buffering based on kfifo
+ DEPENDS:=+kmod-iio-core
+ KCONFIG:=CONFIG_IIO_KFIFO_BUF
+ FILES:=$(LINUX_DIR)/drivers/iio/buffer/kfifo_buf.ko
+ AUTOLOAD:=$(call AutoLoad,55,kfifo_buf)
+endef
+
+define KernelPackage/iio-kfifo-buf/description
+ A simple fifo based on kfifo. Note that this currently provides no buffer
+ events so it is up to userspace to work out how often to read from the buffer.
+endef
+
+$(eval $(call KernelPackage,iio-kfifo-buf))
+
+
+define KernelPackage/industrialio-triggered-buffer
+ SUBMENU:=$(IIO_MENU)
+ TITLE:=Provides helper functions for setting up triggered buffers.
+ DEPENDS:=+kmod-iio-core +kmod-iio-kfifo-buf
+ KCONFIG:=CONFIG_IIO_TRIGGERED_BUFFER
+ FILES:=$(LINUX_DIR)/drivers/iio/buffer/industrialio-triggered-buffer.ko
+ AUTOLOAD:=$(call AutoLoad,55,industrialio-triggered-buffer)
+endef
+
+define KernelPackage/industrialio-triggered-buffer/description
+ Provides helper functions for setting up triggered buffers.
+endef
+
+$(eval $(call KernelPackage,industrialio-triggered-buffer))
+
+
define KernelPackage/iio-ad799x
SUBMENU:=$(IIO_MENU)
- DEPENDS:=+kmod-i2c-core +kmod-iio-core
+ DEPENDS:=+kmod-i2c-core +kmod-iio-core +kmod-industrialio-triggered-buffer
TITLE:=Analog Devices AD799x ADC driver
KCONFIG:= \
CONFIG_AD799X_RING_BUFFER=y \
@@ -52,7 +80,7 @@ $(eval $(call KernelPackage,iio-ad799x))
define KernelPackage/iio-hmc5843
SUBMENU:=$(IIO_MENU)
- DEPENDS:=+kmod-i2c-core +kmod-iio-core +kmod-regmap-i2c
+ DEPENDS:=+kmod-i2c-core +kmod-iio-core +kmod-regmap-i2c +kmod-industrialio-triggered-buffer
TITLE:=Honeywell HMC58x3 Magnetometer
KCONFIG:= CONFIG_SENSORS_HMC5843_I2C
FILES:= \
@@ -82,7 +110,7 @@ $(eval $(call KernelPackage,iio-bh1750))
define KernelPackage/iio-am2315
SUBMENU:=$(IIO_MENU)
- DEPENDS:=+kmod-i2c-core +kmod-iio-core
+ DEPENDS:=+kmod-i2c-core +kmod-iio-core +kmod-industrialio-triggered-buffer
TITLE:=Asong AM2315 humidity/temperature sensor
KCONFIG:= CONFIG_AM2315
FILES:=$(LINUX_DIR)/drivers/iio/humidity/am2315.ko
@@ -95,7 +123,7 @@ $(eval $(call KernelPackage,iio-am2315))
define KernelPackage/iio-mxs-lradc
SUBMENU:=$(IIO_MENU)
- DEPENDS:=@TARGET_mxs +kmod-iio-core
+ DEPENDS:=@TARGET_mxs +kmod-iio-core +kmod-industrialio-triggered-buffer
TITLE:=Freescale i.MX23/i.MX28 LRADC ADC driver
KCONFIG:= \
CONFIG_MXS_LRADC_ADC
@@ -245,7 +273,7 @@ $(eval $(call KernelPackage,iio-htu21))
define KernelPackage/iio-ccs811
SUBMENU:=$(IIO_MENU)
- DEPENDS:=+kmod-i2c-core +kmod-iio-core
+ DEPENDS:=+kmod-i2c-core +kmod-iio-core +kmod-industrialio-triggered-buffer
TITLE:=AMS CCS811 VOC sensor
KCONFIG:= \
CONFIG_CCS811
@@ -281,7 +309,7 @@ $(eval $(call KernelPackage,iio-si7020))
define KernelPackage/iio-st_accel
SUBMENU:=$(IIO_MENU)
TITLE:=STMicroelectronics accelerometer 3-Axis Driver
- DEPENDS:=+kmod-iio-core +kmod-regmap-core
+ DEPENDS:=+kmod-iio-core +kmod-regmap-core +kmod-industrialio-triggered-buffer
KCONFIG:= \
CONFIG_IIO_ST_ACCEL_3AXIS \
CONFIG_IIO_ST_SENSORS_CORE