[openwrt/openwrt] targets: add PINCTRL_SUPPORT auto-feature

LEDE Commits lede-commits at lists.infradead.org
Sat Jul 19 05:54:49 PDT 2025


dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/801529f7252a33676e98c8f87db638d1504db7b1

commit 801529f7252a33676e98c8f87db638d1504db7b1
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Thu Jul 17 19:25:38 2025 +0100

    targets: add PINCTRL_SUPPORT auto-feature
    
    Not all targets have CONFIG_PINCTRL=y set in their kernel config.
    Let's introduce a feature for that so kernel module packages which
    select or depend on CONFIG_PINCTRL=y may depend on that, so we can
    try to prevent leaking CONFIG_PINCTRL=y also into targets which do
    not require it.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 include/target.mk          | 3 +++
 scripts/target-metadata.pl | 1 +
 target/Config.in           | 3 +++
 3 files changed, 7 insertions(+)

diff --git a/include/target.mk b/include/target.mk
index 6eae23d5f6..786c3ec5ce 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -315,6 +315,9 @@ ifeq ($(DUMP),1)
     ifneq ($(CONFIG_PCIEPORTBUS),)
       FEATURES += pcie
     endif
+    ifneq ($(CONFIG_PINCTRL),)
+      FEATURES += pinctrl
+    endif
     ifneq ($(CONFIG_PWM),)
       FEATURES += pwm
     endif
diff --git a/scripts/target-metadata.pl b/scripts/target-metadata.pl
index 299dee92a7..751f66c7de 100755
--- a/scripts/target-metadata.pl
+++ b/scripts/target-metadata.pl
@@ -33,6 +33,7 @@ sub target_config_features(@) {
 		/^pci$/ and $ret .= "\tselect PCI_SUPPORT\n";
 		/^pcie$/ and $ret .= "\tselect PCIE_SUPPORT\n";
 		/^pcmcia$/ and $ret .= "\tselect PCMCIA_SUPPORT\n";
+		/^pinctrl$/ and $ret .= "\tselect PINCTRL_SUPPORT\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 c0f3237ca9..38ff716d69 100644
--- a/target/Config.in
+++ b/target/Config.in
@@ -32,6 +32,9 @@ config PCIE_SUPPORT
 config PCMCIA_SUPPORT
 	bool
 
+config PINCTRL_SUPPORT
+	bool
+
 config PWM_SUPPORT
 	bool
 




More information about the lede-commits mailing list