Przeglądaj źródła

targets: add USES_PM auto-feature

Not all targets support power management, some older or more simple
targets don't have CONFIG_PM set. Allow kernel module packages to
depend on USES_PM to only be available on targets which got
CONFIG_PM=y in their kernel config.

Signed-off-by: Daniel Golle <[email protected]>
Daniel Golle 5 miesięcy temu
rodzic
commit
85f27367ea
3 zmienionych plików z 7 dodań i 0 usunięć
  1. 3 0
      include/target.mk
  2. 1 0
      scripts/target-metadata.pl
  3. 3 0
      target/Config.in

+ 3 - 0
include/target.mk

@@ -318,6 +318,9 @@ ifeq ($(DUMP),1)
     ifneq ($(CONFIG_PINCTRL),)
       FEATURES += pinctrl
     endif
+    ifneq ($(CONFIG_PM),)
+      FEATURES += pm
+    endif
     ifneq ($(CONFIG_PWM),)
       FEATURES += pwm
     endif

+ 1 - 0
scripts/target-metadata.pl

@@ -34,6 +34,7 @@ sub target_config_features(@) {
 		/^pcie$/ and $ret .= "\tselect PCIE_SUPPORT\n";
 		/^pcmcia$/ and $ret .= "\tselect PCMCIA_SUPPORT\n";
 		/^pinctrl$/ and $ret .= "\tselect PINCTRL_SUPPORT\n";
+		/^pm$/ and $ret .= "\tselect USES_PM\n";
 		/^powerpc64$/ and $ret .= "\tselect powerpc64\n";
 		/^pwm$/ and $ret .= "\select PWM_SUPPORT\n";
 		/^ramdisk$/ and $ret .= "\tselect USES_INITRAMFS\n";

+ 3 - 0
target/Config.in

@@ -51,6 +51,9 @@ config RTC_SUPPORT
 config BIG_ENDIAN
 	bool
 
+config USES_PM
+	bool
+
 config USES_DEVICETREE
 	bool