]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: Add helper to derive the number of ports from a phy mode
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Wed, 17 Aug 2022 12:32:54 +0000 (14:32 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Aug 2022 12:46:26 +0000 (13:46 +0100)
commitb68a0a475bcaefb9b06d483a634d6f2040343429
tree3512fc04c0e38a04b6e3f4e808a6846563023e5e
parent348c883b353c40ede9e56a9aafb43a365c314563
net: phy: Add helper to derive the number of ports from a phy mode

Some phy modes such as QSGMII multiplex several MAC<->PHY links on one
single physical interface. QSGMII used to be the only one supported, but
other modes such as QUSGMII also carry multiple links.

This helper allows getting the number of links that are multiplexed
on a given interface.

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy-core.c
include/linux/phy.h