提交 343a5d35 编写于 作者: M Michael Walle 提交者: 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: NMichael Walle <michael@walle.cc>
Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册