netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Marek Vasut <marex@denx.de>
Cc: netdev@vger.kernel.org, Florian Fainelli <f.fainelli@gmail.com>,
	"David S . Miller" <davem@davemloft.net>,
	Heiner Kallweit <hkallweit1@gmail.com>
Subject: Re: [PATCH] [RFC] net: phy: smsc: Add magnetics VIO regulator support
Date: Tue, 5 Jan 2021 18:38:08 +0100	[thread overview]
Message-ID: <X/SkAOV6s9vbSYh1@lunn.ch> (raw)
In-Reply-To: <20210105161533.250865-1-marex@denx.de>

> +static void smsc_link_change_notify(struct phy_device *phydev)
> +{
> +	struct smsc_phy_priv *priv = phydev->priv;
> +
> +	if (!priv->vddio)
> +		return;
> +
> +	if (phydev->state == PHY_HALTED)
> +		regulator_disable(priv->vddio);
> +
> +	if (phydev->state == PHY_NOLINK)
> +		regulator_enable(priv->vddio);

NOLINK is an interesting choice. Could you explain that please.

I fear this is not going to be very robust to state machine
changes. And since it is hidden away in a driver, it is going to be
forgotten about. You might want to think about making it more robust.

	  Andrew

  reply	other threads:[~2021-01-05 17:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-05 16:15 [PATCH] [RFC] net: phy: smsc: Add magnetics VIO regulator support Marek Vasut
2021-01-05 17:38 ` Andrew Lunn [this message]
2021-01-05 17:53   ` Marek Vasut
2021-01-05 19:03     ` Andrew Lunn
2021-01-05 21:38       ` Marek Vasut

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=X/SkAOV6s9vbSYh1@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=marex@denx.de \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).