Netdev List
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Daniel Golle <daniel@makrotopia.org>,
	Russell King <linux@armlinux.org.uk>,
	Heiner Kallweit <hkallweit1@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] net: dsa: mt7530: improve and relax PHY driver dependency
Date: Tue, 8 Aug 2023 12:35:29 +0300	[thread overview]
Message-ID: <20230808093529.yeatw7tsecgo6ikx@skbuf> (raw)
In-Reply-To: <3ae907b7b60792e36bc5292c2e0bab74f84285e7.1691246642.git.daniel@makrotopia.org>

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.

  parent reply	other threads:[~2023-08-08 16:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-05 14:45 [PATCH net-next] net: dsa: mt7530: improve and relax PHY driver dependency Daniel Golle
2023-08-07 15:21 ` Simon Horman
2023-08-08  9:35 ` Vladimir Oltean [this message]
2023-08-09 10:30 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230808093529.yeatw7tsecgo6ikx@skbuf \
    --to=olteanv@gmail.com \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox