diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2018-07-23 21:40:07 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-25 13:41:22 -0700 |
commit | 3c507b8af638c67d4a80d70091d2057ecb01e8a6 (patch) | |
tree | 0faf90171f874daa7937568e4153838dc2265a65 /include/linux/phy.h | |
parent | d805f6a8682937d7f8136fe7561659b13f5aaa49 (diff) | |
download | lwn-3c507b8af638c67d4a80d70091d2057ecb01e8a6.tar.gz lwn-3c507b8af638c67d4a80d70091d2057ecb01e8a6.zip |
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>
Diffstat (limited to 'include/linux/phy.h')
-rw-r--r-- | include/linux/phy.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h index 075c2f770d3e..cd6f637cbbfb 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -825,6 +825,16 @@ static inline bool phy_interrupt_is_valid(struct phy_device *phydev) } /** + * 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 */ |