[PATCH net-next v2 13/14] net: dsa: mt7530: introduce driver for MT7988 built-in switch

Philipp Zabel p.zabel at pengutronix.de
Tue Apr 25 08:51:37 PDT 2023


Hi Daniel,

On Mon, Apr 03, 2023 at 02:19:40AM +0100, Daniel Golle wrote:
> Add driver for the built-in Gigabit Ethernet switch which can be found
> in the MediaTek MT7988 SoC.
> 
> The switch shares most of its design with MT7530 and MT7531, but has
> it's registers mapped into the SoCs register space rather than being
> connected externally or internally via MDIO.
> 
> Introduce a new platform driver to support that.
> 
> Signed-off-by: Daniel Golle <daniel at makrotopia.org>
> Reviewed-by: Andrew Lunn <andrew at lunn.ch>
> ---
>  MAINTAINERS                   |   2 +
>  drivers/net/dsa/Kconfig       |  12 +++
>  drivers/net/dsa/Makefile      |   1 +
>  drivers/net/dsa/mt7530-mmio.c | 101 +++++++++++++++++++++++++
[...]
> diff --git a/drivers/net/dsa/mt7530-mmio.c b/drivers/net/dsa/mt7530-mmio.c
> new file mode 100644
> index 0000000000000..1a3d4b692f349
> --- /dev/null
> +++ b/drivers/net/dsa/mt7530-mmio.c
> @@ -0,0 +1,101 @@
[...]
> +	priv->rstc = devm_reset_control_get(&pdev->dev, NULL);

Please use devm_reset_control_get_exclusive() directly.

> +	if (IS_ERR(priv->rstc)) {
> +		dev_err(&pdev->dev, "Couldn't get our reset line\n");
> +		return PTR_ERR(priv->rstc);

Not sure if this can actually happen, but there is no need to warn on
-EPROBE_DEFER. You could use return dev_err_probe(...) here.

regards
Philipp



More information about the Linux-mediatek mailing list