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