net: phy: add devm/of_phy_package_join helper
authorChristian Marangi <ansuelsmth@gmail.com>
Tue, 6 Feb 2024 17:31:06 +0000 (18:31 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 10 Feb 2024 15:36:19 +0000 (15:36 +0000)
commit471e8fd3afcef5a9f9089f0bd21965ad9ba35c91
tree91028f24d7c36349882b517ee3ddc9fff35d1a6f
parent385ef48f468696d6d172eb367656a3466fa0408d
net: phy: add devm/of_phy_package_join helper

Add devm/of_phy_package_join helper to join PHYs in a PHY package. These
are variant of the manual phy_package_join with the difference that
these will use DT nodes to derive the base_addr instead of manually
passing an hardcoded value.

An additional value is added in phy_package_shared, "np" to reference
the PHY package node pointer in specific PHY driver probe_once and
config_init_once functions to make use of additional specific properties
defined in the PHY package node in DT.

The np value is filled only with of_phy_package_join if a valid PHY
package node is found. A valid PHY package node must have the node name
set to "ethernet-phy-package".

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy_device.c
include/linux/phy.h