X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=include%2Fphy.h;h=268d9a1823f93cd1eab151053b23743080f399d7;hb=bd91508b50ade5c73b3749bf4e5ede31d2da7ef8;hp=7346da7cb63877b3a60b417e18c45764349efbe8;hpb=3ab72fe8075b137c238665008c356239d1e6bc54;p=people%2Fms%2Fu-boot.git diff --git a/include/phy.h b/include/phy.h index 7346da7cb6..268d9a1823 100644 --- a/include/phy.h +++ b/include/phy.h @@ -289,6 +289,17 @@ static inline bool phy_interface_is_rgmii(struct phy_device *phydev) phydev->interface <= PHY_INTERFACE_MODE_RGMII_TXID; } +/** + * phy_interface_is_sgmii - Convenience function for testing if a PHY interface + * is SGMII (all variants) + * @phydev: the phy_device struct + */ +static inline bool phy_interface_is_sgmii(struct phy_device *phydev) +{ + return phydev->interface >= PHY_INTERFACE_MODE_SGMII && + phydev->interface <= PHY_INTERFACE_MODE_QSGMII; +} + /* PHY UIDs for various PHYs that are referenced in external code */ #define PHY_UID_CS4340 0x13e51002 #define PHY_UID_TN2020 0x00a19410