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>
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
/^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";
config USES_BOOT_PART
bool
+config REGULATOR_SUPPORT
+ bool
+
# Architecture selection
config aarch64