net: phy: add helper phy_polling_mode
Add a helper for checking whether polling is used to detect PHY status changes. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
d805f6a868
commit
3c507b8af6
@@ -824,6 +824,16 @@ static inline bool phy_interrupt_is_valid(struct phy_device *phydev)
|
||||
return phydev->irq != PHY_POLL && phydev->irq != PHY_IGNORE_INTERRUPT;
|
||||
}
|
||||
|
||||
/**
|
||||
* phy_polling_mode - Convenience function for testing whether polling is
|
||||
* used to detect PHY status changes
|
||||
* @phydev: the phy_device struct
|
||||
*/
|
||||
static inline bool phy_polling_mode(struct phy_device *phydev)
|
||||
{
|
||||
return phydev->irq == PHY_POLL;
|
||||
}
|
||||
|
||||
/**
|
||||
* phy_is_internal - Convenience function for testing if a PHY is internal
|
||||
* @phydev: the phy_device struct
|
||||
|
Reference in New Issue
Block a user