[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YsKfSxSVQX8JyzmY@lunn.ch>
Date: Mon, 4 Jul 2022 10:05:31 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Andre Przywara <andre.przywara@....com>
Cc: Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Jernej Skrabec <jernej.skrabec@...il.com>
Subject: Re: [PATCH] net: phy: mdio: add clock support for PHYs
> +static int mdiobus_register_clock(struct mdio_device *mdiodev)
> +{
> + struct clk *clk;
> +
> + clk = devm_clk_get_optional(&mdiodev->dev, NULL);
> + if (IS_ERR(clk))
> + return PTR_ERR(clk);
How does this interact with the clock code of the micrel and smsc
drivers?
Please document this clock in the binding, ethernet-phy.yaml.
> diff --git a/drivers/net/phy/mdio_device.c b/drivers/net/phy/mdio_device.c
> index 250742ffdfd9..e8424a46a81e 100644
> --- a/drivers/net/phy/mdio_device.c
> +++ b/drivers/net/phy/mdio_device.c
> @@ -6,6 +6,7 @@
>
> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>
> +#include <linux/clk.h>
> #include <linux/delay.h>
> #include <linux/errno.h>
> #include <linux/gpio.h>
> @@ -136,6 +137,14 @@ void mdio_device_reset(struct mdio_device *mdiodev, int value)
> }
> EXPORT_SYMBOL(mdio_device_reset);
>
> +static void mdio_device_toggle_clock(struct mdio_device *mdiodev, int value)
Not sure this is the best name, you are not toggling the clock, you
are toggling the clock gate. And you are not really toggling it, since
you pass value.
Andrew
Powered by blists - more mailing lists