netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v2 1/2] net: phy: marvell10g: disable temperature sensor on 2110
@ 2020-04-21 10:56 Baruch Siach
  2020-04-21 10:56 ` [PATCH net v2 2/2] net: phy: marvell10g: hwmon support for 2110 Baruch Siach
  0 siblings, 1 reply; 3+ messages in thread
From: Baruch Siach @ 2020-04-21 10:56 UTC (permalink / raw)
  To: Russell King
  Cc: netdev, Andrew Lunn, Florian Fainelli, Heiner Kallweit,
	Baruch Siach, Maxime Chevallier

The 88E2110 temperature sensor is in a different location than 88X3310,
and it has no enable/disable option.

Fixes: 62d01535474b61 ("net: phy: marvell10g: add support for the 88x2110 PHY")
Cc: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
v2: No change
---
 drivers/net/phy/marvell10g.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/phy/marvell10g.c b/drivers/net/phy/marvell10g.c
index 95e3f4644aeb..69530a84450f 100644
--- a/drivers/net/phy/marvell10g.c
+++ b/drivers/net/phy/marvell10g.c
@@ -169,6 +169,9 @@ static int mv3310_hwmon_config(struct phy_device *phydev, bool enable)
 	u16 val;
 	int ret;
 
+	if (phydev->drv->phy_id != MARVELL_PHY_ID_88X3310)
+		return 0;
+
 	ret = phy_write_mmd(phydev, MDIO_MMD_VEND2, MV_V2_TEMP,
 			    MV_V2_TEMP_UNKNOWN);
 	if (ret < 0)
@@ -193,6 +196,9 @@ static int mv3310_hwmon_probe(struct phy_device *phydev)
 	struct mv3310_priv *priv = dev_get_drvdata(&phydev->mdio.dev);
 	int i, j, ret;
 
+	if (phydev->drv->phy_id != MARVELL_PHY_ID_88X3310)
+		return 0;
+
 	priv->hwmon_name = devm_kstrdup(dev, dev_name(dev), GFP_KERNEL);
 	if (!priv->hwmon_name)
 		return -ENODEV;
-- 
2.26.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-21 13:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-21 10:56 [PATCH net v2 1/2] net: phy: marvell10g: disable temperature sensor on 2110 Baruch Siach
2020-04-21 10:56 ` [PATCH net v2 2/2] net: phy: marvell10g: hwmon support for 2110 Baruch Siach
2020-04-21 13:22   ` Andrew Lunn

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).