[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1eca8c654679764a64252072509ddc1bf59938a0.1587047556.git.baruch@tkos.co.il>
Date: Thu, 16 Apr 2020 17:32:36 +0300
From: Baruch Siach <baruch@...s.co.il>
To: Russell King <linux@...linux.org.uk>
Cc: netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Baruch Siach <baruch@...s.co.il>,
Maxime Chevallier <maxime.chevallier@...tlin.com>
Subject: [PATCH] net: phy: marvell10g: disable temperature sensor on 2110
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@...tlin.com>
Signed-off-by: Baruch Siach <baruch@...s.co.il>
---
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 7621badae64d..7c4bc7347d0f 100644
--- a/drivers/net/phy/marvell10g.c
+++ b/drivers/net/phy/marvell10g.c
@@ -164,6 +164,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)
@@ -188,6 +191,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.25.1
Powered by blists - more mailing lists