Commit 343a5d35 authored by Michael Walle's avatar Michael Walle Committed by David S. Miller

net: phy: mxl-gpy: rename MMD_VEND1 macros to match datasheet

Rename the temperature sensors macros to match the names in the
datasheet.
Signed-off-by: default avatarMichael Walle <michael@walle.cc>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent de624864
...@@ -78,8 +78,8 @@ ...@@ -78,8 +78,8 @@
VSPEC1_SGMII_CTRL_ANRS) VSPEC1_SGMII_CTRL_ANRS)
/* Temperature sensor */ /* Temperature sensor */
#define VPSPEC1_TEMP_STA 0x0E #define VSPEC1_TEMP_STA 0x0E
#define VPSPEC1_TEMP_STA_DATA GENMASK(9, 0) #define VSPEC1_TEMP_STA_DATA GENMASK(9, 0)
/* WoL */ /* WoL */
#define VPSPEC2_WOL_CTL 0x0E06 #define VPSPEC2_WOL_CTL 0x0E06
...@@ -140,14 +140,14 @@ static int gpy_hwmon_read(struct device *dev, ...@@ -140,14 +140,14 @@ static int gpy_hwmon_read(struct device *dev,
struct phy_device *phydev = dev_get_drvdata(dev); struct phy_device *phydev = dev_get_drvdata(dev);
int ret; int ret;
ret = phy_read_mmd(phydev, MDIO_MMD_VEND1, VPSPEC1_TEMP_STA); ret = phy_read_mmd(phydev, MDIO_MMD_VEND1, VSPEC1_TEMP_STA);
if (ret < 0) if (ret < 0)
return ret; return ret;
if (!ret) if (!ret)
return -ENODATA; return -ENODATA;
*value = polynomial_calc(&poly_N_to_temp, *value = polynomial_calc(&poly_N_to_temp,
FIELD_GET(VPSPEC1_TEMP_STA_DATA, ret)); FIELD_GET(VSPEC1_TEMP_STA_DATA, ret));
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment