From 77132c2fc1f6a417094497f3c62d6190069c1175 Mon Sep 17 00:00:00 2001 From: Ondrej Kolar Date: Fri, 1 Aug 2025 15:12:39 +0200 Subject: [PATCH] kernel/modules: add MCP342x I2C ADCs kernel module support 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 Link: https://github.com/openwrt/openwrt/pull/19619 Signed-off-by: Robert Marko --- package/kernel/linux/modules/iio.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/package/kernel/linux/modules/iio.mk b/package/kernel/linux/modules/iio.mk index 99fe30b96cc..a8327f54d0d 100644 --- a/package/kernel/linux/modules/iio.mk +++ b/package/kernel/linux/modules/iio.mk @@ -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 -- 2.47.2