]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
kernel/modules: add MCP342x I2C ADCs kernel module support 19619/head
authorOndrej Kolar <ondrej@kolarovo.cz>
Fri, 1 Aug 2025 13:12:39 +0000 (15:12 +0200)
committerRobert Marko <robimarko@gmail.com>
Wed, 6 Aug 2025 21:41:01 +0000 (23:41 +0200)
This commit adds kernel module support for Microchip MCP342x family of I2C ADCs.

Tested on a custom board based on Hi-Link HLK-7628N.

Signed-off-by: Ondrej Kolar <ondrej@kolarovo.cz>
Link: https://github.com/openwrt/openwrt/pull/19619
Signed-off-by: Robert Marko <robimarko@gmail.com>
package/kernel/linux/modules/iio.mk

index 99fe30b96ccc6b16e0ea71fbfd34e1103392ff7c..a8327f54d0d834af21cfe3e4e209a684aaf83936 100644 (file)
@@ -149,6 +149,20 @@ endef
 
 $(eval $(call KernelPackage,iio-ads1015))
 
+define KernelPackage/iio-mcp3422
+  TITLE:=Microchip MCP342x ADC driver
+  KCONFIG:=CONFIG_MCP3422
+  FILES:=$(LINUX_DIR)/drivers/iio/adc/mcp3422.ko
+  AUTOLOAD:=$(call AutoProbe,mcp3422)
+  $(call AddDepends/iio, +kmod-i2c-core)
+endef
+
+define KernelPackage/iio-mcp3422/description
+  Kernel module for the Microchip MCP342x I2C ADCs.
+endef
+
+$(eval $(call KernelPackage,iio-mcp3422))
+
 define KernelPackage/iio-hmc5843
   DEPENDS:=+kmod-i2c-core +kmod-regmap-i2c +kmod-industrialio-triggered-buffer
   TITLE:=Honeywell HMC58x3 Magnetometer