diff options
author | Michael Walle <michael@walle.cc> | 2020-05-06 17:53:13 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-07 00:53:29 +0300 |
commit | 6349084746ff4f5f7ebc748e4b2a890f8c57b129 (patch) | |
tree | 81102a5bf8f322a83df5f15d2ca1f9cfd8accafa /drivers/net/phy/mdio_bus.c | |
parent | 857b412511c87ed7137e63b90b2de020c24660e9 (diff) | |
download | linux-6349084746ff4f5f7ebc748e4b2a890f8c57b129.tar.xz |
net: phy: add concept of shared storage for PHYs
There are packages which contain multiple PHY devices, eg. a quad PHY
transceiver. Provide functions to allocate and free shared storage.
Usually, a quad PHY contains global registers, which don't belong to any
PHY. Provide convenience functions to access these registers.
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/mdio_bus.c')
-rw-r--r-- | drivers/net/phy/mdio_bus.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 3e79b96fa344..255fdfcc13a6 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c @@ -614,6 +614,7 @@ int __mdiobus_register(struct mii_bus *bus, struct module *owner) } mutex_init(&bus->mdio_lock); + mutex_init(&bus->shared_lock); /* de-assert bus level PHY GPIO reset */ gpiod = devm_gpiod_get_optional(&bus->dev, "reset", GPIOD_OUT_LOW); |