net: phy: split out PHY speed and duplex string generation

Other code would like to make use of this, so make the speed and duplex
string generation visible, and place it in a separate file.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Russell King
2017-07-25 15:02:42 +01:00
committed by David S. Miller
parent c3ecbe757c
commit da4625ac26
3 changed files with 53 additions and 37 deletions

View File

@@ -667,6 +667,9 @@ struct phy_fixup {
int (*run)(struct phy_device *phydev);
};
const char *phy_speed_to_str(int speed);
const char *phy_duplex_to_str(unsigned int duplex);
/**
* phy_read_mmd - Convenience function for reading a register
* from an MMD on a given PHY.