This patch will extend "struct fixed_phy_status" by adding new "struct device *dev" member entry in it. This change will help to handle the fixed phy registration in ACPI probe case for fwnodes.
Signed-off-by: Vikas Singh <vikas.si...@puresoftware.com> --- drivers/net/phy/fixed_phy.c | 2 ++ include/linux/phy_fixed.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/net/phy/fixed_phy.c b/drivers/net/phy/fixed_phy.c index c4641b1..011c033 100644 --- a/drivers/net/phy/fixed_phy.c +++ b/drivers/net/phy/fixed_phy.c @@ -267,6 +267,8 @@ static struct phy_device *__fixed_phy_register(unsigned int irq, phy->duplex = status->duplex; phy->pause = status->pause; phy->asym_pause = status->asym_pause; + if (!np) + phy->mdio.dev.fwnode = status->dev->fwnode; } of_node_get(np); diff --git a/include/linux/phy_fixed.h b/include/linux/phy_fixed.h index 52bc8e4..155fea6 100644 --- a/include/linux/phy_fixed.h +++ b/include/linux/phy_fixed.h @@ -8,6 +8,8 @@ struct fixed_phy_status { int duplex; int pause; int asym_pause; + /* Associated device node */ + struct device *dev; }; struct device_node; -- 2.7.4