[PATCH net-next 2/2] net: mdio: add amlogic gxl mdio mux support
Simon Horman
simon.horman at corigine.com
Mon Jan 16 04:11:02 PST 2023
On Mon, Jan 16, 2023 at 10:16:36AM +0100, Jerome Brunet wrote:
> Add support for the mdio mux and internal phy glue of the GXL SoC
> family
>
> Signed-off-by: Jerome Brunet <jbrunet at baylibre.com>
> ---
> drivers/net/mdio/Kconfig | 11 ++
> drivers/net/mdio/Makefile | 1 +
> drivers/net/mdio/mdio-mux-meson-gxl.c | 160 ++++++++++++++++++++++++++
> 3 files changed, 172 insertions(+)
> create mode 100644 drivers/net/mdio/mdio-mux-meson-gxl.c
Hi Jerome,
please run this patch through checkpatch.
...
> diff --git a/drivers/net/mdio/mdio-mux-meson-gxl.c b/drivers/net/mdio/mdio-mux-meson-gxl.c
> new file mode 100644
> index 000000000000..205095d845ea
> --- /dev/null
> +++ b/drivers/net/mdio/mdio-mux-meson-gxl.c
...
> +static int gxl_enable_internal_mdio(struct gxl_mdio_mux *priv)
> +{
nit: I think void would be a more appropriate return type for this
function. Likewise gxl_enable_external_mdio()
...
> +static int gxl_mdio_mux_probe(struct platform_device *pdev){
nit: '{' should be at the beginning of a new line
> + struct device *dev = &pdev->dev;
> + struct clk *rclk;
> + struct gxl_mdio_mux *priv;
nit: reverse xmas tree for local variable declarations.
> + int ret;
> +
> + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
> + if (!priv)
> + return -ENOMEM;
nit: may be it is nicer to use dev_err_probe() here for consistency.
> + platform_set_drvdata(pdev, priv);
> +
> + priv->regs = devm_platform_ioremap_resource(pdev, 0);
> + if (IS_ERR(priv->regs))
> + return PTR_ERR(priv->regs);
And here.
...
More information about the linux-amlogic
mailing list