diff mbox series

[net-next] net: dsa: mt7530: improve and relax PHY driver dependency

Message ID 3ae907b7b60792e36bc5292c2e0bab74f84285e7.1691246642.git.daniel@makrotopia.org (mailing list archive)
State Accepted
Commit b9b05381e5d76a5ad05aedf5357c585d4a1f78cd
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: dsa: mt7530: improve and relax PHY driver dependency | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 9 this patch: 9
netdev/cc_maintainers success CCed 8 of 8 maintainers
netdev/build_clang success Errors and warnings before: 9 this patch: 9
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 9 this patch: 9
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 21 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Daniel Golle Aug. 5, 2023, 2:45 p.m. UTC
Different MT7530 variants require different PHY drivers.
Use 'imply' instead of 'select' to relax the dependency on the PHY
driver, and choose the appropriate driver.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
 drivers/net/dsa/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Simon Horman Aug. 7, 2023, 3:21 p.m. UTC | #1
On Sat, Aug 05, 2023 at 03:45:36PM +0100, Daniel Golle wrote:
> Different MT7530 variants require different PHY drivers.
> Use 'imply' instead of 'select' to relax the dependency on the PHY
> driver, and choose the appropriate driver.
> 
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>

Reviewed-by: Simon Horman <horms@kernel.org>
Vladimir Oltean Aug. 8, 2023, 9:35 a.m. UTC | #2
On Sat, Aug 05, 2023 at 03:45:36PM +0100, Daniel Golle wrote:
> Different MT7530 variants require different PHY drivers.
> Use 'imply' instead of 'select' to relax the dependency on the PHY
> driver, and choose the appropriate driver.
> 
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
> ---
>  drivers/net/dsa/Kconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig
> index 3ed5391bb18d6..f8c1d73b251d0 100644
> --- a/drivers/net/dsa/Kconfig
> +++ b/drivers/net/dsa/Kconfig
> @@ -37,7 +37,6 @@ config NET_DSA_LANTIQ_GSWIP
>  config NET_DSA_MT7530
>  	tristate "MediaTek MT7530 and MT7531 Ethernet switch support"
>  	select NET_DSA_TAG_MTK
> -	select MEDIATEK_GE_PHY
>  	imply NET_DSA_MT7530_MDIO
>  	imply NET_DSA_MT7530_MMIO
>  	help
> @@ -49,6 +48,7 @@ config NET_DSA_MT7530
>  config NET_DSA_MT7530_MDIO
>  	tristate "MediaTek MT7530 MDIO interface driver"
>  	depends on NET_DSA_MT7530
> +	imply MEDIATEK_GE_PHY
>  	select PCS_MTK_LYNXI
>  	help
>  	  This enables support for the MediaTek MT7530 and MT7531 switch
> @@ -60,6 +60,7 @@ config NET_DSA_MT7530_MMIO
>  	tristate "MediaTek MT7530 MMIO interface driver"
>  	depends on NET_DSA_MT7530
>  	depends on HAS_IOMEM
> +	imply MEDIATEK_GE_SOC_PHY
>  	help
>  	  This enables support for the built-in Ethernet switch found
>  	  in the MediaTek MT7988 SoC.
> -- 
> 2.41.0

Reviewed-by: Vladimir Oltean <olteanv@gmail.com>

But I did a tree-wide search for "imply .*_PHY" and I didn't find any
other usage patterns, so I'm adding all phylib maintainers to make sure
that the practice isn't discouraged. If not, I guess it should be used
more often with internal PHYs for which the driver is known.
patchwork-bot+netdevbpf@kernel.org Aug. 9, 2023, 10:30 a.m. UTC | #3
Hello:

This patch was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Sat, 5 Aug 2023 15:45:36 +0100 you wrote:
> Different MT7530 variants require different PHY drivers.
> Use 'imply' instead of 'select' to relax the dependency on the PHY
> driver, and choose the appropriate driver.
> 
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
> ---
>  drivers/net/dsa/Kconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Here is the summary with links:
  - [net-next] net: dsa: mt7530: improve and relax PHY driver dependency
    https://git.kernel.org/netdev/net-next/c/b9b05381e5d7

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig
index 3ed5391bb18d6..f8c1d73b251d0 100644
--- a/drivers/net/dsa/Kconfig
+++ b/drivers/net/dsa/Kconfig
@@ -37,7 +37,6 @@  config NET_DSA_LANTIQ_GSWIP
 config NET_DSA_MT7530
 	tristate "MediaTek MT7530 and MT7531 Ethernet switch support"
 	select NET_DSA_TAG_MTK
-	select MEDIATEK_GE_PHY
 	imply NET_DSA_MT7530_MDIO
 	imply NET_DSA_MT7530_MMIO
 	help
@@ -49,6 +48,7 @@  config NET_DSA_MT7530
 config NET_DSA_MT7530_MDIO
 	tristate "MediaTek MT7530 MDIO interface driver"
 	depends on NET_DSA_MT7530
+	imply MEDIATEK_GE_PHY
 	select PCS_MTK_LYNXI
 	help
 	  This enables support for the MediaTek MT7530 and MT7531 switch
@@ -60,6 +60,7 @@  config NET_DSA_MT7530_MMIO
 	tristate "MediaTek MT7530 MMIO interface driver"
 	depends on NET_DSA_MT7530
 	depends on HAS_IOMEM
+	imply MEDIATEK_GE_SOC_PHY
 	help
 	  This enables support for the built-in Ethernet switch found
 	  in the MediaTek MT7988 SoC.