Kconfig dependency loop LEDS_CLASS -> EC_ASUS_GLYMUR -> THERMAL -> POWER_SUPPLY -> HID_NVIDIA_SHIELD -> LEDS_CLASS (was Re: [PATCH v4 2/4] platform: arm64: Add a driver for the EC found on ASUS Glymur machines )

From: Mikko Rapeli

Date: Wed Nov 04 2026 - 03:31:21 EST


(Adding linux-kbuild@xxxxxxxxxxxxxxx, linux-yocto@xxxxxxxxxxxxxxxxxxxxxx and
yocto kernel maintainer Bruce)

Hi,

On Thu, Oct 15, 2026 at 10:55:30AM +0200, Konrad Dybcio wrote:
> From: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
>
> Some Qualcomm Snapdragon X2 Elite (Extreme)-based ASUS laptops (at
> least the Zenbook A14 and A16) expose a custom, somewhat
> Qualcomm reference-derived EC interface. Introduce a driver to
> communicate with said EC, allowing for fan speed reporting, keyboard
> backlight setting and receiving of a number of miscellaneous sideband
> events.
>
> Assisted-by: LLM
> Signed-off-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
> ---
> drivers/platform/arm64/Kconfig | 16 +
> drivers/platform/arm64/Makefile | 1 +
> drivers/platform/arm64/asus-glymur-ec.c | 616 ++++++++++++++++++++++++++++++++
> 3 files changed, 633 insertions(+)
>
> diff --git a/drivers/platform/arm64/Kconfig b/drivers/platform/arm64/Kconfig
> index e32e01b2a9bd..84c475c62990 100644
> --- a/drivers/platform/arm64/Kconfig
> +++ b/drivers/platform/arm64/Kconfig
> @@ -33,6 +33,22 @@ config EC_ACER_ASPIRE1
> laptop where this information is not properly exposed via the
> standard ACPI devices.
>
> +config EC_ASUS_GLYMUR
> + tristate "ASUS Zenbook A16 (Qualcomm) Embedded Controller driver"
> + depends on ARCH_QCOM || COMPILE_TEST
> + depends on I2C
> + depends on HWMON
> + depends on INPUT
> + depends on PM
> + depends on THERMAL || THERMAL=n
> + select NEW_LEDS
> + select LEDS_CLASS
> + help
> + Say M or Y here to enable the EC driver for the Qualcomm Snapdragon-
> + based ASUS Zenbook A16 (UX3607OA) and similar machines. It provides
> + temperature sensors readout, fan monitoring, keyboard and EC event
> + reporting.
> +

With this new EC_ASUS_GLYMUR driver in 7.4-rc1 there now exists a kconfig dependency loop
in arm64 builds:

LEDS_CLASS -> EC_ASUS_GLYMUR -> THERMAL -> POWER_SUPPLY -> HID_NVIDIA_SHIELD -> LEDS_CLASS

In Yocto distro we use additional tools[1] to check that kconfig elements in fragments actually
get applied in the final .config etc and one of the checks is for dependency loops which now
fails with 7.4-rc1, full log below[2].

To me it looks like EC_ASUS_GLYMUR correctly depends on LEDS_CLASS and that enabling this
driver by default on arm64 with LEDS_CLASS is correct. And also HID_NVIDIA_SHIELD correctly
depends on LEDS_CLASS. Thus I don't think the drivers are doing anything wrong and thus
on the Yocto kernel QA check side the dependency loop check should be relaxed since they
now can exists in the kernel tree.

Do you agree to this or is there maybe some way to remove the kernel side kconfig dependency
loop to and from LEDS_CLASS?

Cheers,

-Mikko

[1] symbol_why.py and kconfig parsing library from https://git.yoctoproject.org/yocto-kernel-tools/
detects this loop

[2]
2026-11-03 12:00:42 - ERROR - Command "/builds/Linaro/trustedsubstrate/gpit/build$ /builds/Linaro/trustedsubstrate/gpit/bitbake/bin/bitbake -c build core-image-sato-sdk" failed:
ERROR: linux-yocto-dev-7.4-rc1+git-r0 do_kernel_configcheck: config analysis failed when running 'symbol_why.py --dotconfig /builds/Linaro/trustedsubstrate/gpit/build/tmp/work/genericarm64-poky-linux/linux-yocto-dev/7.4-rc1+git/linux-genericarm64-standard-build/.config --mismatches --classify': Traceback (most recent call last):
File "/builds/Linaro/trustedsubstrate/gpit/build/tmp/work/genericarm64-poky-linux/linux-yocto-dev/7.4-rc1+git/recipe-sysroot-native/usr/bin/symbol_why.py", line 879, in <module>
conf = kconfiglib.Kconfig( kconf, show_errors, show_errors )
File "/builds/Linaro/trustedsubstrate/gpit/build/tmp/work/genericarm64-poky-linux/linux-yocto-dev/7.4-rc1+git/recipe-sysroot-native/usr/bin/kconfiglib.py", line 948, in __init__
self._init(filename, warn, warn_to_stderr, encoding)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builds/Linaro/trustedsubstrate/gpit/build/tmp/work/genericarm64-poky-linux/linux-yocto-dev/7.4-rc1+git/recipe-sysroot-native/usr/bin/kconfiglib.py", line 1122, in _init
check_dep_loop_sym(sym, False)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
File "/builds/Linaro/trustedsubstrate/gpit/build/tmp/work/genericarm64-poky-linux/linux-yocto-dev/7.4-rc1+git/recipe-sysroot-native/usr/bin/kconfiglib.py", line 6691, in _check_dep_loop_sym
else _check_dep_loop_sym(dep, False)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
File "/builds/Linaro/trustedsubstrate/gpit/build/tmp/work/genericarm64-poky-linux/linux-yocto-dev/7.4-rc1+git/recipe-sysroot-native/usr/bin/kconfiglib.py", line 6691, in _check_dep_loop_sym
else _check_dep_loop_sym(dep, False)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
File "/builds/Linaro/trustedsubstrate/gpit/build/tmp/work/genericarm64-poky-linux/linux-yocto-dev/7.4-rc1+git/recipe-sysroot-native/usr/bin/kconfiglib.py", line 6691, in _check_dep_loop_sym
else _check_dep_loop_sym(dep, False)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
[Previous line repeated 7 more times]
File "/builds/Linaro/trustedsubstrate/gpit/build/tmp/work/genericarm64-poky-linux/linux-yocto-dev/7.4-rc1+git/recipe-sysroot-native/usr/bin/kconfiglib.py", line 6695, in _check_dep_loop_sym
return _found_dep_loop(loop, sym)
File "/builds/Linaro/trustedsubstrate/gpit/build/tmp/work/genericarm64-poky-linux/linux-yocto-dev/7.4-rc1+git/recipe-sysroot-native/usr/bin/kconfiglib.py", line 6799, in _found_dep_loop
raise KconfigError(msg)
kconfiglib.KconfigError:
Dependency loop
===============

LEDS_CLASS (defined at drivers/leds/Kconfig:23), with definition...

config LEDS_CLASS
tristate "LED Class Support"
depends on NEW_LEDS
help
This option enables the LED sysfs class in /sys/class/leds. You'll
need this to do anything useful with LEDs. If unsure, say Y.

(select-related dependencies: (ADB_PMU_LED && PPC_PMAC && ADB_PMU && MACINTOSH_DRIVERS) || (INPUT_WISTRON_BTNS && X86_32 && !UML && INPUT_MISC && INPUT) || (SENSORS_APPLESMC && INPUT && X86 && HWMON) || (IR_REDRAT3 && USB && RC_DEVICES && RC_CORE) || (IR_TTUSBIR && USB && RC_DEVICES && RC_CORE) || (IR_WINBOND_CIR && ((X86 && PNP) || COMPILE_TEST) && HAS_IOPORT && RC_DEVICES && RC_CORE) || (HT16K33 && FB && I2C && INPUT && BACKLIGHT_CLASS_DEVICE && AUXDISPLAY) || (BACKLIGHT_ADP8860 && I2C && BACKLIGHT_CLASS_DEVICE && HAS_IOMEM) || (BACKLIGHT_ADP8870 && I2C && BACKLIGHT_CLASS_DEVICE && HAS_IOMEM) || (BACKLIGHT_LM3639 && I2C && BACKLIGHT_CLASS_DEVICE && HAS_IOMEM) || (SND_HDA_GENERIC && SND_HDA_GENERIC_LEDS && SND_HDA && SND && SOUND) || (SND_USB_TONEPORT && SND_USB && USB && SND && SOUND) || (HID_MSI && USB_HID && HID && HID_SUPPORT) || (HID_WACOM && USB_HID && HID && HID_SUPPORT) || (HUAWEI_WMI && ACPI_BATTERY && ACPI_EC && ACPI_WMI && INPUT && X86_PLATFORM_DEVICES) || (ACER_WMI && BACKLIGHT_CLASS_DEVICE && SERIO_I8042 && INPUT && (RFKILL || RFKILL = n) && ACPI_EC && ACPI_WMI && (ACPI_VIDEO || ACPI_VIDEO = n) && HWMON && X86_PLATFORM_DEVICES) || (ASUS_LAPTOP && ACPI && BACKLIGHT_CLASS_DEVICE && INPUT && (RFKILL || RFKILL = n) && (ACPI_VIDEO || ACPI_VIDEO = n) && X86_PLATFORM_DEVICES) || (ASUS_WIRELESS && ACPI && INPUT && X86_PLATFORM_DEVICES) || (ASUS_WMI && ACPI_WMI && ACPI_BATTERY && INPUT && HWMON && BACKLIGHT_CLASS_DEVICE && (RFKILL || RFKILL = n) && HOTPLUG_PCI && (ACPI_VIDEO || ACPI_VIDEO = n) && (SERIO_I8042 || SERIO_I8042 = n) && X86_PLATFORM_DEVICES) || (EEEPC_LAPTOP && ACPI_EC && INPUT && (RFKILL || RFKILL = n) && (ACPI_VIDEO || ACPI_VIDEO = n) && HOTPLUG_PCI && BACKLIGHT_CLASS_DEVICE && X86_PLATFORM_DEVICES) || (DELL_LAPTOP && DMI && BACKLIGHT_CLASS_DEVICE && ACPI_BATTERY && (ACPI_VIDEO || ACPI_VIDEO = n) && (RFKILL || RFKILL = n) && (DELL_WMI || DELL_WMI = n) && SERIO_I8042 && DELL_SMBIOS && X86_PLATFORM_DRIVERS_DELL && X86_PLATFORM_DEVICES) || (FUJITSU_LAPTOP && ACPI && INPUT && BACKLIGHT_CLASS_DEVICE && ACPI_BATTERY && (ACPI_VIDEO || ACPI_VIDEO = n) && X86_PLATFORM_DEVICES) || (HP_ACCEL && INPUT && ACPI && SERIO_I8042 && X86_PLATFORM_DRIVERS_HP && X86_PLATFORM_DEVICES) || (IDEAPAD_LAPTOP && ACPI && ACPI_BATTERY && RFKILL && INPUT && SERIO_I8042 && BACKLIGHT_CLASS_DEVICE && (ACPI_VIDEO || ACPI_VIDEO = n) && (ACPI_WMI || ACPI_WMI = n) && X86_PLATFORM_DEVICES) || (LENOVO_WMI_HOTKEY_UTILITIES && ACPI_WMI && X86_PLATFORM_DEVICES) || (THINKPAD_ACPI && ACPI_EC && ACPI_BATTERY && INPUT && (RFKILL || RFKILL = n) && (ACPI_VIDEO || ACPI_VIDEO = n) && BACKLIGHT_CLASS_DEVICE && I2C && DRM && X86_PLATFORM_DEVICES) || (YOGABOOK && ACPI_WMI && INPUT && I2C && X86_PLATFORM_DEVICES) || (SAMSUNG_LAPTOP && (RFKILL || RFKILL = n) && (ACPI_VIDEO || ACPI_VIDEO = n) && ACPI_BATTERY && BACKLIGHT_CLASS_DEVICE && X86_PLATFORM_DEVICES) || (ACPI_TOSHIBA && ACPI_EC && ACPI_BATTERY && ACPI_WMI && BACKLIGHT_CLASS_DEVICE && INPUT && (SERIO_I8042 || SERIO_I8042 = n) && (ACPI_VIDEO || ACPI_VIDEO = n) && (HWMON || HWMON = n) && (RFKILL || RFKILL = n) && IIO && X86_PLATFORM_DEVICES) || (LG_LAPTOP && ACPI && ACPI_BATTERY && INPUT && X86_PLATFORM_DEVICES) || (SYSTEM76_ACPI && ACPI_EC && ACPI_BATTERY && HWMON && INPUT && X86_PLATFORM_DEVICES) || (TOPSTAR_LAPTOP && ACPI && INPUT && X86_PLATFORM_DEVICES) || (X86_ANDROID_TABLETS && I2C && SPI && SERIAL_DEV_BUS && GPIOLIB && PMIC_OPREGION && ACPI && EFI && PCI && X86_PLATFORM_DEVICES) || (SEL3350_PLATFORM && ACPI && GPIOLIB && PINCTRL_BROXTON && X86_PLATFORM_DEVICES) || (EC_ASUS_GLYMUR && (ARCH_QCOM || COMPILE_TEST) && I2C && HWMON && INPUT && PM && (THERMAL || THERMAL = n) && ARM64_PLATFORM_DEVICES) || (EC_LENOVO_THINKPAD_T14S && (ARCH_QCOM || COMPILE_TEST) && I2C && INPUT && ARM64_PLATFORM_DEVICES) || (EC_LENOVO_YOGA_SLIM7X_GEN11 && (ARCH_QCOM || COMPILE_TEST) && I2C && INPUT && HWMON && ARM64_PLATFORM_DEVICES))

...depends on EC_ASUS_GLYMUR (defined at drivers/platform/arm64/Kconfig:36), with definition...

config EC_ASUS_GLYMUR
tristate "ASUS Zenbook A16 (Qualcomm) Embedded Controller driver"
select NEW_LEDS
select LEDS_CLASS
depends on (ARCH_QCOM || COMPILE_TEST) && I2C && HWMON && INPUT && PM && (THERMAL || THERMAL = n) && ARM64_PLATFORM_DEVICES
help
Say M or Y here to enable the EC driver for the Qualcomm Snapdragon-
based ASUS Zenbook A16 (UX3607OA) and similar machines. It provides
temperature sensors readout, fan monitoring, keyboard and EC event
reporting.

...depends on THERMAL (defined at drivers/thermal/Kconfig:6), with definition...

menuconfig THERMAL
bool "Thermal drivers"
help
Thermal drivers offer a generic mechanism for
thermal management. Usually it's made up of one or more thermal
zones and cooling devices.
Each thermal zone contains its own temperature, trip points,
and cooling devices.
All platforms with ACPI or Open Firmware thermal support can use
this driver.
If you want this support, you should say Y here.

(select-related dependencies: (ACPI_VIDEO && BACKLIGHT_CLASS_DEVICE && INPUT && ACPI_WMI && ACPI) || (ACPI_PROCESSOR && (X86 || ARM64 || LOONGARCH || RISCV) && ACPI) || (ACPI_THERMAL && ACPI_PROCESSOR && ACPI) || (AB8500_BM && AB8500_CORE && AB8500_GPADC && IIO = y && OF && POWER_SUPPLY) || (DRM_ETNAVIV && DRM_ETNAVIV_THERMAL && DRM && MMU && DRM && HAS_IOMEM) || (DRM_NOUVEAU && ACPI && X86 && DRM && PCI && DRM && HAS_IOMEM) || (MMC_SDHCI_OMAP && (ARCH_OMAP2PLUS || ARCH_KEYSTONE || COMPILE_TEST) && MMC_SDHCI_PLTFM && OF && MMC))

(imply-related dependencies: (ACPI_VIDEO && BACKLIGHT_CLASS_DEVICE && INPUT && ACPI_WMI && ACPI) || (ACPI_PROCESSOR && (X86 || ARM64 || LOONGARCH || RISCV) && ACPI) || (ACPI_THERMAL && ACPI_PROCESSOR && ACPI) || (AB8500_BM && AB8500_CORE && AB8500_GPADC && IIO = y && OF && POWER_SUPPLY) || (DRM_ETNAVIV && DRM_ETNAVIV_THERMAL && DRM && MMU && DRM && HAS_IOMEM) || (DRM_NOUVEAU && ACPI && X86 && DRM && PCI && DRM && HAS_IOMEM) || (MMC_SDHCI_OMAP && (ARCH_OMAP2PLUS || ARCH_KEYSTONE || COMPILE_TEST) && MMC_SDHCI_PLTFM && OF && MMC))

...depends on POWER_SUPPLY (defined at drivers/power/supply/Kconfig:2), with definition...

menuconfig POWER_SUPPLY
bool "Power supply class support"
help
Say Y here to enable power supply class support. This allows
power supply (batteries, AC, USB) monitoring by userspace
via sysfs and uevent (if available) and/or APM kernel interface
(if selected below).

(select-related dependencies: ARM64 || (X86_AMD_PSTATE && ACPI && X86 && CPU_FREQ) || (ACPI_AC && ACPI) || (ACPI_BATTERY && ACPI) || (ACPI_SBS && X86 && ACPI_EC && ACPI) || (AB8500_CORE && ABX500_CORE && MFD_DB8500_PRCMU && HAS_IOMEM) || (DRM_AMDGPU && DRM && PCI && DRM && HAS_IOMEM) || (DRM_NOUVEAU && DRM && PCI && DRM && HAS_IOMEM) || (DRM_RADEON && DRM && PCI && (AGP || !AGP) && DRM && HAS_IOMEM) || (HID_BATTERY_STRENGTH && HID && HID_SUPPORT) || (HID_ASUS && USB_HID && LEDS_CLASS && (ASUS_WMI || ASUS_WMI = n) && HID && HID_SUPPORT) || (HID_CORSAIR && USB_HID && LEDS_CLASS && HID && HID_SUPPORT) || (HID_LOGITECH_HIDPP && HID_LOGITECH && HID && HID_SUPPORT) || (HID_NINTENDO && NEW_LEDS && LEDS_CLASS && USB_HID && HID && HID_SUPPORT) || (HID_NVIDIA_SHIELD && USB_HID && BT_HIDP && LEDS_CLASS && HID && HID_SUPPORT) || (HID_PLAYSTATION && LEDS_CLASS_MULTICOLOR && HID && HID_SUPPORT) || (HID_SONY && USB_HID && NEW_LEDS && LEDS_CLASS && HID && HID_SUPPORT) || (HID_STEAM && HID && HID_SUPPORT) || (HID_PULSAR && USB_HID && HID && HID_SUPPORT) || (HID_WACOM && USB_HID && HID && HID_SUPPORT) || (HID_WIIMOTE && LEDS_CLASS && HID && HID_SUPPORT) || (USB_CONN_GPIO && GPIOLIB && USB_SUPPORT) || (APPLE_MFI_FASTCHARGE && USB && USB_SUPPORT) || (TYPEC_TCPM && USB && TYPEC && USB_SUPPORT) || (TYPEC_TPS6598X && I2C && TYPEC && USB_SUPPORT) || (DELL_LAPTOP && DMI && BACKLIGHT_CLASS_DEVICE && ACPI_BATTERY && (ACPI_VIDEO || ACPI_VIDEO = n) && (RFKILL || RFKILL = n) && (DELL_WMI || DELL_WMI = n) && SERIO_I8042 && DELL_SMBIOS && X86_PLATFORM_DRIVERS_DELL && X86_PLATFORM_DEVICES) || (HP_WMI && ACPI_EC && ACPI_WMI && INPUT && (RFKILL || RFKILL = n) && X86_PLATFORM_DRIVERS_HP && X86_PLATFORM_DEVICES) || (X86_ANDROID_TABLETS && I2C && SPI && SERIAL_DEV_BUS && GPIOLIB && PMIC_OPREGION && ACPI && EFI && PCI && X86_PLATFORM_DEVICES) || (SEL3350_PLATFORM && ACPI && GPIOLIB && PINCTRL_BROXTON && X86_PLATFORM_DEVICES))

...depends on HID_NVIDIA_SHIELD (defined at drivers/hid/Kconfig:908), with definition...

config HID_NVIDIA_SHIELD
tristate "NVIDIA SHIELD devices"
select POWER_SUPPLY
depends on USB_HID && BT_HIDP && LEDS_CLASS && HID && HID_SUPPORT
help
Support for NVIDIA SHIELD accessories.

Supported devices:
- Thunderstrike (NVIDIA SHIELD Controller 2017)

...depends again on LEDS_CLASS (defined at drivers/leds/Kconfig:23)

ERROR: Logfile of failure stored in: /builds/Linaro/trustedsubstrate/gpit/build/tmp/work/genericarm64-poky-linux/linux-yocto-dev/7.4-rc1+git/temp/log.do_kernel_configcheck.519198
ERROR: Task (/builds/Linaro/trustedsubstrate/gpit/build/../core/meta/recipes-kernel/linux/linux-yocto-dev.bb:do_kernel_configcheck) failed with exit code '1'
2026-11-03 12:00:42 - ERROR - Command "/builds/Linaro/trustedsubstrate/gpit/bitbake/bin/bitbake -c build core-image-sato-sdk" failed with error 1
section_end:1793707242:step_script