From: Ondrej Kolar Date: Fri, 1 Aug 2025 13:12:39 +0000 (+0200) Subject: kernel/modules: add MCP342x I2C ADCs kernel module support X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F19619%2Fhead;p=thirdparty%2Fopenwrt.git 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 --- 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