mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Andre Przywara <andre.przywara@arm.com>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"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-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Jernej Skrabec <jernej.skrabec@gmail.com>
Subject: Re: [PATCH] net: phy: mdio: add clock support for PHYs
Date: Mon, 4 Jul 2022 10:05:31 +0200	[thread overview]
Message-ID: <YsKfSxSVQX8JyzmY@lunn.ch> (raw)
In-Reply-To: <20220704004533.17762-1-andre.przywara@arm.com>

> +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

      reply	other threads:[~2022-07-04  8:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-04  0:45 Andre Przywara
2022-07-04  8:05 ` Andrew Lunn [this message]

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=YsKfSxSVQX8JyzmY@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=andre.przywara@arm.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.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

all inboxes | Powered by JetHome®