Skip to contentSkip to conversation

remove Kconfig sysmbol MDIO_BUS

PATCH Applied Heiner Kallweit 4 participants 7 messages Mar 15 – Mar 19

Subsystems (5)
lore
Share & tools
lore

Heiner Kallweit

author maintainer
#0 lore raw

cover remove Kconfig sysmbol MDIO_BUS

MDIO-based regmap is the last user of config symbol MDIO_BUS. MDIO access needs a MII bus, which requires PHYLIB for the provider part. Therefore make REGMAP_MDIO depend on PHYLIB, what allows to remove config symbol MDIO_BUS.

Heiner Kallweit (2):
regmap: mdio: make it depend on PHYLIB
net: phy: remove Kconfig sysmbol MDIO_BUS

 drivers/base/regmap/Kconfig | 2 +-
 drivers/net/phy/Kconfig     | 6 ------
 drivers/net/phy/Makefile    | 2 +-
 3 files changed, 2 insertions(+), 8 deletions(-)
Signature · 1 line
2.53.0
author maintainer
#1 lore raw

PATCH 1/2 regmap: mdio: make it depend on PHYLIB

MDIO-based regmap is the last user of config symbol MDIO_BUS. MDIO access needs a MII bus, which requires PHYLIB for the provider part. Therefore make REGMAP_MDIO depend on PHYLIB, what allows to remove config symbol MDIO_BUS in a follow-up patch.

Note: After c5a219395b4e ("regmap: Move selecting for REGMAP_MDIO and
REGMAP_IRQ") switching to "depends on" should be fine, w/o risk of a circular dependency.

---
 drivers/base/regmap/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/regmap/Kconfig +1 -1
index 06d7eb2aac1..3c76a5bf67b 100644
@@ -56,7 +56,7 @@ config REGMAP_W1
 
 config REGMAP_MDIO
 	tristate
-	select MDIO_BUS
+	depends on PHYLIB
 
 config REGMAP_MMIO
 	tristate
Signature · 1 line
2.53.0
maintainer Acked-by on v1 1/2
#2 lore raw

Re: [PATCH net-next 1/2] regmap: mdio: make it depend on PHYLIB

Quoted 4 lines · Heiner Kallweit

MDIO-based regmap is the last user of config symbol MDIO_BUS. MDIO access needs a MII bus, which requires PHYLIB for the provider part. Therefore make REGMAP_MDIO depend on PHYLIB, what allows to remove config symbol MDIO_BUS in a follow-up patch.

maintainer
#3 lore raw

Re: [PATCH net-next 1/2] regmap: mdio: make it depend on PHYLIB

In reply to Heiner Kallweit

drivers/base/regmap/Kconfig config REGMAP_W1 · line 59

Quoted 4 lines · On Sun, 15 Mar 2026 17:48:43 +0100 Heiner Kallweit wrote:

config REGMAP_MDIO

drivers/base/regmap/Kconfig +1 -1
 	tristate
-	select MDIO_BUS
+	depends on PHYLIB

The REGMAP_MDIO symbol seems to have no user in the first place? I'd have expected any driver that practically needs it to select it. What am I missing?

maintainer
#4 lore raw

Re: [PATCH net-next 1/2] regmap: mdio: make it depend on PHYLIB

Quoted 10 lines · Jakub Kicinski

drivers/base/regmap/Kconfig config REGMAP_W1 · line 59

Quoted 4 lines · On Sun, 15 Mar 2026 17:48:43 +0100 Heiner Kallweit wrote:

config REGMAP_MDIO

drivers/base/regmap/Kconfig +1 -1
 	tristate
-	select MDIO_BUS
+	depends on PHYLIB

The REGMAP_MDIO symbol seems to have no user in the first place? I'd have expected any driver that practically needs it to select it. What am I missing?

Nothing, that's how it's supposed to work. I don't tend to block new buses on their users being added since it just makes merging a bit more complicated (or possibly the user has been and gone).

author maintainer
#5 lore raw

PATCH 2/2 net: phy: remove Kconfig symbol MDIO_BUS

In reply to Heiner Kallweit

After usage of config symbol MDIO_BUS has been removed from REGMAP_MIO as last user, the symbol can be removed.

---
 drivers/net/phy/Kconfig  | 6 ------
 drivers/net/phy/Makefile | 2 +-
 2 files changed, 1 insertion(+), 7 deletions(-)
drivers/net/phy/Kconfig +0 -6
index 7b73332a13d..b5ee338b620 100644
@@ -3,11 +3,6 @@
 # PHY Layer Configuration
 #
 
-config MDIO_BUS
-	tristate "MDIO bus consumer layer"
-	help
-	  MDIO bus consumer layer
-
 config PHYLINK
 	tristate
 	select PHYLIB
@@ -19,7 +14,6 @@ config PHYLINK
 
 menuconfig PHYLIB
 	tristate "PHY Device support and infrastructure"
-	select MDIO_BUS
 	help
 	  Ethernet controllers are usually attached to PHY
 	  devices.  This option provides infrastructure for
drivers/net/phy/Makefile +1 -1
index 8d262b4e2be..05e4878af27 100644
@@ -15,7 +15,7 @@ libphy-$(CONFIG_SWPHY)		+= swphy.o
 libphy-$(CONFIG_LED_TRIGGER_PHY)	+= phy_led_triggers.o
 libphy-$(CONFIG_OPEN_ALLIANCE_HELPERS) += open_alliance_helpers.o
 
-obj-$(CONFIG_MDIO_BUS)		+= mdio_bus.o
+obj-$(CONFIG_PHYLIB)		+= mdio_bus.o
 obj-$(CONFIG_PHYLINK)		+= phylink.o
 obj-$(CONFIG_PHYLIB)		+= libphy.o
 obj-$(CONFIG_PHYLIB)		+= mdio_devres.o
Signature · 1 line
2.53.0
#6 lore raw
In reply to Heiner Kallweit
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 10 lines · On Sun, 15 Mar 2026 17:47:47 +0100 you wrote:

MDIO-based regmap is the last user of config symbol MDIO_BUS. MDIO access needs a MII bus, which requires PHYLIB for the provider part. Therefore make REGMAP_MDIO depend on PHYLIB, what allows to remove config symbol MDIO_BUS.

Heiner Kallweit (2):
regmap: mdio: make it depend on PHYLIB
net: phy: remove Kconfig sysmbol MDIO_BUS

[...]

Here is the summary with links:
- [net-next,1/2] regmap: mdio: make it depend on PHYLIB

    https://git.kernel.org/netdev/net-next/c/e611a97032f0
  - [net-next,2/2] net: phy: remove Kconfig symbol MDIO_BUS
    https://git.kernel.org/netdev/net-next/c/91283bd5b008

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html