aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/phy.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/phy.h')
-rw-r--r--include/linux/phy.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h
index e5fb1d415961..962387a192f1 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -330,6 +330,7 @@ struct phy_c45_device_ids {
330 * c45_ids: 802.3-c45 Device Identifers if is_c45. 330 * c45_ids: 802.3-c45 Device Identifers if is_c45.
331 * is_c45: Set to true if this phy uses clause 45 addressing. 331 * is_c45: Set to true if this phy uses clause 45 addressing.
332 * is_internal: Set to true if this phy is internal to a MAC. 332 * is_internal: Set to true if this phy is internal to a MAC.
333 * is_pseudo_fixed_link: Set to true if this phy is an Ethernet switch, etc.
333 * has_fixups: Set to true if this phy has fixups/quirks. 334 * has_fixups: Set to true if this phy has fixups/quirks.
334 * suspended: Set to true if this phy has been suspended successfully. 335 * suspended: Set to true if this phy has been suspended successfully.
335 * state: state of the PHY for management purposes 336 * state: state of the PHY for management purposes
@@ -368,6 +369,7 @@ struct phy_device {
368 struct phy_c45_device_ids c45_ids; 369 struct phy_c45_device_ids c45_ids;
369 bool is_c45; 370 bool is_c45;
370 bool is_internal; 371 bool is_internal;
372 bool is_pseudo_fixed_link;
371 bool has_fixups; 373 bool has_fixups;
372 bool suspended; 374 bool suspended;
373 375
@@ -688,6 +690,16 @@ static inline bool phy_interface_is_rgmii(struct phy_device *phydev)
688{ 690{
689 return phydev->interface >= PHY_INTERFACE_MODE_RGMII && 691 return phydev->interface >= PHY_INTERFACE_MODE_RGMII &&
690 phydev->interface <= PHY_INTERFACE_MODE_RGMII_TXID; 692 phydev->interface <= PHY_INTERFACE_MODE_RGMII_TXID;
693};
694
695/*
696 * phy_is_pseudo_fixed_link - Convenience function for testing if this
697 * PHY is the CPU port facing side of an Ethernet switch, or similar.
698 * @phydev: the phy_device struct
699 */
700static inline bool phy_is_pseudo_fixed_link(struct phy_device *phydev)
701{
702 return phydev->is_pseudo_fixed_link;
691} 703}
692 704
693/** 705/**