[PATCH] kernel: replace out-of-tree hwmon-gsc driver with in-tree

Hauke Mehrtens hauke at hauke-m.de
Sun Feb 26 09:24:11 PST 2023


On 2/18/23 01:24, Tim Harvey wrote:
> The Gateworks GSC drivers were merged in Linux v5.8:
> - remove the old out-of-tree module
> - add configuration for the in-tree modules
> 
> Signed-off-by: Tim Harvey <tharvey at gateworks.com>
> ---
>   package/kernel/hwmon-gsc/Makefile     |  28 ---
>   package/kernel/hwmon-gsc/src/Makefile |   1 -
>   package/kernel/hwmon-gsc/src/gsc.c    | 308 --------------------------
>   package/kernel/linux/modules/hwmon.mk |  18 ++
>   4 files changed, 18 insertions(+), 337 deletions(-)
>   delete mode 100644 package/kernel/hwmon-gsc/Makefile
>   delete mode 100644 package/kernel/hwmon-gsc/src/Makefile
>   delete mode 100644 package/kernel/hwmon-gsc/src/gsc.c
> 
.....
> diff --git a/package/kernel/linux/modules/hwmon.mk b/package/kernel/linux/modules/hwmon.mk
> index c8d79b622e7a..c8887a84827a 100644
> --- a/package/kernel/linux/modules/hwmon.mk
> +++ b/package/kernel/linux/modules/hwmon.mk
> @@ -108,6 +108,24 @@ endef
>   $(eval $(call KernelPackage,hwmon-drivetemp))
>   
>   
> +define KernelPackage/hwmon-gsc
> +  TITLE:=Gateworks System Controller support
> +  KCONFIG:=CONFIG_SENSORS_GSC \
> +        CONFIG_MFD_GATEWORKS_GSC=y

Please build CONFIG_MFD_GATEWORKS_GSC as a kernel module and not into 
the kenrel.

> +  FILES:= \
> +	$(LINUX_DIR)/drivers/mfd/gateworks-gsc.ko \
> +	$(LINUX_DIR)/drivers/hwmon/gsc-hwmon.ko
> +  AUTOLOAD:=$(call AutoLoad,60,gateworks-gsc gsc-hwmon)
> +  $(call AddDepends/hwmon,+kmod-i2c-core)
> +endef
> +
> +define KernelPackage/hwmon-gsc/description
> +  Kernel module for Gateworks System Controller with temperature sensor, ADCs, and FAN controller

Please add a line break here.

> +endef
> +
> +$(eval $(call KernelPackage,hwmon-gsc))
> +
> +
>   define KernelPackage/hwmon-gpiofan
>     TITLE:=Generic GPIO FAN support
>     KCONFIG:=CONFIG_SENSORS_GPIO_FAN




More information about the openwrt-devel mailing list