]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
targets: add REGULATOR_SUPPORT auto-feature
authorRobert Marko <robimarko@gmail.com>
Fri, 27 Feb 2026 11:08:56 +0000 (12:08 +0100)
committerRobert Marko <robimarko@gmail.com>
Sun, 1 Mar 2026 09:59:19 +0000 (10:59 +0100)
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 <robimarko@gmail.com>
include/target.mk
scripts/target-metadata.pl
target/Config.in

index c51ca1c6b86a1da835240daeca6c61945b72a177..45d0a6686b5fc2480f311a2d0b1402f72c2c02de 100644 (file)
@@ -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
index 5c32b2c2d6764c1ecd0e13a6fc29d1bd901902d9..dc03caec5c8d68ee0c4b97458c8697bd4f3ef86c 100755 (executable)
@@ -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";
index 82c88d08907056bacfdf2005185c77b7f281ccf9..d56de80f5a9ab86ccda99d8e4cd2a2fe10d37276 100644 (file)
@@ -128,6 +128,9 @@ config USES_ROOTFS_PART
 config USES_BOOT_PART
        bool
 
+config REGULATOR_SUPPORT
+       bool
+
 # Architecture selection
 
 config aarch64