net: phy: introduce phy_read_mmd_poll_timeout macro
authorDejin Zheng <zhengdejin5@gmail.com>
Mon, 23 Mar 2020 15:05:53 +0000 (23:05 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Mar 2020 05:00:02 +0000 (22:00 -0700)
commitbd971ff0b73927b91f4520621d49d3a801ee4837
tree87c54b5d994d482ea2ade2a9a9f2a4c5801f309e
parenteaa6b01024a74ab5f3064f17dd88596284f497c4
net: phy: introduce phy_read_mmd_poll_timeout macro

it is sometimes necessary to poll a phy register by phy_read_mmd()
function until its value satisfies some condition. introduce
phy_read_mmd_poll_timeout() macros that do this.

Suggested-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/phy.h