diff options
| author | Daniel Golle | 2025-07-17 20:00:00 +0000 |
|---|---|---|
| committer | Daniel Golle | 2025-07-20 11:16:13 +0000 |
| commit | 85f27367eac568b389041ec8b7ee97cd8ceec622 (patch) | |
| tree | e288406711b9fbda7cd6dea6a3e1615a01e3d454 | |
| parent | da4342c6dbe1785a6c4708871bb2f04071c3bc75 (diff) | |
| download | openwrt-85f27367eac568b389041ec8b7ee97cd8ceec622.tar.gz | |
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 <daniel@makrotopia.org>
| -rw-r--r-- | include/target.mk | 3 | ||||
| -rwxr-xr-x | scripts/target-metadata.pl | 1 | ||||
| -rw-r--r-- | target/Config.in | 3 |
3 files changed, 7 insertions, 0 deletions
diff --git a/include/target.mk b/include/target.mk index 786c3ec5ce..b6c5e29d45 100644 --- a/include/target.mk +++ b/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 diff --git a/scripts/target-metadata.pl b/scripts/target-metadata.pl index 751f66c7de..5c32b2c2d6 100755 --- a/scripts/target-metadata.pl +++ b/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"; diff --git a/target/Config.in b/target/Config.in index 38ff716d69..82c88d0890 100644 --- a/target/Config.in +++ b/target/Config.in @@ -51,6 +51,9 @@ config RTC_SUPPORT config BIG_ENDIAN bool +config USES_PM + bool + config USES_DEVICETREE bool |