Skip to contentSkip to conversation

net: phy: mdio-moxart: remove unneeded include

PATCH Applied Bartosz Golaszewski 4 participants 6 messages May 14, 2020 – May 15, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: phy: mdio-moxart: remove unneeded include

From: Bartosz Golaszewski <[email protected]>

mdio-moxart doesn't use regulators in the driver code. We can remove the regulator include.

---
 drivers/net/phy/mdio-moxart.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/phy/mdio-moxart.c +0 -1
index 2d16fc4173c1..b72c6d185175 100644
@@ -12,7 +12,6 @@
 #include <linux/of_mdio.h>
 #include <linux/phy.h>
 #include <linux/platform_device.h>
-#include <linux/regulator/consumer.h>
 
 #define REG_PHY_CTRL            0
 #define REG_PHY_WRITE_DATA      4
Signature · 1 line
2.25.0
#3 lore raw

czw., 14 maj 2020 o 19:13 Florian Fainelli <[email protected]> napisał(a):

Quoted 14 lines · Bartosz Golaszewski
Quoted 6 lines

From: Bartosz Golaszewski <[email protected]>

mdio-moxart doesn't use regulators in the driver code. We can remove the regulator include.

--
Florian

Hi Andrew, Florian,

I noticed this by accident when I was looking at the PHY drivers to see how they handle regulators supplying PHYs. In the case of the MediaTek Pumpkin board I'm working on - the PHY is a Realtek RTL8201F and it's supplied by a regulator that's enabled on boot by the relevant PMIC driver. I'd like to model it in the device-tree but I'm not sure what the correct approach is. Some ethernet drivers have a phy-supply property but it looks wrong to me - IMO this should be handled at the PHY driver level. Is it fine if I add a probe() callback to the realtek driver and retrieve the "phy-supply" there?

Bart

#4 lore raw
Quoted 18 lines · Bartosz Golaszewski

czw., 14 maj 2020 o 19:13 Florian Fainelli <[email protected]> napisał(a):

Quoted 14 lines · Bartosz Golaszewski
Quoted 6 lines

From: Bartosz Golaszewski <[email protected]>

mdio-moxart doesn't use regulators in the driver code. We can remove the regulator include.

--
Florian

Hi Andrew, Florian,

Quoted 9 lines

I noticed this by accident when I was looking at the PHY drivers to see how they handle regulators supplying PHYs. In the case of the MediaTek Pumpkin board I'm working on - the PHY is a Realtek RTL8201F and it's supplied by a regulator that's enabled on boot by the relevant PMIC driver. I'd like to model it in the device-tree but I'm not sure what the correct approach is. Some ethernet drivers have a phy-supply property but it looks wrong to me - IMO this should be handled at the PHY driver level. Is it fine if I add a probe() callback to the realtek driver and retrieve the "phy-supply" there?

Don't you need to do this earlier than probe() though? If the PHY device is powered down, then surely get_phy_id() won't be able to read its registers and bind the device to the driver.

This should be dealt the same way that resets are being dealt with, which is prior to the MDIO bus scan.

Signature · 1 line
Florian