From: Robert Marko Date: Fri, 27 Feb 2026 11:08:56 +0000 (+0100) Subject: targets: add REGULATOR_SUPPORT auto-feature X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=17139e35b1bd7fdd0194e9d46ac64254e6102361;p=thirdparty%2Fopenwrt.git targets: add REGULATOR_SUPPORT auto-feature Not all targets need regulator support, so they dont enable it as its disabled in the generic config by default. So, in order to allow kernel modules to depend on regulator support lets add a new feature flag "regulator" and set it automatically if target kernel config enables CONFIG_REGULATOR. Link: https://github.com/openwrt/openwrt/pull/22172 Signed-off-by: Robert Marko --- diff --git a/include/target.mk b/include/target.mk index c51ca1c6b86..45d0a6686b5 100644 --- a/include/target.mk +++ b/include/target.mk @@ -317,6 +317,9 @@ ifeq ($(DUMP),1) ifneq ($(CONFIG_PWM),) FEATURES += pwm endif + ifneq ($(CONFIG_REGULATOR),) + FEATURES += regulator + endif ifneq ($(CONFIG_USB)$(CONFIG_USB_SUPPORT),) ifneq ($(CONFIG_USB_ARCH_HAS_HCD)$(CONFIG_USB_EHCI_HCD),) FEATURES += usb diff --git a/scripts/target-metadata.pl b/scripts/target-metadata.pl index 5c32b2c2d67..dc03caec5c8 100755 --- a/scripts/target-metadata.pl +++ b/scripts/target-metadata.pl @@ -38,6 +38,7 @@ sub target_config_features(@) { /^powerpc64$/ and $ret .= "\tselect powerpc64\n"; /^pwm$/ and $ret .= "\select PWM_SUPPORT\n"; /^ramdisk$/ and $ret .= "\tselect USES_INITRAMFS\n"; + /^regulator$/ and $ret .= "\tselect REGULATOR_SUPPORT\n"; /^rfkill$/ and $ret .= "\tselect RFKILL_SUPPORT\n"; /^rootfs-part$/ and $ret .= "\tselect USES_ROOTFS_PART\n"; /^rtc$/ and $ret .= "\tselect RTC_SUPPORT\n"; diff --git a/target/Config.in b/target/Config.in index 82c88d08907..d56de80f5a9 100644 --- a/target/Config.in +++ b/target/Config.in @@ -128,6 +128,9 @@ config USES_ROOTFS_PART config USES_BOOT_PART bool +config REGULATOR_SUPPORT + bool + # Architecture selection config aarch64