|
@@ -677,6 +677,17 @@ static inline bool phy_is_internal(struct phy_device *phydev)
|
|
|
return phydev->is_internal;
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * phy_interface_is_rgmii - Convenience function for testing if a PHY interface
|
|
|
+ * is RGMII (all variants)
|
|
|
+ * @phydev: the phy_device struct
|
|
|
+ */
|
|
|
+static inline bool phy_interface_is_rgmii(struct phy_device *phydev)
|
|
|
+{
|
|
|
+ return phydev->interface >= PHY_INTERFACE_MODE_RGMII &&
|
|
|
+ phydev->interface <= PHY_INTERFACE_MODE_RGMII_TXID;
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* phy_write_mmd - Convenience function for writing a register
|
|
|
* on an MMD on a given PHY.
|