summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Schulz <quentin.schulz@bootlin.com>2018-09-03 10:48:49 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-20 18:45:53 +0100
commit77f9e263e29606dfb366b1fcc79403f1b82d30b9 (patch)
tree5de22c7a533673da4927fd2a3ee775dcc66d464e
parent5dc1cbcff700b11bea1b5707d6ee0f95c2850e5c (diff)
net: phy: mscc: read 'vsc8531,vddmac' as an u32
[ Upstream commit a993e0f583c7925adaa7721226ccd7a41e7e63d1 ] In the DT binding, it is specified nowhere that 'vsc8531,vddmac' is an u16, even though it's read as an u16 in the driver. Let's update the driver to take into consideration that the 'vsc8531,vddmac' property is of the default type u32. Signed-off-by: Quentin Schulz <quentin.schulz@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/net/phy/mscc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/phy/mscc.c b/drivers/net/phy/mscc.c
index 84ca9ff40ae0..53d63a71a03e 100644
--- a/drivers/net/phy/mscc.c
+++ b/drivers/net/phy/mscc.c
@@ -111,7 +111,7 @@ struct vsc8531_private {
#ifdef CONFIG_OF_MDIO
struct vsc8531_edge_rate_table {
- u16 vddmac;
+ u32 vddmac;
u8 slowdown[8];
};
@@ -376,7 +376,7 @@ out_unlock:
static int vsc85xx_edge_rate_magic_get(struct phy_device *phydev)
{
u8 sd;
- u16 vdd;
+ u32 vdd;
int rc, i, j;
struct device *dev = &phydev->mdio.dev;
struct device_node *of_node = dev->of_node;
@@ -385,7 +385,7 @@ static int vsc85xx_edge_rate_magic_get(struct phy_device *phydev)
if (!of_node)
return -ENODEV;
- rc = of_property_read_u16(of_node, "vsc8531,vddmac", &vdd);
+ rc = of_property_read_u32(of_node, "vsc8531,vddmac", &vdd);
if (rc != 0)
vdd = MSCC_VDDMAC_3300;