kernel: add kmod-iio-htu21
[oweals/openwrt.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 define KernelPackage/iio-mxs-lradc
56   SUBMENU:=$(IIO_MENU)
57   DEPENDS:=@TARGET_mxs +kmod-iio-core
58   TITLE:=Freescale i.MX23/i.MX28 LRADC ADC driver
59   KCONFIG:= \
60         CONFIG_MXS_LRADC_ADC
61   FILES:=$(LINUX_DIR)/drivers/iio/adc/mxs-lradc-adc.ko
62   AUTOLOAD:=$(call AutoLoad,56,mxs-lradc-adc)
63 endef
64
65 define KernelPackage/iio-mxs-lradc/description
66  Support for Freescale's i.MX23/i.MX28 SoC internal Low-Resolution ADC
67 endef
68
69 $(eval $(call KernelPackage,iio-mxs-lradc))
70
71 define KernelPackage/iio-dht11
72   SUBMENU:=$(IIO_MENU)
73   DEPENDS:=+kmod-iio-core @GPIO_SUPPORT @USES_DEVICETREE
74   TITLE:=DHT11 (and compatible) humidity and temperature sensors
75   KCONFIG:= \
76         CONFIG_DHT11
77   FILES:=$(LINUX_DIR)/drivers/iio/humidity/dht11.ko
78   AUTOLOAD:=$(call AutoLoad,56,dht11)
79 endef
80
81 define KernelPackage/iio-dht11/description
82  support for DHT11 and DHT22 digitial humidity and temperature sensors
83  attached at GPIO lines. You will need a custom device tree file to
84  specify the GPIO line to use.
85 endef
86
87 $(eval $(call KernelPackage,iio-dht11))
88
89 define KernelPackage/iio-bmp280
90   SUBMENU:=$(IIO_MENU)
91   TITLE:=BMP180/BMP280/BME280 pressure/temperatur sensor
92   DEPENDS:=@(LINUX_4_9||LINUX_4_14) +kmod-iio-core +kmod-regmap
93   KCONFIG:=CONFIG_BMP280
94   FILES:=$(LINUX_DIR)/drivers/iio/pressure/bmp280.ko
95 endef
96
97 define KernelPackage/iio-bmp280/description
98  This driver adds support for Bosch Sensortec BMP180 and BMP280 pressure and
99  temperature sensors. Also supports the BME280 with an additional humidity
100  sensor channel.
101 endef
102
103 $(eval $(call KernelPackage,iio-bmp280))
104
105
106 define KernelPackage/iio-bmp280-i2c
107   SUBMENU:=$(IIO_MENU)
108   TITLE:=BMP180/BMP280/BME280 pressure/temperatur sensor (I2C)
109   DEPENDS:=+kmod-iio-bmp280 +kmod-i2c-core
110   KCONFIG:=CONFIG_BMP280_I2C
111   FILES:=$(LINUX_DIR)/drivers/iio/pressure/bmp280-i2c.ko
112   AUTOLOAD:=$(call AutoProbe,iio-bmp280-i2c)
113 endef
114 define KernelPackage/iio-bmp280-i2c/description
115  This driver adds support for Bosch Sensortec's digital pressure and
116  temperature sensor connected via I2C.
117 endef
118
119 $(eval $(call KernelPackage,iio-bmp280-i2c))
120
121
122 define KernelPackage/iio-bmp280-spi
123   SUBMENU:=$(IIO_MENU)
124   TITLE:=BMP180/BMP280/BME280 pressure/temperatur sensor (SPI)
125   DEPENDS:=+kmod-iio-bmp280 +kmod-spi-bitbang
126   KCONFIG:=CONFIG_BMP280_SPI
127   FILES:=$(LINUX_DIR)/drivers/iio/pressure/bmp280-spi.ko
128   AUTOLOAD:=$(call AutoProbe,iio-bmp280-spi)
129 endef
130 define KernelPackage/iio-bmp280-spi/description
131  This driver adds support for Bosch Sensortec's digital pressure and
132  temperature sensor connected via SPI.
133 endef
134
135 $(eval $(call KernelPackage,iio-bmp280-spi))
136
137 define KernelPackage/iio-htu21
138   SUBMENU:=$(IIO_MENU)
139   DEPENDS:=+kmod-i2c-core +kmod-iio-core
140   TITLE:=HTU21 humidity & temperature sensor
141   KCONFIG:= \
142        CONFIG_HTU21 \
143        CONFIG_IIO_MS_SENSORS_I2C
144   FILES:= \
145        $(LINUX_DIR)/drivers/iio/humidity/htu21.ko \
146        $(LINUX_DIR)/drivers/iio/common/ms_sensors/ms_sensors_i2c.ko
147   AUTOLOAD:=$(call AutoLoad,56,htu21)
148 endef
149
150 define KernelPackage/iio-htu21/description
151  support for the Measurement Specialties HTU21 humidity and
152  temperature sensor.
153  This driver is also used for MS8607 temperature, pressure & humidity
154  sensor
155 endef
156
157 $(eval $(call KernelPackage,iio-htu21))