mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
of: mdio: export of_mdio_parse_addr
Export of_mdio_parse_addr() which allows parsing a given Ethernet PHY node MDIO address, verify it is within the allowed range, and return its value. This is going to be useful for the DSA code which needs to deal with multiple layers of MDIO buses. Signed-off-by: Florian Fainelli <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
d26ea6cc48
commit
33d6737761
2 changed files with 9 additions and 1 deletions
|
|
@ -88,7 +88,7 @@ static int of_mdiobus_register_phy(struct mii_bus *mdio, struct device_node *chi
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int of_mdio_parse_addr(struct device *dev, const struct device_node *np)
|
||||
int of_mdio_parse_addr(struct device *dev, const struct device_node *np)
|
||||
{
|
||||
u32 addr;
|
||||
int ret;
|
||||
|
|
@ -108,6 +108,7 @@ static int of_mdio_parse_addr(struct device *dev, const struct device_node *np)
|
|||
|
||||
return addr;
|
||||
}
|
||||
EXPORT_SYMBOL(of_mdio_parse_addr);
|
||||
|
||||
/**
|
||||
* of_mdiobus_register - Register mii_bus and create PHYs from the device tree
|
||||
|
|
|
|||
Loading…
Reference in a new issue