Thread (5 messages) flat view 5 messages, 2 authors, 2021-01-05

Re: [PATCH] [RFC] net: phy: smsc: Add magnetics VIO regulator support

From: Andrew Lunn <andrew@lunn.ch>
Date: 2021-01-05 17:38:52

+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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help