kernel: move IIO modules to iio.mk
[openwrt/staging/stintel.git] / package / kernel / linux / modules / iio.mk
1 #
2 # This is free software, licensed under the GNU General Public License v2.
3 # See /LICENSE for more information.
4 #
5
6 IIO_MENU:=Industrial I/O Modules
7
8
9 define KernelPackage/iio-core
10 SUBMENU:=$(IIO_MENU)
11 TITLE:=Industrial IO core
12 KCONFIG:= \
13 CONFIG_IIO \
14 CONFIG_IIO_BUFFER=y \
15 CONFIG_IIO_KFIFO_BUF \
16 CONFIG_IIO_TRIGGER=y \
17 CONFIG_IIO_TRIGGERED_BUFFER
18 FILES:= \
19 $(LINUX_DIR)/drivers/iio/industrialio.ko \
20 $(if $(CONFIG_IIO_TRIGGERED_BUFFER),$(LINUX_DIR)/drivers/iio/industrialio-triggered-buffer.ko@lt4.4) \
21 $(if $(CONFIG_IIO_TRIGGERED_BUFFER),$(LINUX_DIR)/drivers/iio/buffer/industrialio-triggered-buffer.ko@ge4.4) \
22 $(LINUX_DIR)/drivers/iio/kfifo_buf.ko@lt4.4 \
23 $(LINUX_DIR)/drivers/iio/buffer/kfifo_buf.ko@ge4.4
24 AUTOLOAD:=$(call AutoLoad,55,industrialio kfifo_buf industrialio-triggered-buffer)
25 endef
26
27 define KernelPackage/iio-core/description
28 The industrial I/O subsystem provides a unified framework for
29 drivers for many different types of embedded sensors using a
30 number of different physical interfaces (i2c, spi, etc)
31 endef
32
33 $(eval $(call KernelPackage,iio-core))
34
35
36 define KernelPackage/iio-ad799x
37 SUBMENU:=$(IIO_MENU)
38 DEPENDS:=+kmod-i2c-core +kmod-iio-core
39 TITLE:=Analog Devices AD799x ADC driver
40 KCONFIG:= \
41 CONFIG_AD799X_RING_BUFFER=y \
42 CONFIG_AD799X
43 FILES:=$(LINUX_DIR)/drivers/iio/adc/ad799x.ko
44 AUTOLOAD:=$(call AutoLoad,56,ad799x)
45 endef
46
47 define KernelPackage/iio-ad799x/description
48 support for Analog Devices:
49 ad7991, ad7995, ad7999, ad7992, ad7993, ad7994, ad7997, ad7998
50 i2c analog to digital converters (ADC).
51 endef
52
53 $(eval $(call KernelPackage,iio-ad799x))
54
55
56 define KernelPackage/iio-dht11
57 SUBMENU:=$(IIO_MENU)
58 DEPENDS:=+kmod-iio-core @GPIO_SUPPORT @USES_DEVICETREE
59 TITLE:=DHT11 (and compatible) humidity and temperature sensors
60 KCONFIG:= \
61 CONFIG_DHT11
62 FILES:=$(LINUX_DIR)/drivers/iio/humidity/dht11.ko
63 AUTOLOAD:=$(call AutoLoad,56,dht11)
64 endef
65
66 define KernelPackage/iio-dht11/description
67 support for DHT11 and DHT22 digitial humidity and temperature sensors
68 attached at GPIO lines. You will need a custom device tree file to
69 specify the GPIO line to use.
70 endef
71
72 $(eval $(call KernelPackage,iio-dht11))