diff mbox series

[1/4] PCI/pwrctrl: Rename pwrctrl Kconfig symbols and slot module

Message ID 20250328143646.27678-2-johan+linaro@kernel.org (mailing list archive)
State New
Delegated to: Bjorn Helgaas
Headers show
Series PCI/arm64/ath11k/ath12k: Rename pwrctrl Kconfig symbols | expand

Commit Message

Johan Hovold March 28, 2025, 2:36 p.m. UTC
Commits b88cbaaa6fa1 ("PCI/pwrctrl: Rename pwrctl files to pwrctrl") and
3f925cd62874 ("PCI/pwrctrl: Rename pwrctrl functions and structures")
renamed the "pwrctl" framework to "pwrctrl" for consistency reasons.

Rename also the Kconfig symbols so that they reflect the new name while
adding entries for the deprecated ones. The old symbols can be removed
once everything that depends on them has been updated.

The new slot module is also renamed to reflect the framework name and
match the other pwrctrl modules.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/pci/pwrctrl/Kconfig  | 27 +++++++++++++++++++++------
 drivers/pci/pwrctrl/Makefile |  8 ++++----
 2 files changed, 25 insertions(+), 10 deletions(-)

Comments

Bjorn Helgaas March 28, 2025, 3:13 p.m. UTC | #1
On Fri, Mar 28, 2025 at 03:36:43PM +0100, Johan Hovold wrote:
> Commits b88cbaaa6fa1 ("PCI/pwrctrl: Rename pwrctl files to pwrctrl") and
> 3f925cd62874 ("PCI/pwrctrl: Rename pwrctrl functions and structures")
> renamed the "pwrctl" framework to "pwrctrl" for consistency reasons.
> 
> Rename also the Kconfig symbols so that they reflect the new name while
> adding entries for the deprecated ones. The old symbols can be removed
> once everything that depends on them has been updated.

I considered changing the Kconfig symbols at the time, but didn't do
it because I didn't want to break existing .config files.  Is that not
a concern?  Or do you think the long-term benefit is worth having
users re-answer these config questions?

We have lots of Kconfig symbols that are not what we would choose
today, e.g., my misguided suggestion years ago to use "CONFIG_PCI_*"
instead of "CONFIG_PCIE_*" for PCIe controller drivers that didn't
have any PCIe content.

If we do want this, I would think we should squash all these so we
don't have breakage between this patch and the following ones.

Bjorn
Johan Hovold March 28, 2025, 3:50 p.m. UTC | #2
On Fri, Mar 28, 2025 at 10:13:43AM -0500, Bjorn Helgaas wrote:
> On Fri, Mar 28, 2025 at 03:36:43PM +0100, Johan Hovold wrote:
> > Commits b88cbaaa6fa1 ("PCI/pwrctrl: Rename pwrctl files to pwrctrl") and
> > 3f925cd62874 ("PCI/pwrctrl: Rename pwrctrl functions and structures")
> > renamed the "pwrctl" framework to "pwrctrl" for consistency reasons.
> > 
> > Rename also the Kconfig symbols so that they reflect the new name while
> > adding entries for the deprecated ones. The old symbols can be removed
> > once everything that depends on them has been updated.
> 
> I considered changing the Kconfig symbols at the time, but didn't do
> it because I didn't want to break existing .config files.  Is that not
> a concern?  Or do you think the long-term benefit is worth having
> users re-answer these config questions?

I added entries for the old (deprecated) symbol names that select the
new ones so that should not be a problem.

> If we do want this, I would think we should squash all these so we
> don't have breakage between this patch and the following ones.

The entries using the old names make sure that there is no breakage as
long as the patches are applied in order. They also handle any new
users being added to other subsystem trees.

(As I mentioned in the cover letter we can drop those entries after a
couple of releases.)

Johan
diff mbox series

Patch

diff --git a/drivers/pci/pwrctrl/Kconfig b/drivers/pci/pwrctrl/Kconfig
index 990cab67d413..62f176e42e33 100644
--- a/drivers/pci/pwrctrl/Kconfig
+++ b/drivers/pci/pwrctrl/Kconfig
@@ -1,19 +1,19 @@ 
 # SPDX-License-Identifier: GPL-2.0-only
 
-config HAVE_PWRCTL
+config HAVE_PWRCTRL
 	bool
 
-config PCI_PWRCTL
+config PCI_PWRCTRL
 	tristate
 
-config PCI_PWRCTL_PWRSEQ
+config PCI_PWRCTRL_PWRSEQ
 	tristate
 	select POWER_SEQUENCING
-	select PCI_PWRCTL
+	select PCI_PWRCTRL
 
-config PCI_PWRCTL_SLOT
+config PCI_PWRCTRL_SLOT
 	tristate "PCI Power Control driver for PCI slots"
-	select PCI_PWRCTL
+	select PCI_PWRCTRL
 	help
 	  Say Y here to enable the PCI Power Control driver to control the power
 	  state of PCI slots.
@@ -21,3 +21,18 @@  config PCI_PWRCTL_SLOT
 	  This is a generic driver that controls the power state of different
 	  PCI slots. The voltage regulators powering the rails of the PCI slots
 	  are expected to be defined in the devicetree node of the PCI bridge.
+
+# deprecated
+config HAVE_PWRCTL
+	bool
+	select HAVE_PWRCTRL
+
+# deprecated
+config PCI_PWRCTL_PWRSEQ
+	tristate
+	select PCI_PWRCTRL_PWRSEQ
+
+# deprecated
+config PCI_PWRCTL_SLOT
+	tristate
+	select PCI_PWRCTRL_SLOT
diff --git a/drivers/pci/pwrctrl/Makefile b/drivers/pci/pwrctrl/Makefile
index ddfb12c5aadf..a4e5808d7850 100644
--- a/drivers/pci/pwrctrl/Makefile
+++ b/drivers/pci/pwrctrl/Makefile
@@ -1,9 +1,9 @@ 
 # SPDX-License-Identifier: GPL-2.0-only
 
-obj-$(CONFIG_PCI_PWRCTL)		+= pci-pwrctrl-core.o
+obj-$(CONFIG_PCI_PWRCTRL)		+= pci-pwrctrl-core.o
 pci-pwrctrl-core-y			:= core.o
 
-obj-$(CONFIG_PCI_PWRCTL_PWRSEQ)		+= pci-pwrctrl-pwrseq.o
+obj-$(CONFIG_PCI_PWRCTRL_PWRSEQ)	+= pci-pwrctrl-pwrseq.o
 
-obj-$(CONFIG_PCI_PWRCTL_SLOT)		+= pci-pwrctl-slot.o
-pci-pwrctl-slot-y			:= slot.o
+obj-$(CONFIG_PCI_PWRCTRL_SLOT)		+= pci-pwrctrl-slot.o
+pci-pwrctrl-slot-y			:= slot.o