Kconfig: reduce the amount of power sequencing noise
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 17 Jul 2024 14:28:03 +0000 (16:28 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Thu, 18 Jul 2024 11:56:40 +0000 (13:56 +0200)
Kconfig will ask the user twice about power sequencing: once for the QCom
WCN power sequencing driver and then again for the PCI power control
driver using it.

Let's automate the selection of PCI_PWRCTL by introducing a new hidden
symbol: HAVE_PWRCTL which should be selected by all platforms that have
the need to include PCI power control code (right now: only ARCH_QCOM).

The pwrseq-based PCI pwrctl driver itself will then be selected by the
drivers binding to devices that may require external handling of the
power-up sequence (currently: ath11k and ath12k) based on the value
of HAVE_PWRCTL.

Make all PCI pwrctl Kconfig symbols hidden so that no questions are
asked during configuration.

Fixes: 4565d2652a37 ("PCI/pwrctl: Add PCI power control core code")
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Closes: https://lore.kernel.org/lkml/CAHk-=wjWc5dzcj2O1tEgNHY1rnQW63JwtuZi_vAZPqy6wqpoUQ@mail.gmail.com/
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> # drivers/net/wireless/ath
Link: https://lore.kernel.org/r/20240717142803.53248-1-brgl@bgdev.pl
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
arch/arm64/Kconfig.platforms
drivers/net/wireless/ath/ath11k/Kconfig
drivers/net/wireless/ath/ath12k/Kconfig
drivers/pci/pwrctl/Kconfig

index a52618073de2f7a82344f886e4dc65968020ec55..d7837d89564ea7deaa35752c3fe2e5adefb24594 100644 (file)
@@ -267,6 +267,7 @@ config ARCH_QCOM
        bool "Qualcomm Platforms"
        select GPIOLIB
        select PINCTRL
+       select HAVE_PWRCTL
        help
          This enables support for the ARMv8 based Qualcomm chipsets.
 
index 27f0523bf9675410cb07439701bb9fb65a81ae32..2e935d381b6b108689bbb1ef6aa465a309d110d1 100644 (file)
@@ -24,6 +24,7 @@ config ATH11K_PCI
        select MHI_BUS
        select QRTR
        select QRTR_MHI
+       select PCI_PWRCTL_PWRSEQ if HAVE_PWRCTL
        help
          This module adds support for PCIE bus
 
index eceab9153e98e8376a2831ca8d2dd2adee0f12d2..f64e7c32221612db91b38f154fbda1a6aa263fa9 100644 (file)
@@ -7,6 +7,7 @@ config ATH12K
        select MHI_BUS
        select QRTR
        select QRTR_MHI
+       select PCI_PWRCTL_PWRSEQ if HAVE_PWRCTL
        help
          Enable support for Qualcomm Technologies Wi-Fi 7 (IEEE
          802.11be) family of chipsets, for example WCN7850 and
index f1b824955d4b915aa5a9d945e981e920ae5dcc67..54589bb2403b9d67731b7a1c1b733ed50cfeca85 100644 (file)
@@ -1,17 +1,12 @@
 # SPDX-License-Identifier: GPL-2.0-only
 
-menu "PCI Power control drivers"
+config HAVE_PWRCTL
+       bool
 
 config PCI_PWRCTL
        tristate
 
 config PCI_PWRCTL_PWRSEQ
-       tristate "PCI Power Control driver using the Power Sequencing subsystem"
+       tristate
        select POWER_SEQUENCING
        select PCI_PWRCTL
-       default m if ((ATH11K_PCI || ATH12K) && ARCH_QCOM)
-       help
-         Enable support for the PCI power control driver for device
-         drivers using the Power Sequencing subsystem.
-
-endmenu