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 <robimarko@gmail.com>
This commit is contained in:
parent
a9f4daa3fe
commit
17139e35b1
@ -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
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -128,6 +128,9 @@ config USES_ROOTFS_PART
|
||||
config USES_BOOT_PART
|
||||
bool
|
||||
|
||||
config REGULATOR_SUPPORT
|
||||
bool
|
||||
|
||||
# Architecture selection
|
||||
|
||||
config aarch64
|
||||
|
||||
Loading…
Reference in New Issue
Block a user